Skip to content

Alerting Rule for High CPU

Video Lecture

Alerting Rule for High CPU Alerting Rule for High CPU

Description

We will create an alerting rule for high CPU usage reported by any of our node exporters.

The query used in the alert rule was,

rate(node_cpu_seconds_total{job="node",mode="user"}[$__rate_interval]) * 100

The above query will convert the node_cpu_seconds_total value to a percentage for all of my node exporters where the job equals node.

The threshold was configured to be true when the input A is above 50.

To simulate high CPU on a Linux server, you can use a tool called stress.

To install,

#
apt install stress

To simulate high CPU usage on CPU 1, use the command,

#
stress -c 1

Comments