Skip to content

Instantly share code, notes, and snippets.

@SuperQ
Created May 14, 2018 17:23
Show Gist options
  • Save SuperQ/68ddfab53e5abfc8ad0071c01c7b5c5a to your computer and use it in GitHub Desktop.
Save SuperQ/68ddfab53e5abfc8ad0071c01c7b5c5a to your computer and use it in GitHub Desktop.
Threshold alerting
groups:
- name: Threshold-Alerts
rules:
- record: load_threshold
expr: "100"
- record: load_threshold
expr: "10"
labels:
node_type: tiny
- record: load_threshold
expr: "1000"
labels:
node_type: huge
- alert: LoadIsTooDamnHigh
expr: |
(node_load1 - on(node_type) group_left() load_threshold > 0)
or
(node_load1 - scalar(load_threshold{node_type=""}) > 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment