Prometheus FAQs for DevOps Interviews: Quick Answers (2027)

40 Prometheus FAQs with short answers for DevOps interviews: pull model, metric types, default ports, 15-day retention, PromQL, Alertmanager, HA.

Sep 13, 2025 - 14:48
Nov 7, 2026 - 10:04
 0  86
Prometheus FAQs for DevOps Interviews: Quick Answers (2027)

Prometheus FAQs in DevOps interviews are short factual checks: what Prometheus is, how the pull model works, the four metric types, default ports, retention, what Alertmanager does, and how labels affect cardinality. Interviewers use them as a warm-up before deeper rounds, so a clear one or two sentence answer matters more than length. This page gives 40 quick answers grouped by level.

Every fact was checked against the official Prometheus documentation at prometheus.io in November 2026. For full explanations, read our 80+ Prometheus interview questions and answers, which is the main guide in this series. This page is the fast revision sheet: read it the night before, or the hour before, an interview.

Key takeaways

  • Prometheus is an open source monitoring system and time series database that scrapes metrics over HTTP from targets it discovers.
  • Remember four default ports: 9090 for the Prometheus server, 9093 for Alertmanager, 9100 for node_exporter and 9091 for the Pushgateway.
  • Local retention defaults to 15 days unless you set --storage.tsdb.retention.time or --storage.tsdb.retention.size.
  • The four metric types are counter, gauge, histogram and summary. Apply rate() to counters, never to gauges.
  • Prometheus evaluates alerting rules; Alertmanager groups, deduplicates, silences and routes the resulting notifications.
  • Most production problems come from label cardinality, so every label value set creates a new series.

How this FAQ differs from the other Prometheus pages

PageFormatUse it when
This FAQ40 one-paragraph answersYou need fast recall of facts and definitions
80+ Prometheus questionsFull answers with examplesYou are learning the topic properly
Prometheus engineer tasksPromQL and YAML exercisesThe round includes a live query or config task
Scenario-based questionsOn-call troubleshooting drillsYou are interviewing for SRE or on-call roles
Advanced questionsTSDB internals and scalingYou are a senior or platform candidate

Prometheus FAQs for freshers

1. What is Prometheus?

Prometheus is an open source systems monitoring and alerting toolkit that stores metrics as time series, identified by a metric name and key-value labels. It was started at SoundCloud in 2012 and joined the Cloud Native Computing Foundation in 2016 as its second hosted project after Kubernetes. It is a CNCF graduated project.

2. What does "pull model" mean in Prometheus?

Prometheus scrapes targets: it sends an HTTP request to each target's metrics endpoint (usually /metrics) on a schedule set by scrape_interval. The application does not push data to the server. Because the server initiates scrapes, it knows when a target is down, which it records in the up metric.

3. What is a time series in Prometheus?

A stream of timestamped sample values that share one metric name and one exact set of labels. http_requests_total{method="GET",code="200"} and http_requests_total{method="POST",code="200"} are two different series.

4. What are the four metric types?

Counter, gauge, histogram and summary. The table gives the one-line difference.

TypeBehaviourExample
CounterOnly goes up, resets to zero on restartRequests served, errors
GaugeGoes up and downMemory in use, queue length
HistogramCounts observations in configurable buckets, plus _sum and _countRequest duration
SummaryCalculates quantiles on the client, plus _sum and _countRequest duration where cross-instance aggregation is not needed

5. What is an exporter?

A process that reads metrics from a system that does not expose Prometheus format by itself and translates them into it. node_exporter for Linux hosts, blackbox_exporter for probing endpoints and mysqld_exporter for MySQL are common examples.

6. What are the default ports?

The Prometheus project keeps a default port allocation list on its GitHub wiki. The ones interviewers ask about most are:

ComponentDefault port
Prometheus server9090
Pushgateway9091
Alertmanager9093 (9094 for cluster gossip)
node_exporter9100
blackbox_exporter9115

7. What is PromQL?

The Prometheus Query Language. It selects and aggregates time series and is used in the expression browser, in Grafana panels, and in recording and alerting rules.

8. What is the difference between an instant vector and a range vector?

An instant vector holds one sample per series at a single point in time, for example up. A range vector holds a set of samples per series over a time window, for example http_requests_total[5m]. Functions such as rate() take a range vector and return an instant vector.

9. What does rate() do?

It calculates the per-second average increase of a counter over the given window and handles counter resets. rate(http_requests_total[5m]) gives requests per second averaged over five minutes.

10. What is the main configuration file called?

Usually prometheus.yml, passed with --config.file. It holds the global settings, rule_files, alerting (Alertmanager targets) and scrape_configs.

global:
  scrape_interval: 15s
rule_files:
  - "rules/*.yml"
scrape_configs:
  - job_name: node
    static_configs:
      - targets: ["10.0.0.5:9100"]

11. What is a job and what is an instance?

An instance is one endpoint you can scrape, usually a host and port. A job is a collection of instances with the same purpose. Prometheus attaches job and instance labels to every scraped series automatically.

12. What is Alertmanager?

A separate component that receives alerts from Prometheus servers and handles deduplication, grouping, inhibition, silencing and routing to receivers such as email, Slack, PagerDuty or a webhook.

13. Does Prometheus store logs or traces?

No. Prometheus stores numeric metrics. Logs go to tools such as Loki or Elasticsearch and traces to systems such as Jaeger or Tempo. Our post on observability vs traditional monitoring explains how the three signals fit together.

14. How do you check whether a target is up?

Query up. A value of 1 means the last scrape succeeded and 0 means it failed. The Targets page in the web UI (Status, then Targets) shows the last error for each target.

Prometheus FAQs for 2 to 5 years of experience

15. What is the default retention period?

15 days. The documentation states that if neither --storage.tsdb.retention.time nor --storage.tsdb.retention.size is set, retention time defaults to 15d. If both are set, whichever limit triggers first applies.

16. How does Prometheus store data on disk?

Incoming samples go to an in-memory head block protected by a write-ahead log (WAL) in the wal directory. Data is cut into two-hour blocks, which background compaction merges into larger blocks of up to 10 percent of the retention time or 31 days, whichever is smaller.

17. What is a recording rule?

A rule that evaluates a PromQL expression on a schedule and saves the result as a new series. Teams use recording rules to precompute expensive queries that dashboards and alerts read often.

18. What is an alerting rule?

A PromQL condition with a name, optional for duration, labels and annotations. When the expression returns results for longer than for, the alert moves from pending to firing and Prometheus sends it to Alertmanager.

groups:
  - name: node
    rules:
      - alert: InstanceDown
        expr: up == 0
        for: 5m
        labels:
          severity: page
        annotations:
          summary: "{{ $labels.instance }} has been down for 5 minutes"

19. What is the difference between rate() and irate()?

rate() averages over all samples in the window and suits alerts and slow-moving graphs. irate() uses only the last two samples, so it reacts faster but is noisy. Prefer rate() in alerting rules.

20. When would you use the Pushgateway?

For short-lived batch jobs that finish before Prometheus can scrape them. The documentation advises against using it to turn Prometheus into a push system for long-running services, because the Pushgateway never forgets a series unless you delete it and it becomes a single point of failure.

21. What is service discovery?

The way Prometheus finds targets automatically instead of listing them in static_configs. Built-in mechanisms include kubernetes_sd_configs, ec2_sd_configs, consul_sd_configs, file_sd_configs and dns_sd_configs, among others.

22. What is relabeling?

Rules that rewrite, keep or drop labels and targets. relabel_configs runs before the scrape and works on targets; metric_relabel_configs runs after the scrape and works on the samples, which makes it the place to drop expensive series.

23. What is cardinality and why does it matter?

The number of unique series. Each new label value creates a new series that uses memory and disk. Putting user IDs, request IDs or full URLs in labels can multiply series counts and exhaust memory. The documentation's naming guidance warns against high-cardinality labels.

24. How do you calculate a percentile from a histogram?

With histogram_quantile() over the rate of the bucket series, keeping the le label:

histogram_quantile(0.95, sum by (le) (rate(http_request_duration_seconds_bucket[5m])))

25. Histogram or summary: which one should you choose?

Choose a histogram when you need to aggregate across instances or change the quantile later, since buckets can be summed. A summary computes quantiles in the client, and those quantiles cannot be meaningfully averaged across instances.

26. How do you validate configuration before a reload?

Run promtool check config prometheus.yml and promtool check rules rules.yml. Rule unit tests run with promtool test rules.

