

- Prometheus evaluates PromQL expressions continuously (many teams use a 15s evaluation interval — this is configurable and may differ from scrape intervals).
- Alertmanager groups alerts, routes them based on labels, and delivers notifications to the right receivers (Slack, PagerDuty, email, etc.).
- Noise-control mechanisms (silences, inhibition, grouping) keep notifications actionable so the team doesn’t ignore them.

- Prometheus evaluates alerting rules: expressions written in PromQL, evaluated at the configured evaluation interval.
- Alert states:
inactive(resolved),pending,firing. Thependingstate is a debounce window to prevent transient spikes from firing alerts. - Alertmanager takes over once alerts are
firing: it groups related alerts, routes them according to labels, and sends notifications to configured receivers.
Example alert rule (Prometheus recording/alerting rules file):
Use
for durations typically between a couple of minutes and ten minutes depending on your service’s tolerance for brief errors versus rapid notification. Too short → false positives; too long → slow detection.route.receiver: default receiver if no child route matches.group_by: labels used to group alerts into a single notification (e.g.,["alertname", "namespace"]).group_wait: time to wait before sending the first notification for a group (commonly ~30s).group_interval: minimum time between notifications for the same group.routes: child routes with match conditions evaluated in order; the first matching child route is used.
Order your Alertmanager routes from most specific/critical to least. Put PagerDuty or on-call receivers near the top so critical alerts match first.
- Grouping reduces noise by combining many similar alerts into one notification.
- Proper ordering ensures urgent alerts reach the right people immediately, and broader routes catch anything else.
- Silences: temporary mutes for alerts (set via Alertmanager UI or API). Good for planned maintenance windows.
- Inhibition: automatically suppress lower-priority alerts when a higher-priority alert is firing (e.g., inhibit pod alerts when a node is down).
- Group tuning: adjust
group_byto control bundling (e.g., group byalertnamefor broad messages, addnamespaceorinstancefor more detail). - Review and prune: remove stale or noisy alerts during periodic reviews (quarterly is a reasonable cadence).

- Rule evaluation: Prometheus evaluates the PromQL expression.
- Pending: condition is true but
forwindow has not elapsed; if it resolves during this time, no alert fires. - Firing: condition remains true for the
forduration; alert is markedfiringand sent to Alertmanager. - Routing & grouping: Alertmanager matches and groups alerts, then sends notifications to configured receivers.
- Resolution: when the condition clears, Alertmanager sends a resolved notification.
- Alert on symptoms, not causes. For example, prefer alerts on increased latency or elevated 5xx rates rather than raw CPU usage.
- Include runbook URLs in annotations so on-call engineers get immediate, actionable steps.
- Choose
fordurations appropriate for your environment (commonly 2–10 minutes). - Regularly review alert rules and routing configuration to remove stale or noisy alerts.
- Keep critical routes first in Alertmanager’s routing tree to ensure proper delivery.
- Use inhibition to suppress downstream noise during major incidents (e.g., node down → inhibit pod/instance alerts).
- Alerting is a two-component model: Prometheus evaluates rules; Alertmanager routes and delivers notifications.
- Alert rules need expressions,
fordebounce durations, labels for routing, and annotations (summary, description, runbook). - Alertmanager routing is first-match; order routes from most specific/critical to least.
- Use silences, inhibition, and grouping tuning to reduce alert fatigue and keep notifications actionable.
- Prometheus alerting rules: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
- Alertmanager configuration: https://prometheus.io/docs/alerting/latest/alertmanager/
- Best practices for alerting: https://prometheus.io/docs/practices/alerting/