Skip to content

Instantly share code, notes, and snippets.

@dkt26111
Created June 6, 2019 18:32
Show Gist options
  • Save dkt26111/c42a032e59cd665fd05b92128befdd87 to your computer and use it in GitHub Desktop.
Save dkt26111/c42a032e59cd665fd05b92128befdd87 to your computer and use it in GitHub Desktop.
High CPU usage alert rule for Prometheus
groups:
- name: example
rules:
# Alert for any cluster that has average CPU idle < 50%
- alert: HighUsage
expr: avg(irate(node_cpu_seconds_total{mode="idle"}[1m]) * 100) < 50
for: 1m
annotations:
summary: "High usage on {{ $labels.instance }}"
description: "{{ $labels.instance }} has a average CPU idle (current value: {{ $value }}s)"
@danixmarques
Copy link

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment