[prometheus] Add rules for ups
parent
22f4fbd71f
commit
d0b978098a
|
@ -13,8 +13,7 @@ groups:
|
||||||
labels:
|
labels:
|
||||||
severity: critical
|
severity: critical
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Le serveur {{ $labels.instance }} est down"
|
summary: "{{ $labels.instance }} est invisible depuis plus de 3 minutes !"
|
||||||
description: "Le serveur {{ $labels.instance }} est down depuis plus de 3 minutes."
|
|
||||||
|
|
||||||
# Alert for out of memory
|
# Alert for out of memory
|
||||||
- alert: OutOfMemory
|
- alert: OutOfMemory
|
||||||
|
@ -23,8 +22,7 @@ groups:
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Presque plus de mémoire vive sur {{ $labels.instance }}"
|
summary: "Mémoire libre de {{ $labels.instance }} à {{ $value }}%."
|
||||||
description: "La mémoire est en train de se remplir ({{ $value }}% restant)"
|
|
||||||
|
|
||||||
# Alert for out of disk space
|
# Alert for out of disk space
|
||||||
- alert: OutOfDiskSpace
|
- alert: OutOfDiskSpace
|
||||||
|
@ -33,8 +31,7 @@ groups:
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Presque plus de stockage sur {{ $labels.mountpoint }} sur {{ $labels.instance }}"
|
summary: "Espace libre de {{ $labels.mountpoint }} sur {{ $labels.instance }} à {{ $value }}%."
|
||||||
description: "La partition est presque remplie ({{ $value }}% restant)"
|
|
||||||
|
|
||||||
# Alert for out of inode space on disk
|
# Alert for out of inode space on disk
|
||||||
- alert: OutOfInodes
|
- alert: OutOfInodes
|
||||||
|
@ -43,18 +40,16 @@ groups:
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Presque plus d'inodes disque sur {{ $labels.mountpoint }} sur {{ $labels.instance }}"
|
summary: "Presque plus d'inodes disponibles ({{ $value }}% restant) dans {{ $labels.mountpoint }} sur {{ $labels.instance }}."
|
||||||
description: "Le disque est presque à courre d'inodes disponibles ({{ $value }}% restant)"
|
|
||||||
|
|
||||||
# Alert for high CPU usage
|
# Alert for high CPU usage
|
||||||
- alert: CpuLoad
|
- alert: CpuUsage
|
||||||
expr: node_load15 / (count without (cpu, mode) (node_cpu_seconds_total{mode="system"} or node_cpu{mode="system"})) > 2
|
expr: ((100 - avg by (instance) (irate(node_cpu{mode="idle"}[5m])) * 100) or (100 - avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)) > 75
|
||||||
for: 5m
|
for: 5m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Charge CPU élevée sur {{ $labels.instance }}"
|
summary: "CPU sur {{ $labels.instance }} à {{ $value }}%."
|
||||||
description: "La charge CPU (moyenne de 15mn) est élevée."
|
|
||||||
|
|
||||||
# Check systemd unit (> buster)
|
# Check systemd unit (> buster)
|
||||||
- alert: SystemdServiceFailed
|
- alert: SystemdServiceFailed
|
||||||
|
@ -64,7 +59,88 @@ groups:
|
||||||
severity: warning
|
severity: warning
|
||||||
annotations:
|
annotations:
|
||||||
summary: "{{ $labels.name }} a échoué sur {{ $labels.instance }}"
|
summary: "{{ $labels.name }} a échoué sur {{ $labels.instance }}"
|
||||||
description: "Le service {{ $labels.name }} a échoué."
|
|
||||||
|
# Check UPS
|
||||||
|
- alert: UpsOutputSourceChanged
|
||||||
|
expr: upsOutputSource != 3
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "La source d'alimentation de {{ $labels.instance }} a changé !"
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsBatteryStatusChanged
|
||||||
|
expr: upsBatteryStatus != 2
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "L'état de la batterie de {{ $labels.instance }} a changé !"
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsTemperatureWarning
|
||||||
|
expr: (xupsEnvRemoteTemp < 10) or (xupsEnvRemoteTemp > 20)
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "La température autour de {{ $labels.instance }} est de {{ $value }}°C."
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsTemperatureCritical
|
||||||
|
expr: (xupsEnvRemoteTemp < 0) or (xupsEnvRemoteTemp > 30)
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
annotations:
|
||||||
|
summary: "La température autour de {{ $labels.instance }} est de {{ $value }}°C !"
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsHighHumidity
|
||||||
|
expr: xupsEnvRemoteHumidity > 65
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "L'humidité autour de {{ $labels.instance }} est de {{ $value }}%."
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsVeryHighHumidity
|
||||||
|
expr: xupsEnvRemoteHumidity > 85
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
annotations:
|
||||||
|
summary: "L'humidité autour de {{ $labels.instance }} est de {{ $value }}% !"
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsHighLoad
|
||||||
|
expr: upsOutputPercentLoad > 70
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
annotations:
|
||||||
|
summary: "La charge de {{ $labels.instance }} est de {{ $value }}% !"
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsWrongInputVoltage
|
||||||
|
expr: (upsInputVoltage < 220) or (upsInputVoltage > 240)
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "La tension d'entrée de {{ $labels.instance }} est de {{ $value }}V."
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
|
- alert: UpsWrongOututVoltage
|
||||||
|
expr: (upsOutputVoltage < 225) or (upsOutputVoltage > 235)
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "La tension de sortie de {{ $labels.instance }} est de {{ $value }}V."
|
||||||
|
description: "https://grafana.crans.org/d/qtbg59mZz/alimentation"
|
||||||
|
|
||||||
# NTP (need NTP plugin in node)
|
# NTP (need NTP plugin in node)
|
||||||
# - alert: ntp_drifting
|
# - alert: ntp_drifting
|
||||||
|
|
Loading…
Reference in New Issue