TECHNOLOGY

Alerts keep disappearing: for, pending and keep_firing_for

In this article
THE QUICK TAKE

A Pending alert is not necessarily broken: for requires a condition to persist across evaluations. Keep_firing_for can retain firing after the condition disappears. Separate rule evaluation from Alertmanager delivery before changing a threshold.

A Pending alert is not necessarily broken: for requires a condition to persist across evaluations. Keep_firing_for can retain firing after the condition disappears. Separate rule evaluation from Alertmanager delivery before changing a threshold.

Preserve alert identity

Record the expression, for, keep_firing_for, evaluation interval and resulting labelset. Different labels create separate Prometheus alert instances. A dynamic value placed in labels can change identity at every evaluation and restart the waiting period. Consider changing descriptive values in annotations while keeping identity stable. Inspect the expression as a table: an empty vector and a zero-valued sample have different implications depending on the rule.

Official reference 1.

Draw state transitions

A condition becomes active and, with for configured, remains pending for the required duration. Once firing, keep_firing_for can delay deactivation. These intervals are not notification latency: Alertmanager independently groups, suppresses and sends alerts. Missing delivery during firing may involve routing or silence; missing firing may involve the expression or evaluations. Observe both layers rather than treating them as one notification timer.

Official reference 2.

Examine an intermittent threshold

Suppose for is 5 minutes. The condition holds for 4 minutes, disappears, then returns. The first episode need not fire. Adding keep_firing_for affects retention of an already firing alert, not the initial for wait. These values illustrate logic rather than recommend a service threshold. Test a short data gap too, since missing observation can resemble recovery.

CheckInvestigation layer
Expression emptyInput data or condition
Pending never endsFor, identity and continuity
Firing without a messageAlertmanager delivery policy
Firing persistsKeep_firing_for or continuing condition

Correct the intended behavior

Define whether brief spikes, sustained violation or missing measurements require action. Design the rule and delivery policy separately. Do not shorten production for merely to obtain a test message. Use a controlled synthetic rule or rule validation while preserving the original alert’s purpose. Keep_firing_for can reduce flapping but prolongs state after genuine recovery; operators should understand that effect when reading dashboards and incident records.

Verify the timed scenario

Retain successive evaluations with timestamps, labels and states. Compare Alertmanager intake with its actual delivery decision. Preserve the expected and observed timelines without treating thresholds as contractual SLA. Repeat after label or scrape-interval changes. A useful alert fires and resolves according to an explainable policy rather than simply producing one message. This separation prevents changes to the wrong layer when grouping or silence, rather than rule evaluation, caused the apparent failure. Include the test condition in the artifact so another operator can repeat it.

Related operational reading: gpu monitoring scorecard; gpu owner network outage log.

← All articles