Prometheus + Grafana interview questions

25 questions from the Prometheus + Grafana course, each with the correct answer and an explanation. Try to answer before you open the answer.

Metrics and Prometheus Foundations

1. Which signal is best for cheap, fast alerting on error rates?

  1. Traces only
  2. Logs only
  3. Metrics
  4. Screenshots
Show answer

Answer: Metrics

Aggregated numbers are cheap to evaluate.

Lesson: Metrics, Logs and Traces

2. How does Prometheus normally collect metrics?

  1. It pulls them by scraping HTTP endpoints
  2. Applications push every sample to it
  3. It reads log files
  4. It queries databases directly
Show answer

Answer: It pulls them by scraping HTTP endpoints

Pull model with service discovery.

Lesson: How Prometheus Works

3. What identifies a unique time series in Prometheus?

  1. The value
  2. The metric name only
  3. The scrape timestamp
  4. The metric name together with its full set of label values
Show answer

Answer: The metric name together with its full set of label values

Each label combination is a series.

Lesson: The Data Model

Metric Types and Instrumentation

4. Which type fits "number of jobs waiting in a queue"?

  1. Counter
  2. Gauge
  3. Histogram only
  4. Summary only
Show answer

Answer: Gauge

It goes up and down.

Lesson: Counters and Gauges

5. Why prefer histograms over summaries for multi-instance services?

  1. Summaries cannot record latency
  2. Histogram buckets can be aggregated across instances before computing percentiles
  3. Histograms need no buckets
  4. Summaries are not supported by Prometheus
Show answer

Answer: Histogram buckets can be aggregated across instances before computing percentiles

You cannot average percentiles.

Lesson: Histograms and Summaries

6. What do the RED metrics stand for?

  1. Requests, Exports, Disks
  2. Reads, Edits, Deletes
  3. Red, Easy, Done
  4. Rate, Errors, Duration
Show answer

Answer: Rate, Errors, Duration

A starting set for every service.

Lesson: Instrumenting an Application

Collecting Metrics

7. What does the up metric indicate?

  1. Whether the last scrape of a target succeeded (1) or failed (0)
  2. CPU usage
  3. Uptime in days
  4. The number of alerts
Show answer

Answer: Whether the last scrape of a target succeeded (1) or failed (0)

A built-in health signal.

Lesson: Scrape Configuration

8. Which exporter provides Linux host CPU, memory and disk metrics?

  1. kube-state-metrics
  2. blackbox_exporter
  3. node_exporter
  4. Alertmanager
Show answer

Answer: node_exporter

Host-level metrics.

Lesson: Exporters

9. When do metric_relabel_configs run?

  1. Only in Grafana
  2. Before target discovery
  3. After scraping, on the scraped series
  4. When alerts fire
Show answer

Answer: After scraping, on the scraped series

relabel_configs run before scraping.

Lesson: Service Discovery and Relabelling

PromQL Fundamentals

10. Which matcher selects labels matching a regular expression?

  1. =~
  2. ==
  3. !=
  4. ~~
Show answer

Answer: =~

!~ is the negated form.

Lesson: Selectors and Matchers

11. Why use rate() on a counter instead of graphing it directly?

  1. Graphing counters is not allowed
  2. Counters are always zero
  3. rate() converts gauges to counters
  4. Counters only grow; rate shows the per-second change and handles resets
Show answer

Answer: Counters only grow; rate shows the per-second change and handles resets

The speed is what matters.

Lesson: rate, irate and increase

12. What does sum by (route) (...) do?

  1. Removes the route label
  2. Adds series together, keeping only the route label
  3. Sorts by route
  4. Filters to one route
Show answer

Answer: Adds series together, keeping only the route label

by keeps the listed labels.

Lesson: Aggregation

Advanced PromQL and Recording Rules

13. Which label must be kept when aggregating buckets for histogram_quantile?

  1. instance
  2. le
  3. job
  4. __name__
Show answer

Answer: le

le identifies the bucket boundary.

Lesson: Percentiles With histogram_quantile

14. What does group_left enable?

  1. Removing all labels
  2. Sorting results
  3. Joining logs
  4. Many-to-one matching, where several left series match one right series
Show answer

Answer: Many-to-one matching, where several left series match one right series

Needed for info-metric joins.

Lesson: Binary Operators and Vector Matching

15. What is the main benefit of a recording rule?

  1. Expensive queries are precomputed, so dashboards and alerts are fast
  2. It deletes old data
  3. It sends notifications
  4. It discovers targets
Show answer

Answer: Expensive queries are precomputed, so dashboards and alerts are fast

Computed once, read many times.

Lesson: Recording Rules

Alerting

16. What does the for clause do in an alerting rule?

  1. Sets the scrape interval
  2. Repeats the notification
  3. Requires the condition to stay true for that long before firing
  4. Deletes the alert after that time
Show answer

Answer: Requires the condition to stay true for that long before firing

Filters brief blips.

Lesson: Alerting Rules

17. What does inhibition do in Alertmanager?

  1. Speeds up scrapes
  2. Deletes alert rules
  3. Suppresses some alerts while a related, more important alert is firing
  4. Creates dashboards
Show answer

Answer: Suppresses some alerts while a related, more important alert is firing

Reduces noise during incidents.

Lesson: Alertmanager

18. Which is the better paging alert?

  1. Checkout error ratio above the SLO burn threshold
  2. CPU above 70% on one node for 1 minute
  3. Disk 50% full
  4. A deployment started
Show answer

Answer: Checkout error ratio above the SLO burn threshold

Page on symptoms users feel.

Lesson: Designing Good Alerts

Dashboards With Grafana

19. Which panel type best shows a latency distribution over time?

  1. Text
  2. Stat
  3. Pie chart
  4. Heatmap
Show answer

Answer: Heatmap

Buckets over time.

Lesson: Data Sources and Panels

20. What does label_values(up, job) provide for a variable?

  1. The number of jobs
  2. The list of job label values found on the up metric
  3. A PromQL alert
  4. A new data source
Show answer

Answer: The list of job label values found on the up metric

Populates dropdown options.

Lesson: Variables and Dashboard Design

21. What does Grafana provisioning do?

  1. Scrapes metrics
  2. Loads data sources and dashboards from files at start-up
  3. Sends alerts to PagerDuty
  4. Compresses the TSDB
Show answer

Answer: Loads data sources and dashboards from files at start-up

Configuration as code.

Lesson: Dashboards as Code

Running Prometheus in Production

22. Which label is most dangerous for cardinality?

  1. region
  2. status_code
  3. http_method
  4. user_id
Show answer

Answer: user_id

Unbounded values create unbounded series.

Lesson: Cardinality

23. What is the standard way to keep alerts working if one Prometheus fails?

  1. Run two identical Prometheus servers and let Alertmanager deduplicate
  2. Increase the scrape interval
  3. Store data in Grafana
  4. Disable alerting rules
Show answer

Answer: Run two identical Prometheus servers and let Alertmanager deduplicate

Simple HA by duplication.

Lesson: Storage, Retention and Scaling

24. What does the S in the USE method stand for?

  1. Success
  2. Speed
  3. Saturation
  4. Storage
Show answer

Answer: Saturation

Utilisation, Saturation, Errors.

Lesson: RED and USE Methods

25. Which item belongs on a monitoring checklist?

  1. Sum counters before rate()
  2. Use user IDs as labels
  3. Paging alerts have runbook links
  4. Edit dashboards only by hand in production
Show answer

Answer: Paging alerts have runbook links

Actionable, maintainable monitoring.

Lesson: A Monitoring Checklist

← Back to the course