429a94332e
- Introduced a new disk exporter module to monitor disk health using SMART data. - Updated `apps.tf` to include the disk exporter module with necessary parameters. - Added local variables for smartctl version and checksum in `config.tf`. - Enhanced `alertmanager.yml` to handle DiskUnhealthy alerts with specific grouping and dispatch settings. - Created new Prometheus rules for monitoring disk health, including alerts for unhealthy disks. - Updated Prometheus configuration to scrape metrics from the new disk exporter. - Enhanced Telegram notification template to include resolved alerts and improved formatting. - Updated the auth-exporter module to specify the Python image tag correctly. - Created the disk-exporter module with Kubernetes resources, including deployment, service account, and config map. - Added necessary Python scripts and requirements for the disk exporter functionality.
21 lines
748 B
YAML
21 lines
748 B
YAML
groups:
|
|
- name: auth.rules
|
|
rules:
|
|
- alert: UserLoggedIn
|
|
expr: changes(auth_sessions_active_by_user[1m]) > 0
|
|
labels:
|
|
severity: info
|
|
annotations:
|
|
summary: "Login: {{ $labels.username }} on dev-01"
|
|
description: "User {{ $labels.username }} logged in via {{ $labels.source }} on dev-01."
|
|
- name: disk.rules
|
|
rules:
|
|
- alert: DiskUnhealthy
|
|
expr: count(disk_info{})-count(disk_healthy{}) > 0
|
|
for: 2m
|
|
labels:
|
|
severity: critical
|
|
annotations:
|
|
summary: "Disk unhealthy: {{ $labels.device }} on dev-01"
|
|
description: "SMART overall health failed for device {{ $labels.device }} (disk_healthy=0). Investigate immediately."
|