Alerting & Dashboarding: PCA practice questions
Alerting in Prometheus is split between two programs, and most questions on this topic test whether you know which one does what. The Prometheus server evaluates alerting rules. Alertmanager turns the resulting alerts into notifications.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Alerting & Dashboarding covers in PCA
Alerting in Prometheus is split between two programs, and most questions on this topic test whether you know which one does what. The Prometheus server evaluates alerting rules. Alertmanager turns the resulting alerts into notifications. Prometheus never sends an email or a page itself: it periodically sends the state of its alerts to one or more Alertmanager instances, which it can find through service discovery, and Alertmanager takes care of summarization, rate limiting, silencing and dispatching.
Alerting rules live in rule files, the same files that hold recording rules, and they are loaded by the server. Each rule has a name, a PromQL expression, and optional for, labels and annotations fields. Every series the expression returns becomes an active alert. Without a for clause the alert fires on the first evaluation that returns it. With for: 10m the alert first sits in the pending state and only moves to firing once the condition has held for ten minutes, which keeps short spikes from paging anyone. The keep_firing_for field does the reverse: it keeps an alert firing for a while after the condition clears, to ride out flapping and gaps in data. If no rules are defined, the server simply produces no alerts. Prometheus also exposes a synthetic ALERTS series with the value 1 for every pending or firing alert, which you can query like any other metric.
Labels and annotations look similar but serve different purposes. Labels are attached to the alert itself, overriding any conflicting label of the series, so they become part of what identifies it. Annotations carry longer, human-readable text such as a summary, a description or a link to a runbook or console, and both fields can be templated with $labels and $value.
Alertmanager has a small vocabulary worth knowing exactly. Grouping collects alerts of a similar nature into a single notification, so one outage that trips the same alert on many instances can arrive as one message. Inhibition suppresses notifications for some alerts while certain other alerts are already firing. A silence mutes matching alerts for a fixed period, for example during planned maintenance. Notifications go to receivers chosen by a routing tree in the configuration file, and several Alertmanagers can be clustered for high availability.
Recording rules belong here too because dashboards depend on them. A recording rule precomputes an expression that is frequently needed or expensive and stores the result as a new time series, so a dashboard that refreshes every few seconds reads one cheap series instead of recomputing a heavy aggregation. Rules in a group run sequentially at the group interval, which defaults to the global evaluation_interval.
The Prometheus documentation's advice on alert design is short: keep alerting simple, alert on symptoms that are associated with user pain rather than on every possible cause, avoid pages where there is nothing to do, and make alerts link to the consoles that help find the faulty component. The built-in expression browser at /graph runs any query as a table or a graph, but the documentation describes it as primarily useful for ad-hoc queries and debugging and points to Grafana or console templates for real dashboards.
Key points
- Prometheus evaluates alerting rules; Alertmanager deduplicates, groups, routes and sends the notifications.
- With a for clause an alert is pending until the condition has held for that duration, then it is firing.
- Labels identify and route an alert; annotations carry descriptive text such as a summary or runbook link.
- Inhibition suppresses alerts while related alerts fire; a silence mutes matching alerts for a set time.
- Recording rules store the result of an expensive expression as a new series for fast dashboards.
Three sample questions
59 PCA questions on Alerting & Dashboarding, 19 with explanations. How practice works
Question 1
- A.Counter
- B.Histogram
- C.Gauge
- D.Summary
Correct answer: B
_bucket metrics. Counters, gauges, and summaries do not directly provide the bucketed values needed for heatmap visualization.Question 2
- A.Inside the Alertmanager configuration file
- B.Within Grafana dashboard panels
- C.In the exposition format on the target
- D.In rule files loaded by the Prometheus server, using
alertrules
Correct answer: D
Question 3
for clause in an alerting rule do?- A.Requires the condition to remain true for a sustained duration before the alert fires
- B.Sets the receiver that should handle the alert
- C.Defines the scrape interval for the rule
- D.Silences the alert for a fixed period
Correct answer: A
for clause makes an alert wait in the 'pending' state until its expression has been continuously true for the specified duration, reducing noise from brief, transient spikes.Practice this topic
Focus mode keeps every question on Alerting & Dashboarding until you leave it. 10 free guest answers, then a free account; no credit card.
Or open PCA practice across all topics.
Sources
The explanation above was checked against these official documents.
- Prometheus docs: Alerting rules (checked 2026-10-23)
- Prometheus docs: Alertmanager (checked 2026-10-23)
- Prometheus docs: Recording rules (checked 2026-10-23)
- Prometheus docs: Alerting best practices (checked 2026-10-23)
- Prometheus docs: Expression browser (checked 2026-10-23)
Frequently asked questions
What is the difference between a pending and a firing alert?
An alerting rule with a for clause first puts a matching alert in the pending state. Only after the expression has kept returning that series for the whole for duration does the alert become firing and get sent on to Alertmanager as active.