cpu

Reference for the `cpu` collector.

cpu · collector · run nanook doc cpu for the same content in your terminal.

Per-core and total CPU usage percentage.

Metrics

MetricKindUnitDescription
cpu.usagenumeric%global CPU usage percentage
cpu.core.usagenumeric%usage per core. Labels: core.

Examples

Collect every 5s

[[collectors]]
name = "cpu"
interval = 5

Sustained high CPU on the box

[[alerts]]
expr = "cpu.usage > 80%"
count = 12              # ~1 minute at 5s interval
channel = "ops"

Single core pinned hot

[[alerts]]
expr = "cpu.core.usage > 95%"
count = 24
channel = "ops"
body = "core {{ labels.core }} stuck at {{ value }}"