First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Observability Concepts
In Prometheus, which metric type is designed to represent a value that can increase or decrease over time, such as the current number of in-flight requests?
- Summary
- Histogram
- Counter
- Gauge Correct answer.
Explanation
A gauge represents a snapshot value that may go up or down arbitrarily, so it fits quantities like queue depth, temperature, or in-flight requests. Counters only increase, while histograms and summaries aggregate observations into buckets or quantiles.
Question 2Observability Concepts
Which Prometheus metric type lets you compute an aggregate rate over time using the rate() function and is expected to only ever go up?
- Counter Correct answer.
- Gauge
- Histogram
- Summary
Explanation
Counters are cumulative and monotonic, which is exactly what rate() and increase() are designed to consume over a time window. Gauges fluctuate and should not be fed to rate(), and histograms/summaries are composite types.
Question 3Observability Concepts
In Prometheus, what does a histogram bucket series such as http_request_duration_seconds_bucket{le="0.5"} count?
- The average duration of the last 0.5 seconds of requests
- Requests whose duration was greater than 0.5 seconds
- Requests whose duration was less than or equal to 0.5 seconds Correct answer.
- Requests whose duration was exactly 0.5 seconds
Explanation
Histogram buckets are cumulative: each le (less-than-or-equal) bucket counts all observations at or below that boundary, so le="0.5" includes everything up to and including 0.5 seconds. Because buckets are cumulative, they are monotonic and can be rate()'d like counters.
Question 4Observability Concepts
Which PromQL expression gives the per-second rate of HTTP requests over the last 5 minutes for each series of http_requests_total?
- delta(http_requests_total[5m])
- rate(http_requests_total[5m]) Correct answer.
- http_requests_total[5m]
- irate(http_requests_total)
Explanation
rate() over a range vector such as [5m] computes the average per-second increase across the window and handles counter resets. The range vector alone returns raw samples, and irate() requires a range vector argument.
Question 5Observability Concepts
A query uses sum(rate(http_requests_total[5m])) without a by or without clause. What is the result?
- An error because sum requires a grouping clause
- A single aggregated series with no labels Correct answer.
- One series per monitored target instance
- One output series per unique label combination
Explanation
When sum() is used with no by() or without() modifier, Prometheus aggregates across all series and returns a single sample with an empty label set. Grouping modifiers are optional and only control which labels survive aggregation.
Question 6Observability Concepts
In PromQL, which operator modifier compares series on a specified set of labels instead of the full label set?
- ignoring
- offset
- group_left
- on Correct answer.
Explanation
The on() modifier restricts matching to the listed labels, while ignoring() excludes the listed labels from matching. group_left and group_right control cardinality of many-to-one matches, and offset shifts the evaluation time.
Question 7Observability Concepts
You want to alert when a target has been unreachable, using the metric up. Which expression correctly fires when the target is down?
- up == 0 Correct answer.
- up > 0
- up == 1
- up != 1
Explanation
The up metric is 1 when the last scrape succeeded and 0 when it failed, so up == 0 identifies down targets. Filtering on up != 1 would also match absent series semantics, but the canonical down test is equality with zero.
Question 8Observability Concepts
What does the Prometheus scrape_interval configuration option control?
- How often Prometheus pulls metrics from each target Correct answer.
- The timeout for a single scrape request
- How long samples are retained in the TSDB
- How often alerting rules are evaluated
Explanation
scrape_interval sets the period between successive scrapes of a target, defaulting to one minute. Retention is governed by retention time or size flags, rule evaluation by evaluation_interval, and per-scrape timeouts by scrape_timeout.
Question 9Observability Concepts
Which statement correctly distinguishes Prometheus pull-based scraping from a push-based collection model?
- Push requires targets to expose an HTTP endpoint that the server periodically reads
- Pull cannot detect whether a target is down
- Push stores metrics without any timestamps
- Pull requires every target to expose an HTTP endpoint that Prometheus discovers and scrapes Correct answer.
Explanation
In the pull model Prometheus discovers targets and fetches their /metrics endpoint on a schedule, which also makes target health observable via the up metric. Push models invert this so agents send data to a collector.
Question 10Observability Concepts
Which exporter pattern is appropriate for collecting host-level CPU, memory, and filesystem metrics from Linux servers?
- alertmanager grouping alerts
- blackbox_exporter probing HTTP endpoints
- node_exporter running on each host Correct answer.
- pushgateway receiving batch job results
Explanation
node_exporter exposes host hardware and OS metrics on each machine for Prometheus to scrape. blackbox_exporter probes endpoints from outside, pushgateway handles short-lived batch jobs, and alertmanager routes alerts.
Question 11Observability Concepts
Why is the Pushgateway generally discouraged for long-running services?
- It retains the last pushed values and can serve stale data if the pusher stops Correct answer.
- It rewrites all metric names to a fixed prefix
- It only accepts metrics in JSON format
- It cannot accept more than one metric per push
Explanation
Pushgateway keeps the last pushed sample indefinitely, so a crashed or stopped job can appear healthy because its old values persist. It is intended for short-lived batch jobs that cannot be scraped, not for continuously running services.
Question 12Observability Concepts
A histogram has buckets with le values 0.1, 0.5, 1, and +Inf. What does the +Inf bucket represent?
- The average of all observations
- The total count of all observations Correct answer.
- The sum of all observed values
- Observations that exceeded every finite bucket
Explanation
Because histogram buckets are cumulative, the +Inf bucket counts every observation and therefore equals the total observation count, exposed as _count. It is not a separate overflow bucket.
Question 13Observability Concepts
Which PromQL function should you use to estimate a quantile such as the 95th percentile latency from histogram buckets?
- quantile(0.95, ...)
- avg_over_time(...) with a 0.95 factor
- histogram_quantile(0.95, ...) Correct answer.
- stddev_over_time(...)
Explanation
histogram_quantile() interpolates a quantile from cumulative bucket rates, typically fed by sum by (le)(rate(..._bucket[5m])). The quantile() aggregator works on raw series values, not histogram buckets.
Question 14Observability Concepts
Why are summary quantiles problematic when aggregated across multiple instances?
- Summaries always require an external database
- Summaries cannot be scraped by Prometheus
- Quantiles are not mathematically averageable, so combining them yields misleading results Correct answer.
- Summary quantiles cannot be exposed over HTTP
Explanation
A precomputed quantile from one instance cannot be averaged or summed with another instance's quantile to produce a correct global quantile. Histograms avoid this because raw bucket counts can be aggregated before computing the quantile.
Question 15Observability Concepts
What is the purpose of recording rules in Prometheus?
- To enforce retention limits on the TSDB
- To define which alerts are routed to which receivers
- To configure scrape targets and relabeling
- To precompute frequently used or expensive expressions and store the results as new series Correct answer.
Explanation
Recording rules evaluate a PromQL expression on a schedule and save the output as a new time series, reducing query cost and dashboard latency. Alert routing belongs to alertmanager, scraping to scrape_configs, and retention to server flags.
Question 16Observability Concepts
In an alerting rule, what does the for clause specify?
- How long the alert expression must remain true before the alert fires Correct answer.
- The maximum number of alerts that can fire at once
- Which receiver the alert is sent to
- How often the rule expression is evaluated
Explanation
The for clause adds a pending period so transient spikes do not page anyone; the alert becomes firing only after the expression has been true for that duration. Evaluation cadence comes from evaluation_interval, and receivers are configured in alertmanager.
Question 17Observability Concepts
Which Alertmanager capability prevents a storm of duplicate alerts for the same underlying problem reaching responders?
- Grouping alerts by shared labels into a single notification Correct answer.
- Computing histogram quantiles
- Rewriting metric names before storage
- Scraping targets on a shorter interval
Explanation
Alertmanager groups alerts that share labels such as alertname and cluster so one notification covers many related instances. It also supports inhibition and silences, but grouping is the primary deduplication mechanism.
Question 18Observability Concepts
In Alertmanager, what does an inhibition rule do?
- Routes alerts to a fallback receiver
- Deletes alerts from storage after they resolve
- Suppresses certain alerts when other, higher-severity alerts are already firing Correct answer.
- Delays all notifications by a fixed time
Explanation
Inhibition suppresses a set of target alerts while a matching source alert is active, for example muting warning alerts when a critical alert for the same target fires. It is distinct from silences, which are time-based and manually created.
Question 19Observability Concepts
What is the role of the blackbox_exporter in a monitoring stack?
- It performs synthetic probes such as HTTP, TCP, and ICMP from an external vantage point Correct answer.
- It collects kernel-level metrics from the host it runs on
- It stores long-term metric data for Prometheus
- It aggregates and deduplicates alerts
Explanation
blackbox_exporter runs probes against endpoints and exposes results like probe_success, giving an outside-in view of availability. Host metrics come from node_exporter, storage from the TSDB or remote systems, and alert handling from alertmanager.
Question 20Observability Concepts
Which statement best describes exemplars in Prometheus instrumentation?
- They attach trace identifiers to specific metric samples to link metrics with traces Correct answer.
- They replace histograms by storing every raw observation
- They are alert annotations sent to Alertmanager
- They are a compression format for the TSDB
Explanation
Exemplars pair a metric sample with metadata such as a trace_id, letting you jump from an aggregated metric to a representative trace. They complement histograms rather than replacing them and are not a storage compression scheme.
Question 21Observability Concepts
In distributed tracing, what does a span represent?
- A single named operation within a trace, with a start time and duration Correct answer.
- The complete end-to-end request across all services
- A log line emitted by an application
- A metric counter incremented per request
Explanation
A span is one unit of work in a trace, capturing an operation name, timing, and parent-child relationships. The full request across services is the trace, which is a tree of spans sharing a trace ID.
Question 22Observability Concepts
Which sampling strategy keeps all spans of selected traces intact so that sampled traces remain complete?
- Per-span random sampling
- Fixed-rate counter sampling
- Head-based probabilistic sampling
- Tail-based sampling Correct answer.
Explanation
Tail-based sampling buffers a trace and decides after seeing all its spans, so it can keep entire interesting traces such as those with errors. Head-based and per-span approaches decide early or independently and can leave incomplete traces.
Question 23Observability Concepts
What is the core purpose of a service-level objective (SLO)?
- To document the API schema of a service
- To specify the hardware capacity required for a service
- To list every alert that must page on-call staff
- To define a target level of reliability for a service measured over a time window Correct answer.
Explanation
An SLO states a measurable reliability target, such as 99.9 percent of requests succeeding over 30 days, and drives error-budget tracking. Alerts, capacity, and API schemas are separate concerns.
Question 24Observability Concepts
In SRE practice, what does an error budget represent?
- The maximum number of alerts allowed per day
- The storage quota for metric retention
- The number of failed deployments permitted per sprint
- The amount of unreliability a service can tolerate within an SLO window Correct answer.
Explanation
The error budget is the complement of the SLO, for example 0.1 percent of requests over 30 days at a 99.9 percent target, and it quantifies how much failure is acceptable. It guides release velocity and prioritization rather than alert or storage limits.
Question 25Observability Concepts
Which practice best reduces high cardinality problems in a Prometheus deployment?
- Adding user ID and request ID as metric labels
- Avoiding unbounded labels such as user IDs, emails, or raw URLs in metric labels Correct answer.
- Increasing the scrape interval to one hour
- Storing all labels only in alert annotations
Explanation
High cardinality comes from labels with unbounded value sets, and each unique combination creates a new series that inflates memory and storage. Labels like user IDs or request IDs should stay in logs or traces, not in metric labels.
Question 26Observability Concepts
A service exposes a Prometheus counter named http_requests_total. What does the value of this metric represent at any given moment?
- The rate of requests per second averaged over the last scrape interval
- The cumulative number of requests observed since the process started, aside from resets Correct answer.
- The number of requests received during the most recent scrape only
- The number of requests currently being processed by the server
Explanation
A counter is a monotonically increasing value that accumulates from process start; it only resets when the process restarts. To obtain a rate you apply functions such as rate() or increase() over a range, rather than reading the raw counter as a per-interval count.
Question 27Observability Concepts
You want to visualize the current number of open database connections, which rises and falls over time. Which Prometheus metric type is designed for this?
- Gauge Correct answer.
- Counter
- Summary
- Histogram
Explanation
A gauge represents a value that can go up or down arbitrarily, such as current connections, temperature, or queue depth, and it can be set directly. Counters only increase, while histograms and summaries are for observing distributions of measurements.
Question 28Observability Concepts
Which label set on a Prometheus time series would most likely cause a cardinality explosion?
- A label containing the full request URL including query strings Correct answer.
- A label recording the HTTP method such as GET or POST
- job, instance, and env with a handful of values each
- A label recording the HTTP status code class such as 2xx or 5xx
Explanation
Each unique combination of label values creates a separate time series, so a label with unbounded values such as a raw URL multiplies series without limit. Bounded labels like environment, method, or status class keep the series count manageable.
Question 29Observability Concepts
In PromQL, what does the rate() function require as its argument?
- An instant vector of counter samples at a single timestamp
- A scalar constant representing the evaluation window
- A range vector such as http_requests_total[5m] Correct answer.
- A string selector naming the target job
Explanation
rate() operates on a range vector, computing the per-second average increase across the samples within the specified window. It is intended for counters and correctly handles counter resets within the range.
Question 30Observability Concepts
You need to detect when the 99th percentile request latency exceeds a threshold, using a Prometheus histogram. Which expression is appropriate?
- histogram_quantile(0.99, sum by (le) (rate(http_request_duration_seconds_bucket[5m]))) Correct answer.
- max(http_request_duration_seconds_count)
- sum(rate(http_request_duration_seconds_bucket[5m]))
- avg(http_request_duration_seconds_sum)
Explanation
histogram_quantile() estimates a quantile from the le-labelled bucket series, and aggregating the bucket rates by le first preserves the bucket structure. The 0.99 argument selects the 99th percentile of the estimated distribution.
Question 31Observability Concepts
Two Prometheus servers scrape the same targets, and you query a recording rule output that was evaluated on both. What does the deduplication behavior of Prometheus federation or remote read generally require you to consider?
- Each server adds a unique label such as prometheus or replica to distinguish its series Correct answer.
- Recording rules cannot be federated, so only raw metrics are available
- Federation automatically averages duplicate samples into a single value
- Identical series from both servers carry the same labels and are merged by label set
Explanation
When multiple servers produce the same series, their label sets are identical, so queries would conflate them. Operators typically attach a distinguishing label such as prometheus or replica so that series remain separate and can be aggregated deliberately.
Question 32Observability Concepts
A metric named node_cpu_seconds_total reports values per CPU mode. Which query computes per-second CPU usage per mode?
- increase(node_cpu_seconds_total)
- sum(node_cpu_seconds_total)
- rate(node_cpu_seconds_total[5m]) Correct answer.
- node_cpu_seconds_total / 5
Explanation
Since node_cpu_seconds_total is a counter of seconds spent, rate() over a window converts it into seconds per second, which is the utilization fraction per mode. Dividing the raw counter or summing it without a rate yields meaningless cumulative totals.
Question 33Observability Concepts
Your team wants alert notifications routed to different receivers based on the service label. Which Alertmanager configuration mechanism accomplishes this?
- Inhibition rules that suppress alerts by label
- Routing tree entries with match expressions that select child receivers Correct answer.
- Silence rules created for each service
- A single global receiver applied to every alert
Explanation
Alertmanager uses a routing tree in which each route can match on labels and send matching alerts to a specific receiver, with child routes refining the decision. This lets different services reach different notification channels.
Question 34Observability Concepts
An SLO states that 99.9% of requests must succeed over 30 days. What does the remaining 0.1% correspond to in error-budget terms?
- The amount of unreliability the service may experience in the window before the objective is breached Correct answer.
- The percentage of monitoring coverage required before alerts fire
- The fraction of capacity that must remain reserved for failover
- The maximum number of incidents the team may declare in the month
Explanation
The error budget is the complement of the SLO, here 0.1% of requests over the window, and it quantifies how much failure is tolerable. Teams spend it on releases and risk while tracking burn against the objective.
Question 35Observability Concepts
A team wants to know whether a latency regression is caused by a specific downstream call inside a request. Which observability signal most directly answers this?
- An aggregated error-rate alert on the service
- A log line emitted at service startup
- A high-level request rate dashboard for the service
- A distributed trace showing span durations across the call path Correct answer.
Explanation
Distributed traces record spans with durations and parent-child relationships, so the time spent in each downstream call within a request is visible. This pinpoints which span in the path accounts for the added latency.
Question 36Observability Concepts
A service emits a histogram with buckets at 0.1, 0.5, 1, and +Inf seconds. A client reports that the estimated 95th percentile looks too coarse. What is the most likely cause?
- The counter was reset during the window
- The histogram was aggregated with sum by (le)
- The bucket boundaries are too sparse to resolve the region where the 95th percentile falls Correct answer.
- The +Inf bucket was omitted from the query
Explanation
histogram_quantile() interpolates within the bucket that contains the target quantile, so accuracy depends on bucket boundaries near that value. Sparse boundaries force wide interpolation and produce a coarse estimate.
Question 37Prometheus Fundamentals
In Prometheus, which component is responsible for scraping metrics from configured targets and storing the resulting samples in its local time series database?
- The node_exporter
- The Prometheus server Correct answer.
- The Alertmanager
- The Pushgateway
Explanation
The Prometheus server itself performs the scrape loop, parsing each target's exposition endpoint and appending samples to its local storage engine. Exporters and the Pushgateway only expose or collect metrics; they do not store the time series. Alertmanager handles notifications, not ingestion.
Question 38Prometheus Fundamentals
A metric is exposed as `http_requests_total{job="api",method="GET"} 1024`. What does the `total` suffix conventionally signal about this metric?
- It is a histogram that records observations in buckets
- It is a cumulative counter that only increases, except on process restart Correct answer.
- It is a gauge whose value can rise or fall freely
- It is a summary that exposes precomputed quantiles
Explanation
By convention Prometheus appends `_total` to counter metrics, which are monotonically increasing cumulative values. Counters reset to zero when the process restarts, and that reset is handled by functions like `rate`. Gauges, histograms, and summaries have different naming and structural conventions.
Question 39Prometheus Fundamentals
Which PromQL expression returns the per-second average rate of increase of a counter over the last five minutes, correctly handling counter resets?
- increase(http_requests_total[5m])
- rate(http_requests_total[5m]) Correct answer.
- delta(http_requests_total[5m])
- irate(http_requests_total[5m])
Explanation
`rate` computes a per-second average increase over the range vector and is reset-aware, so counter resets are treated as starting from zero. `increase` returns the total increase over the window rather than a per-second value. `irate` uses only the last two samples, and `delta` is intended for gauges.
Question 40Prometheus Fundamentals
What is the default TCP port on which the Prometheus server listens for its HTTP API and web UI?
- 9093
- 9100
- 8080
- 9090 Correct answer.
Explanation
The Prometheus server defaults to port 9090 for its web interface and HTTP API, configurable via `--web.listen-address`. Port 9100 is the common node_exporter default, 9093 is Alertmanager's default, and 8080 is a generic alternative HTTP port.
Question 41Prometheus Fundamentals
Which label is added automatically by Prometheus to identify the scrape target that produced a sample, in addition to `job`?
- instance Correct answer.
- pod
- endpoint
- service
Explanation
Prometheus attaches `job` and `instance` labels during scraping. The `instance` label defaults to the target's `__address__`, identifying the specific host and port scraped. Labels like `pod`, `endpoint`, and `service` come from service discovery relabeling rather than being added automatically by the scrape itself.
Question 42Prometheus Fundamentals
In a Prometheus configuration file, which section defines the set of targets to scrape and the interval at which to scrape them?
- `alerting`
- `rule_files`
- `scrape_configs` Correct answer.
- `remote_write`
Explanation
`scrape_configs` holds job definitions, static or discovered targets, and per-job settings such as `scrape_interval`. The `alerting` section points to Alertmanager instances, `rule_files` lists recording and alerting rule files, and `remote_write` configures sending samples to remote endpoints.
Question 43Prometheus Fundamentals
What does the PromQL selector `http_requests_total{method="POST",status=~"5.."}` do?
- Selects series where method matches the regex POST and status equals 500
- Selects series where method is not POST and status is any 5xx code
- Selects series where method equals POST and status literally equals the string `5..`
- Selects series where method equals POST and status matches the regex pattern for 5xx codes Correct answer.
Explanation
The `=` matcher requires exact equality for `method`, while `=~` applies a fully anchored regular expression, so `5..` matches any three-character status beginning with 5. This is the standard way to filter 5xx server errors. The other options misread the matcher semantics.
Question 44Prometheus Fundamentals
Which Prometheus component is designed to accept metrics pushed by short-lived batch jobs so that the Prometheus server can scrape them afterward?
- Blackbox exporter
- Alertmanager
- Prometheus agent mode
- Pushgateway Correct answer.
Explanation
Pushgateway lets short-lived jobs push their final metrics to a persistent endpoint that Prometheus scrapes later. It is not a substitute for normal scraping of long-running services. Alertmanager handles alerts, the blackbox exporter probes endpoints, and agent mode changes how Prometheus forwards data.
Question 45Prometheus Fundamentals
A dashboard shows `rate(node_cpu_seconds_total[1m])` producing erratic spikes. Which change best addresses the underlying problem?
- Replace the counter with a gauge and use `irate`
- Switch `rate` to `delta` to smooth the series
- Use a range window of at least four scrape intervals, such as `[5m]` with a 15s scrape interval Correct answer.
- Increase the scrape interval to one hour
Explanation
`rate` needs enough samples in the range to extrapolate reliably; a window shorter than a few scrape intervals leaves too few points and produces noisy results. A range of at least four scrape intervals is the usual guidance. Switching to `delta` or lengthening the scrape interval does not fix the sample density problem.
Question 46Prometheus Fundamentals
What is the purpose of the `for` field in a Prometheus alerting rule?
- It sets how long Alertmanager waits before sending a notification
- It defines the retention period for the alert's time series
- It requires the alert expression to remain true for a duration before the alert fires Correct answer.
- It specifies the interval at which the rule group is evaluated
Explanation
The `for` clause suppresses flapping by requiring the alert condition to be continuously true for the specified duration before the alert transitions to firing. Alertmanager's own timing is controlled by its route settings, retention is a storage setting, and group evaluation interval is set by `evaluation_interval`.
Question 47Prometheus Fundamentals
Which function should you use to predict the value of a gauge eight hours into the future based on its recent linear trend?
- predict_linear(node_filesystem_avail_bytes[6h], 8*3600) Correct answer.
- avg_over_time(node_filesystem_avail_bytes[6h])
- deriv(node_filesystem_avail_bytes[6h])
- holt_winters(node_filesystem_avail_bytes[6h], 0.5, 0.5)
Explanation
`predict_linear` fits a linear regression over the range vector and extrapolates to the given number of seconds ahead, which is exactly the forecasting use case. `deriv` returns only the current slope, `holt_winters` smooths rather than extrapolates forward, and `avg_over_time` just averages the window.
Question 48Prometheus Fundamentals
Which PromQL operator would you use to join two metrics on their shared labels while keeping only series present in both operands?
- `+`
- `unless`
- `or`
- `and` Correct answer.
Explanation
The set operator `and` returns series from the left side that have matching label sets on the right, effectively an intersection. `or` is a union, `unless` excludes matching series, and arithmetic operators perform value math rather than set intersection.
Question 49Prometheus Fundamentals
What does the `honor_labels` option in a scrape config control?
- Whether scraped labels win over conflicting labels added by relabeling Correct answer.
- Whether duplicate label names cause the scrape to fail
- Whether the `job` and `instance` labels are dropped entirely
- Whether label names are sorted alphabetically before storage
Explanation
With `honor_labels: true`, labels coming from the target take precedence, and conflicting server-side labels are renamed with an `exported_` prefix. The default false lets the server's own labels (such as `job` and `instance`) win. It has nothing to do with sorting or scrape failure on duplicates.
Question 50Prometheus Fundamentals
Which label matcher in a `metric_relabel_configs` rule would drop any series whose `__name__` begins with `go_`?
- `action: labeldrop` with `regex: go_.*`
- `action: replace` with `target_label: __name__`
- `action: keep` with `source_labels: [__name__]` and `regex: go_.*`
- `action: drop` with `source_labels: [__name__]` and `regex: go_.*` Correct answer.
Explanation
A `drop` action removes series whose source label matches the regex, so matching `__name__` against `go_.*` discards Go runtime metrics. `keep` does the inverse, retaining only matches. `replace` rewrites labels, and `labeldrop` removes label names rather than entire series.