27. How do you reload configuration without a restart?

Send SIGHUP to the process, or send an HTTP POST to /-/reload if the server was started with --web.enable-lifecycle.

28. What does for do in an alerting rule?

It makes Prometheus wait until the condition has been true on consecutive evaluations for that duration before firing. It filters out short spikes and flapping targets.

Prometheus FAQs for senior engineers

29. How do you make Prometheus highly available?

Run two or more identical Prometheus servers scraping the same targets and point both at an Alertmanager cluster. Alertmanager deduplicates the duplicate alerts. For a global query view and long-term storage, add Thanos, Cortex or Grafana Mimir.

30. What is remote write?

A feature that streams samples from Prometheus to a remote endpoint as they are ingested, configured under remote_write. Long-term storage systems such as Thanos Receive, Mimir and many managed services accept it.

31. What is federation?

A Prometheus server scraping selected series from another server's /federate endpoint. It suits pulling aggregated series up to a global server, not copying all raw data.

32. What is agent mode?

A mode started with --agent that scrapes and forwards data through remote write but does not run local queries, rules or long-term storage. It suits edge clusters that send everything to a central store.

33. How does Alertmanager grouping work?

The route's group_by labels decide which alerts are batched into one notification. group_wait, group_interval and repeat_interval control how long to wait before the first message, before sending updates and before repeating.

34. What is inhibition?

An Alertmanager rule that mutes some alerts while another alert is firing, for example suppressing every service alert in a data centre while a "datacenter unreachable" alert is active.

35. How do you find which metrics use the most series?

Open the TSDB Status page in the web UI, which lists the metric names and labels with the most series, or query topk(10, count by (__name__) ({__name__=~".+"})) on a test server. Then drop or aggregate with metric_relabel_configs.

36. How do you secure Prometheus endpoints?

The server supports TLS and basic authentication through a web configuration file passed with --web.config.file. Many teams also put it behind a reverse proxy, restrict network access, and keep --web.enable-admin-api and --web.enable-lifecycle off unless needed.

Scenario FAQs

37. A target shows "context deadline exceeded". What is the first check?

The scrape took longer than scrape_timeout. Check whether the endpoint is slow or exposes too many series, then raise the timeout or reduce the payload. The scrape_duration_seconds metric shows the trend.

38. An alert expression returns data but no notification arrives. Where do you look?

Check the Alerts page in Prometheus for the firing state, then the Alertmanager UI for silences, inhibitions and the route that matched. amtool config routes test shows which receiver a label set reaches.

39. Memory on the Prometheus server keeps growing. What do you suspect?

A cardinality increase, usually a new label with unbounded values or a deployment that changes a label on every restart. Compare head series counts on the TSDB Status page before and after the change.

40. A graph of rate() shows gaps. Why?

The range window is too short for the scrape interval. A window should cover at least several scrapes; with a 15 second interval, [1m] or more is safer than [15s].

Practise the answers, then go deeper

Quick answers get you through the screening round. For the hands-on parts, set up Prometheus with Grafana using our Prometheus and Grafana walkthrough, configure the alerts in 10 monitoring alerts every DevOps team should configure, and read the observability tools overview to see where Prometheus sits among other tools.

If you want guided labs on Prometheus, Alertmanager and Grafana, our Prometheus and Grafana training runs in the Kharadi, Pune classroom and live online across India.

Frequently asked questions

What port does Prometheus run on?

The Prometheus server listens on 9090 by default. Alertmanager uses 9093 and node_exporter uses 9100.

How long does Prometheus keep data?

15 days by default. Change it with --storage.tsdb.retention.time or cap disk use with --storage.tsdb.retention.size.

Is Prometheus push or pull?

Pull. The server scrapes HTTP endpoints. The Pushgateway exists only for short-lived batch jobs.

What are the Prometheus metric types?

Counter, gauge, histogram and summary.

What is the difference between Prometheus and Alertmanager?

Prometheus collects metrics and evaluates alerting rules. Alertmanager groups, silences and routes the alerts Prometheus sends.

Can Prometheus store data long term?

Local storage is designed for a single node. For long-term or global storage, send data through remote write to systems such as Thanos or Grafana Mimir.

How do I check Prometheus config for errors?

Run promtool check config prometheus.yml before reloading.

Official references

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.