Skip to content

Instantly share code, notes, and snippets.

@martinhaus
Created April 18, 2020 15:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save martinhaus/dc0343c7de5f7f4362a324aee52bdbc6 to your computer and use it in GitHub Desktop.
alert: K8SNodeCPUUtilization
Expr: node:node_container_cpu_usage_seconds:irate1m{kubernetes_cluster!="kube-dev"} / node:node_allocatable_cpu_cores:sum{kubernetes_cluster!="kube-dev"}) * 100 > 90
for: 5m
labels:
group: system
severity: high
annotations:
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}'
msg: Node CPU ultilization by containers has been over 90% for more than 5m.
reason: Node CPU ultilization by containers is high. Recalculate CPU request and
limits.
value: '{{ printf "%.2f" $value }}%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment