Skip to main content

From a Categraf CPU metric to an on-call alert in Flashduty

· 2 min read
Eric Qin

A monitoring stack can show healthy dashboards while its route to the on-call engineer is broken. You can check that route with one test host, a short-lived Nightingale rule, and a Flashduty channel reserved for testing.

Start with one host​

Categraf collects the CPU idle metric and writes it over Prometheus Remote Write. In Nightingale, query cpu_usage_idle{cpu="cpu-total"} for one host. The ident label is how you keep the test scoped to that host. The Categraf quick start walks through data arrival and the Linux integration.

Watch the same incident open and close​

Use Nightingale's built-in Flashduty media type, with the full push URL from a Flashduty test integration. Attach the notification rule to one CPU test rule and enable recovery notifications. The Flashduty setup guide has a PromQL example that matches for five minutes and then clears on its own, so you can watch recovery without editing the rule halfway through.

CheckWhere to look
Categraf produced a sampleQuery the test host's CPU metric in Nightingale.
Nightingale fired and delivered an eventOpen the event and its notification record in Nightingale.
The responder can act on itFind the incident in the Flashduty test channel and acknowledge it.
Recovery reached the same destinationConfirm the same Flashduty incident resolves after the test window ends.

If you see a Nightingale event but no incident in Flashduty, check the notification record's response body, then check the integration's latest event time and default route. Once the test is complete, disable the CPU test rule. You can repeat the same checks for the alert your team actually relies on.