1
0

hosts/monitoring-3: Warn if storages are almost full

This commit is contained in:
clerie 2025-01-21 17:18:41 +01:00
parent fd2987c9fe
commit 3b7f59a66e
2 changed files with 21 additions and 1 deletions

View File

@ -63,6 +63,18 @@
"instance"
];
}
{
target_matchers = [
''alertname = "StorageAlmostFull"''
];
source_matchers = [
''alertname = "StorageFull"''
];
equal = [
"instance"
"mountpoint"
];
}
];
};
};

View File

@ -17,7 +17,7 @@ groups:
annotations:
summary: "Current system of {{ $labels.instance }} not in sync with config"
description: "The current system hash of {{ $labels.instance }} does not match the one generated by hydra based on the current config"
- alert: BackupStorageFull
- alert: StorageFull
expr: ((last_over_time(node_filesystem_avail_bytes{job="node-exporter"}[5m]) / last_over_time(node_filesystem_size_bytes{job="node-exporter"}[5m])) * 100) < 5
for: 30m
labels:
@ -25,6 +25,14 @@ groups:
annotations:
summary: "Storage of {{ $labels.instance }} is full"
description: "Storage of {{ $labels.instance }} for {{ $labels.mountpoint }} on {{ $labels.device }} is full"
- alert: StorageAlmostFull
expr: ((last_over_time(node_filesystem_avail_bytes{job="node-exporter"}[5m]) / last_over_time(node_filesystem_size_bytes{job="node-exporter"}[5m])) * 100) < 10
for: 30m
labels:
severity: warning
annotations:
summary: "Storage of {{ $labels.instance }} is almost full"
description: "Storage of {{ $labels.instance }} for {{ $labels.mountpoint }} on {{ $labels.device }} is almost full"
- alert: ClerieBackupJobLastSuccessfulRunBehind
expr: time() - last_over_time(clerie_backup_last_successful_run_time{}[5m]) >= 9000
for: 5m