Last active
April 5, 2023 18:49
-
-
Save s-chb/4a89d46f1e96c8bcccd616cdae9f0cb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groups: | |
- name: alert.rules | |
rules: | |
- alert: InstanceDown | |
expr: up == 0 | |
for: 1m | |
labels: | |
severity: "critical" | |
annotations: | |
summary: "Endpoint {{ $labels.instance }} down" | |
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes." | |
- alert: HostOutOfMemory | |
expr: node_memory_MemAvailable / node_memory_MemTotal * 100 < 25 | |
for: 5m | |
labels: | |
severity: warning | |
annotations: | |
summary: "Host out of memory (instance {{ $labels.instance }})" | |
description: "Node memory is filling up (< 25% left)\n VALUE = {{ $value }}\n LABELS: {{ $labels }}" | |
- alert: HostOutOfDiskSpace | |
expr: (node_filesystem_avail{mountpoint="/"} * 100) / node_filesystem_size{mountpoint="/"} < 50 | |
for: 1s | |
labels: | |
severity: warning | |
annotations: | |
summary: "Host out of disk space (instance {{ $labels.instance }})" | |
description: "Disk is almost full (< 50% left)\n VALUE = {{ $value }}\n LABELS: {{ $labels }}" | |
- alert: HostHighCpuLoad | |
expr: (sum by (instance) (irate(node_cpu{job="node_exporter_metrics",mode="idle"}[5m]))) > 80 | |
for: 5m | |
labels: | |
severity: warning | |
annotations: | |
summary: "Host high CPU load (instance {{ $labels.instance }})" | |
description: "CPU load is > 80%\n VALUE = {{ $value }}\n LABELS: {{ $labels }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment