2021-04-01 05:21:08 +02:00
|
|
|
---
|
|
|
|
{{ ansible_managed | comment }}
|
|
|
|
|
|
|
|
{% macro raw(string) -%}
|
2021-04-01 06:00:47 +02:00
|
|
|
{{ "{{" }} {{ string }} {{ "}}" }}
|
2021-04-01 05:21:08 +02:00
|
|
|
{%- endmacro %}
|
|
|
|
|
2019-05-05 14:07:04 +02:00
|
|
|
groups:
|
2021-04-02 22:55:51 +02:00
|
|
|
|
2021-04-11 15:58:35 +02:00
|
|
|
- name: server.rules
|
2021-04-01 05:21:08 +02:00
|
|
|
rules:
|
|
|
|
|
|
|
|
- alert: InstanceDown
|
2021-09-08 12:31:03 +02:00
|
|
|
expr: up{instance!~".*.borne.auro.re$", job="servers"} == 0
|
2021-04-01 05:21:08 +02:00
|
|
|
for: 3m
|
|
|
|
labels:
|
2021-04-01 06:00:47 +02:00
|
|
|
severity: critical
|
2021-04-01 05:21:08 +02:00
|
|
|
annotations:
|
2021-04-01 06:00:47 +02:00
|
|
|
summary: >-
|
2021-04-01 09:36:11 +02:00
|
|
|
Invisible depuis plus de 3 minutes
|
2021-04-01 05:21:08 +02:00
|
|
|
|
2021-04-02 21:54:38 +02:00
|
|
|
- alert: AccessPointDown
|
|
|
|
expr: up{instance=~".*.borne.auro.re$"} == 0
|
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
|
|
|
Invisible depuis plus de 3 minutes
|
|
|
|
|
2021-04-01 05:21:08 +02:00
|
|
|
- alert: OutOfMemory
|
|
|
|
expr: >-
|
|
|
|
(
|
|
|
|
node_memory_MemFree_bytes
|
|
|
|
+ node_memory_Cached_bytes
|
|
|
|
+ node_memory_Buffers_bytes
|
|
|
|
) / node_memory_MemTotal_bytes * 100 < 10
|
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
2021-04-01 09:36:11 +02:00
|
|
|
{{ raw('$value | printf "%.1f"') }}% de mémoire
|
2021-04-01 06:00:47 +02:00
|
|
|
libre
|
2021-04-01 05:21:08 +02:00
|
|
|
|
2021-04-02 22:55:51 +02:00
|
|
|
- alert: HostSwapIsFillingUp
|
|
|
|
expr: >-
|
|
|
|
(
|
|
|
|
1 - (
|
|
|
|
node_memory_SwapFree_bytes
|
|
|
|
/ node_memory_SwapTotal_bytes
|
|
|
|
)
|
2021-09-08 18:41:19 +02:00
|
|
|
) * 100 >= 50
|
2021-04-02 22:55:51 +02:00
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
|
|
|
La mémoire swap est utilisée à {{ raw('$value | printf "%.1f"') }}%
|
|
|
|
|
|
|
|
- alert: HostPhysicalComponentTooHot
|
2021-04-03 08:04:10 +02:00
|
|
|
expr: node_hwmon_temp_celsius > 79
|
2021-04-02 22:55:51 +02:00
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2021-04-03 08:04:10 +02:00
|
|
|
summary: >-
|
|
|
|
La température de l'hôte est de {{ raw('$value') }}°C
|
|
|
|
({{ raw('$labels.chip') }}, {{ raw('$labels.sensor') }})
|
2021-04-02 22:55:51 +02:00
|
|
|
|
|
|
|
- alert: HostNodeOvertemperatureAlarm
|
|
|
|
expr: node_hwmon_temp_crit_alarm_celsius == 1
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2021-04-03 08:04:10 +02:00
|
|
|
summary: >-
|
|
|
|
L'alarme de température de l'hôte est active
|
|
|
|
({{ raw('$labels.chip') }}, {{ raw('$labels.sensor') }})
|
2021-04-02 22:55:51 +02:00
|
|
|
|
|
|
|
- alert: HostOomKillDetected
|
|
|
|
expr: increase(node_vmstat_oom_kill[1m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: Le noyau a tué {{ raw('$value') }} processus (OOM killer)
|
|
|
|
|
|
|
|
- alert: HostEdacCorrectableErrorsDetected
|
|
|
|
expr: increase(node_edac_correctable_errors_total[1m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
|
|
|
{{ raw('$value | print "%.1f"') }} erreur(s) ont été
|
|
|
|
corrigée(s) (EDAC)
|
|
|
|
|
2021-04-01 05:21:08 +02:00
|
|
|
- alert: OutOfDiskSpace
|
|
|
|
expr: >-
|
|
|
|
node_filesystem_free_bytes / node_filesystem_size_bytes * 100 < 10
|
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
2021-04-01 18:24:03 +02:00
|
|
|
{{ raw('$value | printf "%.1f"') }}% d'espace libre pour
|
|
|
|
{{ raw('$labels.mountpoint') }}
|
2021-04-01 05:21:08 +02:00
|
|
|
|
|
|
|
- alert: OutOfInodes
|
|
|
|
expr: node_filesystem_files_free / node_filesystem_files * 100 < 10
|
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
2021-04-01 09:36:11 +02:00
|
|
|
{{ raw('$value | printf "%.1f"') }}% d'inodes
|
2021-04-01 06:00:47 +02:00
|
|
|
restants pour {{ raw('$labels.mountpoint') }}
|
2021-04-01 05:21:08 +02:00
|
|
|
|
|
|
|
- alert: CpuUsage
|
|
|
|
expr: >-
|
|
|
|
(
|
|
|
|
100 - avg by (instance) (
|
|
|
|
irate(node_cpu_seconds_total{mode="idle"}[5m])
|
|
|
|
) * 100
|
|
|
|
) > 75
|
|
|
|
for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
2021-04-01 09:36:11 +02:00
|
|
|
CPU à {{ raw('$value | printf "%.1f"') }}%
|
2021-04-01 05:21:08 +02:00
|
|
|
|
|
|
|
- alert: SystemdServiceFailed
|
|
|
|
expr: node_systemd_unit_state{state="failed"} == 1
|
|
|
|
for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >-
|
2021-04-01 09:36:11 +02:00
|
|
|
{{ raw('$labels.name') }} a échoué
|
2021-04-01 05:21:08 +02:00
|
|
|
|
|
|
|
- alert: LoadUsage
|
|
|
|
expr: node_load1 > 5
|
|
|
|
for: 2m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
summary: >
|
2021-04-01 09:36:11 +02:00
|
|
|
Charge à {{ raw('$value') }}
|
2021-04-01 05:21:08 +02:00
|
|
|
|
2021-08-13 15:24:12 +02:00
|
|
|
- alert: UnhealthyDisk
|
|
|
|
expr: smartmon_device_smart_healthy < 1
|
|
|
|
for: 10m
|
|
|
|
labels:
|
|
|
|
severity: "critical"
|
|
|
|
annotations:
|
2021-08-18 18:53:27 +02:00
|
|
|
summary: "Le Disque {{ raw('$labels.disk') }} n'est pas en bonne santé !"
|
2021-04-01 05:21:08 +02:00
|
|
|
...
|