Limit floats in alerts to 2 decimal places
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
otthorn 2021-01-29 19:33:38 +01:00
parent 57d997536a
commit 6ec89b88d8

View file

@ -22,7 +22,7 @@ groups:
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: "Mémoire libre de {{ $labels.instance }} à {{ $value }}%." summary: "Mémoire libre de {{ $labels.instance }} à {{ $value | printf "%.2f" }}%."
# Alert for out of disk space # Alert for out of disk space
- alert: OutOfDiskSpace - alert: OutOfDiskSpace
@ -31,7 +31,7 @@ groups:
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: "Espace libre de {{ $labels.mountpoint }} sur {{ $labels.instance }} à {{ $value }}%." summary: "Espace libre de {{ $labels.mountpoint }} sur {{ $labels.instance }} à {{ $value | printf "%.2f" }}%."
# Alert for out of inode space on disk # Alert for out of inode space on disk
- alert: OutOfInodes - alert: OutOfInodes
@ -49,7 +49,7 @@ groups:
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: "CPU sur {{ $labels.instance }} à {{ $value }}%." summary: "CPU sur {{ $labels.instance }} à {{ $value | printf "%.2f" }}%."
# Check systemd unit (> buster) # Check systemd unit (> buster)
- alert: SystemdServiceFailed - alert: SystemdServiceFailed