add label 'value' to alerts

This commit is contained in:
histausse 2021-10-08 22:36:59 +02:00
parent 70831ce0d1
commit 5c4c90e501
Signed by: histausse
GPG key ID: 67486F107F62E9E9

View file

@ -11,6 +11,7 @@ groups:
description: >- description: >-
{{ $labels.instance }} has been down for more than 5 minutes. {{ $labels.instance }} has been down for more than 5 minutes.
labels: labels:
value: "{{ $value }}"
severity: critical severity: critical
- alert: OutOfDiskSpace - alert: OutOfDiskSpace
@ -22,6 +23,7 @@ groups:
Partition `{{ $labels.mountpoint }}` (`{{ $labels.device }}`) of {{ $labels.instance }} Partition `{{ $labels.mountpoint }}` (`{{ $labels.device }}`) of {{ $labels.instance }}
uses {{ $value | printf "%.1f" }}% of its capacity. uses {{ $value | printf "%.1f" }}% of its capacity.
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: OutOfMemory - alert: OutOfMemory
@ -38,6 +40,7 @@ groups:
description: >- description: >-
{{ $labels.instance }} uses {{ $value | printf "%.1f" }}% of its memory capacity. {{ $labels.instance }} uses {{ $value | printf "%.1f" }}% of its memory capacity.
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: OutOfInode - alert: OutOfInode
@ -53,6 +56,7 @@ groups:
Partition {{ $labels.mountpoint }} ({{ $labels.device }}) of {{ $labels.instance }} Partition {{ $labels.mountpoint }} ({{ $labels.device }}) of {{ $labels.instance }}
uses {{ $value | printf "%.1f" }}% of its Inodes. uses {{ $value | printf "%.1f" }}% of its Inodes.
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: Swapping - alert: Swapping
@ -67,6 +71,7 @@ groups:
description: >- description: >-
{{ $labels.instance }} uses {{ $value | printf "%.1f" }}% of its memory capacity. {{ $labels.instance }} uses {{ $value | printf "%.1f" }}% of its memory capacity.
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: PhysicalComponentTooHot - alert: PhysicalComponentTooHot
@ -77,6 +82,7 @@ groups:
description: >- description: >-
The internal temperature of {{ $labels.instance }} is {{ $value }}°C! The internal temperature of {{ $labels.instance }} is {{ $value }}°C!
labels: labels:
value: "{{ $value }}"
severity: critical severity: critical
- alert: PhysicalComponentHeatAlarm - alert: PhysicalComponentHeatAlarm
@ -87,6 +93,7 @@ groups:
description: >- description: >-
Do something! Do something!
labels: labels:
value: "{{ $value }}"
severity: critical severity: critical
- alert: OOMKill - alert: OOMKill
@ -97,6 +104,7 @@ groups:
description: >- description: >-
The kernel killed {{ $value }} proccesses (OOM killer) The kernel killed {{ $value }} proccesses (OOM killer)
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: CorrectableErrorDetected - alert: CorrectableErrorDetected
@ -107,6 +115,7 @@ groups:
description: >- description: >-
{{ $value | printf "%.1f" }} error(s) have been corrected (EDAC) {{ $value | printf "%.1f" }} error(s) have been corrected (EDAC)
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: UncorrectableErrorDetected - alert: UncorrectableErrorDetected
@ -117,6 +126,7 @@ groups:
description: >- description: >-
{{ $value | printf "%.1f" }} error(s) could not be corrected (EDAC) {{ $value | printf "%.1f" }} error(s) could not be corrected (EDAC)
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
- alert: UnhealthyDisk - alert: UnhealthyDisk
@ -133,6 +143,7 @@ groups:
Smartools detected that `{{ $labels.disk }}` on {{ $labels.instance }} is unhealthy Smartools detected that `{{ $labels.disk }}` on {{ $labels.instance }} is unhealthy
and will probably need to be changed. and will probably need to be changed.
labels: labels:
value: "{{ $value }}"
severity: critical severity: critical
- alert: ServiceFailed - alert: ServiceFailed
@ -143,5 +154,6 @@ groups:
description: >- description: >-
The systemd service {{ $labels.name }} failed on {{ $labels.instance }} The systemd service {{ $labels.name }} failed on {{ $labels.instance }}
labels: labels:
value: "{{ $value }}"
severity: warning severity: warning
... ...