Skip to content

Commit

Permalink
fix cpu alert rule (#1289)
Browse files Browse the repository at this point in the history
Fix Cpu alert rules
  • Loading branch information
raghupathiguduri authored Mar 14, 2020
1 parent 29a948a commit f3343d5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ spec:
- name: alertrules.nodes
rules:
- alert: high_cpu_usage_on_node_warning
expr: (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode="idle"}[5m])) * 100) >= {{ .Values.node_cpu_usage_percentage_threshold_Warning }} and (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode="idle"}[5m])) * 100) < {{ .Values.node_cpu_usage_percentage_threshold_Critical }}
expr: (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode!="idle"}[5m])) * 100) >= {{ .Values.node_cpu_usage_percentage_threshold_Warning }} and (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode!="idle"}[5m])) * 100) < {{ .Values.node_cpu_usage_percentage_threshold_Critical }}
for: 1m
labels:
severity: warning
annotations:
message: {{`'{{ $labels.instance }} is using a LOT of CPU. CPU usage is {{ humanize $value}}%.'`}}
summary: {{`'HIGH CPU USAGE warning ON {{ $labels.instance }}'`}}
- alert: high_cpu_usage_on_node_critical
expr: (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode="idle"}[5m])) * 100) >= {{ .Values.node_cpu_usage_percentage_threshold_Critical }} and (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode="idle"}[5m])) * 100) < {{ .Values.node_cpu_usage_percentage_threshold_Fatal }}
expr: (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode!="idle"}[5m])) * 100) >= {{ .Values.node_cpu_usage_percentage_threshold_Critical }} and (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode!="idle"}[5m])) * 100) < {{ .Values.node_cpu_usage_percentage_threshold_Fatal }}
for: 1m
labels:
severity: critical
annotations:
message: {{`'{{ $labels.instance }} is using a LOT of CPU. CPU usage is {{ humanize $value}}%.'`}}
summary: {{`'HIGH CPU USAGE warning ON {{ $labels.instance }}'`}}
- alert: high_cpu_usage_on_node_fatal
expr: (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode="idle"}[5m])) * 100) >= {{ .Values.node_cpu_usage_percentage_threshold_Fatal }}
expr: (avg by (instance) (irate(node_cpu_seconds_total{job="vm-node-exporter",mode!="idle"}[5m])) * 100) >= {{ .Values.node_cpu_usage_percentage_threshold_Fatal }}
for: 1m
labels:
severity: fatal
Expand Down

0 comments on commit f3343d5

Please sign in to comment.