add alert for systemd services

This commit is contained in:
nd 2020-08-06 09:21:09 +02:00
parent f3a7dc4667
commit 2fe4e2435d
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -188,6 +188,18 @@ prometheus_agent:
annotations: annotations:
title: '{%raw%}{{ $labels.instance }}: TempCritical{%endraw%}' title: '{%raw%}{{ $labels.instance }}: TempCritical{%endraw%}'
description: "Too hot!" description: "Too hot!"
SystemdServices:
group: nodeexporter
enabled: True
alert: systemd
expr: |
node_systemd_units{job="node", instance=~"{{ inventory_hostname }}", state="failed"} > 0
for: 5m
labels:
severity: critical
annotations:
title: '{%raw%}{{ $labels.instance }}: Not all systemd services are running{%endraw%}'
description: "Service not running"
tls: tls:
mode: stunnel mode: stunnel