Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix template variable usage #199

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/prometheus_alert_rules/high_cpu_iowait.rule

This file was deleted.

11 changes: 11 additions & 0 deletions src/prometheus_alert_rules/high_cpu_iowait.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- name: HostCpu
rules:
- alert: HostCpuHighIowait
expr: avg by (instance) (rate(node_cpu_seconds_total{mode="iowait"}[5m])) * 100 > 10
for: 0m
labels:
severity: warning
annotations:
summary: Host CPU high iowait (instance {{ $labels.instance }})
description: "CPU iowait > 10%. A high iowait means that you are disk or network bound.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
4 changes: 2 additions & 2 deletions src/prometheus_alert_rules/host_health.rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ groups:
labels:
severity: critical
annotations:
summary: Host '{{labels.instance}}' is down.
summary: Host '{{ $labels.instance }}' is down.
description: >-
Host '{{ $labels.instance }}' is down.
VALUE = {{ $value }}
Expand All @@ -18,7 +18,7 @@ groups:
labels:
severity: critical
annotations:
summary: Metrics not received from host '{{labels.instance}}'.
summary: Metrics not received from host '{{ $labels.instance }}'.
description: >-
The metrics endpoint for host '{{ $labels.instance }}' is unreachable.
VALUE = {{ $value }}
Expand Down
8 changes: 0 additions & 8 deletions src/prometheus_alert_rules/oomkill.rule

This file was deleted.

11 changes: 11 additions & 0 deletions src/prometheus_alert_rules/oomkill.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- name: HostMemory
rules:
- alert: HostOomKillDetected
expr: increase(node_vmstat_oom_kill[1h]) > 0
for: 0m
labels:
severity: warning
annotations:
summary: Host OOM kill detected (instance {{ $labels.instance }})
description: "OOM kill detected\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
Loading