Prometheus Interview Questions and Answers

Prometheus interview questions show up in DevOps, SRE, platform, and observability loops whenever teams own on-call dashboards and alert noise. Interviewers care whether you understand pull-based scraping, label cardinality traps, counter vs gauge semantics, when to use rate() vs irate(), how recording rules tame expensive queries, and how Alertmanager groups and routes pages—not whether you can spell PromQL function names from memory.

Below are 35 collapsible questions grouped by topic.

NOTE
Prep tip: Answer each technical question aloud first, then read What interviewers are testing to understand the hidden evaluation criterion. Use the explanation to learn the mechanism or troubleshooting sequence, then compare your response with A strong answer is. For PromQL and incident scenarios, practice the query or diagnostic path aloud before reading the full response.

Interview context and how to prepare

What do Prometheus interviews actually test?

Prometheus interviews test whether you can design reliable metrics, write correct PromQL, and operate alerting without melting the TSDB or waking people for noise.

Area What interviewers probe
Architecture Pull model, components, HA patterns
Data model Metric types, labels, naming
Ingestion Scrape configs, exporters, service discovery
Querying PromQL, aggregations, rate/irate
Rules Recording rules, alerting rules
Alerting Alertmanager routing, inhibition, silences
Operations Retention, cardinality, Kubernetes SD
Troubleshooting Missing metrics, scrape failures, alert storms
Role Emphasis
Junior DevOps Metric types, basic up, simple rate()
SRE Cardinality, SLO burn, alert design, federation
Platform engineer Operator-managed Prometheus, scrape relabeling

A strong answer is:

"Prometheus interviews test pull-based monitoring literacy—correct metric types, label discipline, PromQL that respects counters, and Alertmanager routing that reduces noise. I explain the data model before I write queries."

How does Prometheus compare to other monitoring tools?

What interviewers are testing: whether you answer how does prometheus compare to other monitoring tools with specific, production-grounded detail—not generic recall.

Aspect Prometheus Typical alternatives
Model Pull scrape from targets Push (StatsD, some APM), agent push
Storage Local TSDB per server Centralized SaaS or long-term store
Query language PromQL (built-in) SQL, proprietary DSL, LogQL for logs
Alerting Alertmanager (separate) Built-in or external paging
Best fit Kubernetes, microservices metrics Full APM traces, long-term analytics

Prometheus pairs with Grafana for dashboards and often Thanos/Cortex/Mimir for long-term storage—not a replacement for distributed tracing (Jaeger, Tempo) unless you add exemplars and tracing links.

A strong answer is:

"Prometheus is pull-based metrics with PromQL and local TSDB—great for Kubernetes and service RED/USE dashboards. I use tracing and log tools alongside it; Prometheus is not a full APM by itself."

What is a realistic 2–4 week Prometheus prep plan?
Week Focus Hands-on drill
1 Architecture, metric types, node_exporter Scrape localhost; graph node_cpu_seconds_total
2 PromQL: rate, sum by, histograms Dashboard CPU by instance; p95 latency from histogram
3 Alerting + Alertmanager Rule on disk usage; route by severity label
4 K8s SD, relabeling, cardinality kube-prometheus-stack; fix a high-cardinality label

Install via package or container; the learning is in scrape → query → alert, not the packaging path.

A strong answer is:

"Week one scrape and metric types; week two PromQL including histogram quantiles; week three Alertmanager; week four Kubernetes service discovery and relabel drops—hands-on beats flashcards."

How do beginner and advanced Prometheus expectations differ?
Topic Beginner Advanced
Counters "Use rate()" _created timestamps, resets, staleness
Labels Name instances Relabel to drop cardinality, honor_labels
Alerts Threshold on gauge Multi-window burn rates, runbooks
HA "Run two Prometheus" Dedup with Alertmanager, external labels
K8s Pod annotations kube-state-metrics vs cAdvisor vs app metrics
Ops Retention flag Compaction, WAL, remote write trade-offs

A strong answer is:

"Junior answers graph CPU. Senior answers talk cardinality budgets, alert routing, HA deduplication, and when federation or remote write fits multi-cluster designs."


Prometheus architecture

Describe Prometheus architecture.

What interviewers are testing: Whether you can trace metric collection from target discovery and scrape through local storage, rule evaluation, querying, and Alertmanager instead of merely naming Prometheus components.

Core components:

Component Role
Prometheus server Scrapes targets, evaluates rules, stores TSDB, serves PromQL API
Exporters Expose /metrics for third-party systems (node, blackbox, mysqld)
Pushgateway Short-lived batch jobs push metrics (exceptions to pull model)
Alertmanager Dedup, group, route, silence alerts from Prometheus
Service discovery Dynamic target lists (Kubernetes, Consul, DNS, etc.)

Data flows target → scrape → TSDB → Grafana/query API and firing alerts → Alertmanager → pager.

A strong answer is:

"Prometheus pulls metrics, stores them locally in TSDB, evaluates rules, and sends firing alerts to Alertmanager. Exporters adapt systems that don't natively speak Prometheus format."

Why is Prometheus pull-based?

What interviewers are testing: Whether you understand the operational consequences of pull—target health, service discovery, scrape ownership, and why Pushgateway is deliberately limited to special batch-job cases.

Pull advantages interviewers expect:

  • Control — Prometheus decides scrape interval and timeout per job
  • Health — up metric and scrape errors visible when targets disappear
  • Discovery — SD feeds targets; no central receiver to overload
  • Debugging — curl target:port/metrics reproduces what Prometheus sees

Pushgateway is mainly for service-level batch jobs that cannot be scraped. It should not become the default push path for services: pushed series have a lifecycle independent of the originating process and remain until deleted, so instance-level grouping can leave stale metrics behind.

A strong answer is:

"Pull lets Prometheus control scrape cadence and expose target health through up. I reserve Pushgateway for service-level batch jobs that cannot be scraped and manage pushed-series lifecycle explicitly."

How do you run Prometheus in high availability?

What interviewers are testing: whether you can explain how to run prometheus in high availability with the right steps, tools, and common failure modes.

Common pattern: two or more independent Prometheus servers scrape the same targets and evaluate the same rules. They send equivalent alerts to an Alertmanager cluster, which groups, routes, and deduplicates notifications.

Piece HA note
Prometheus Not one clustered database—duplicate scrapers
Alertmanager Mesh or clustering for dedup; at-least-once notification delivery—partitions can produce duplicate notifications rather than drop pages
External labels cluster, replica for federation and remote write
alert_relabel_configs Normalize or drop replica-specific labels so HA Prometheus instances send equivalent alert identities to Alertmanager
Long-term storage Thanos sidecar/object storage, Thanos Receive, Mimir/Cortex remote write—not one architecture

Avoid two Prometheus writing the same remote-write shard without planning—that is a different architecture.

Configure each Prometheus server with all Alertmanager peers rather than putting a load balancer between Prometheus and the Alertmanager cluster.

A strong answer is:

"HA means redundant Prometheus instances scraping the same targets and Alertmanager deduplicating—not a shared Prometheus raft cluster. I use alert_relabel_configs so replica labels do not prevent deduplication, and external labels for federation."


Metrics, labels, and naming

What are the Prometheus metric types?

What interviewers are testing: whether you define the prometheus metric types accurately and tie it to a real workflow—not acronym trivia.

Type Meaning Example
Counter Monotonic—only increases (resets on restart) http_requests_total
Gauge Up/down arbitrary value memory_usage_bytes, temperature
Histogram Observations in configurable buckets + _sum, _count (classic); or native histogram samples (Prometheus 3.x) Request latency distribution
Summary Client-side quantiles (less common in modern instrumentation) Legacy latency summaries

Classic histograms expose _bucket, _sum, and _count series. Native histograms (stable since Prometheus 3.8) store distributions as histogram samples and are increasingly preferred when client-library and ingestion support exist—they are more efficient, higher-resolution, and easier to aggregate across compatible histograms. Enable native-histogram scraping with scrape_native_histograms (starting in Prometheus 3.9, the older feature flag is a no-op). For Remote Write 1.x, enable send_native_histograms; Remote Write 2.0 carries native histograms by default.

Use rate() or increase() on counters, not raw counter values, for per-second graphs.

A strong answer is:

"Counters for totals, gauges for point-in-time levels, histograms for latency distributions. I never graph a raw counter—I rate it over a window that matches the scrape interval."

What are labels and why does cardinality matter?

What interviewers are testing: Whether you understand that every unique label set creates another time series and can prevent unbounded dimensions before they turn into memory, storage, and query problems.

Labels are key-value dimensions on a time series: {method="GET", status="500", instance="10.0.0.5:9100"}.

Cardinality = number of unique label combinations. High-cardinality labels (user_id, trace_id, unbounded path) explode TSDB memory and query latency.

Mitigations:

  • Fix instrumentation at the source first. As emergency containment, metric_relabel_configs can drop problematic metrics or carefully remove unnecessary labels before ingestion, but do not blindly collapse distinct series onto the same label set
  • Use logs or traces for per-request IDs

A strong answer is:

"Labels slice metrics but each new combination is a new time series. I keep labels bounded—no user IDs in metrics—and use metric_relabel_configs to drop accidental high-cardinality series before ingestion when instrumentation cannot be fixed immediately."

What are Prometheus metric naming conventions?

What interviewers are testing: whether you define prometheus metric naming conventions accurately and tie it to a real workflow—not acronym trivia.

Follow snake_case with unit suffixes:

  • _total suffix for counters (requests_total)
  • _seconds, _bytes, _ratio units in the name
  • process_, go_ prefixes from client libraries—do not rename blindly
text
http_requests_total{method="POST", handler="/api", code="200"}
node_memory_MemAvailable_bytes

Consistent naming lets recording rules and Grafana dashboards reuse queries across services.

A strong answer is:

"I use snake_case, _total on counters, and base units in the name. Consistent labels across services matter more than clever metric names."


Scraping and exporters

How does a Prometheus scrape configuration work?

What interviewers are testing: Whether you can explain what Prometheus actually does every scrape interval and distinguish target discovery, target relabeling, scrape failure, metric relabeling, and TSDB ingestion.

prometheus.yml defines scrape_configs—each job has targets or service discovery, interval, timeout, and relabel rules:

yaml
scrape_configs:
  - job_name: node
    scrape_interval: 15s
    static_configs:
      - targets: ['localhost:9100']

Prometheus hits http://target/metrics (default path), parses text exposition format, and appends samples to TSDB. The meta-metric up is 1 when the last scrape succeeded.

A strong answer is:

"Each scrape job lists targets or SD, interval, and relabel rules. I tune scrape_interval against cardinality and alert sensitivity—15s is common for infra, longer for slow-changing stats."

What are Prometheus exporters?

What interviewers are testing: whether you define prometheus exporters accurately and tie it to a real workflow—not acronym trivia.

Exporters are small HTTP servers that translate system state into Prometheus text format:

Exporter Exposes
node_exporter CPU, memory, disk, filesystem on Linux
blackbox_exporter Probe HTTP/TCP/ICMP from outside
mysqld_exporter, postgres_exporter Database stats
kube-state-metrics Kubernetes object counts (not cAdvisor)

Run one exporter per machine or shared service endpoint—avoid double-scraping the same instance label with conflicting jobs.

A strong answer is:

"Exporters adapt systems to Prometheus text format—node_exporter for hosts, blackbox for synthetic checks. I label jobs clearly so dashboards do not double-count instances."

What is relabeling in Prometheus?

What interviewers are testing: Whether you know which relabel stage changes targets, locally ingested samples, remotely written samples, or outgoing alerts so you solve the problem at the correct boundary.

Prometheus has several relabeling points. These four are especially important in interviews:

Config Acts on Typical purpose
relabel_configs Discovered targets Choose/modify scrape targets
metric_relabel_configs Scraped samples Control what enters local TSDB
write_relabel_configs Remote-write samples Control what is sent remotely
alert_relabel_configs Alerts Normalize alert labels before Alertmanager

Common relabel_configs actions: replace, keep, drop, labelmap.

Kubernetes service discovery exposes temporary __meta_kubernetes_* labels during target relabeling. Use them to select targets and map useful metadata such as namespace or service into persistent scrape labels—unused __meta_* labels are removed automatically; you do not drop them one by one.

A strong answer is:

"Target relabeling decides what gets scraped; metric relabeling controls what enters the local TSDB; write relabeling controls what is sent to remote storage; alert relabeling normalizes alert labels before Alertmanager."


Service discovery

What is Prometheus service discovery?

What interviewers are testing: whether you define prometheus service discovery accurately and tie it to a real workflow—not acronym trivia.

Service discovery dynamically builds target lists instead of static IPs.

SD mechanism Typical use
kubernetes_sd_config Pods, endpoints, services, nodes
dns_sd_config SRV records
consul_sd_config Consul catalog
file_sd_config JSON file for custom orchestration

SD emits targets with meta labels; relabeling converts them into scrape labels.

A strong answer is:

"Service discovery feeds targets from Kubernetes or Consul; relabeling turns meta labels into stable job and instance labels. Static configs are fine for tiny labs only."

How does Prometheus discover targets on Kubernetes?

What interviewers are testing: Whether you can distinguish application metrics, Kubernetes object-state metrics, and kubelet/container metrics and understand how service discovery or Operator CRDs turn them into scrape targets.

Common patterns:

Scrape source / pattern Typical metrics
Pods (role: pod) Application /metrics endpoints
Endpoints / EndpointSlices Service-backed targets
Nodes / kubelet Node and container runtime metrics
kube-state-metrics Kubernetes object state

Use PodMonitor and ServiceMonitor CRDs when Prometheus Operator manages config—same concepts, different YAML surface.

A strong answer is:

"On Kubernetes I use SD against pods or endpoints, often via Operator ServiceMonitors. kube-state-metrics gives object state; cAdvisor gives container usage—they answer different questions."


PromQL fundamentals

What is PromQL?

What interviewers are testing: whether you define promql accurately and tie it to a real workflow—not acronym trivia.

PromQL (Prometheus Query Language) selects and aggregates time series over a range or instant.

Construct Example
Selector http_requests_total{job="api",code="500"}
Range vector http_requests_total[5m]
Aggregation sum by (job) (rate(http_requests_total[5m]))
Functions rate, histogram_quantile, absent

Instant queries return one point per series; range queries return matrices for graphing.

A strong answer is:

"PromQL selects series, applies functions over time windows, and aggregates by labels. For rate(), I use a window comfortably larger than the scrape interval; in Grafana dashboards I normally prefer $__rate_interval over a tiny hard-coded range."

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

What interviewers are testing: whether you choose rate() for alerting windows over irate() for instant spikes on counters.

Both apply to counters over a range vector:

Function Behavior When to use
rate() Average per-second increase over the window Graphs, alerts, SLIs—smooths spikes
irate() Per-second rate using last two samples only Spot sudden spikes; noisier
promql
rate(http_requests_total[5m])
irate(http_requests_total[5m])

Use rate() for alerting and SLO burn—irate() can flap on single-sample blips.

A strong answer is:

"rate() averages counter growth over the window—stable for alerts. irate() reacts to the last two points—good for debugging spikes, bad as the only alert input."

How do you query histograms and percentiles?

What interviewers are testing: Whether you can compute percentiles from the histogram representation actually being exported and aggregate histograms without producing mathematically invalid latency results.

Classic histograms expose _bucket, _sum, and _count series. Native histograms store distributions as histogram samples and use different PromQL forms. Prometheus currently recommends native histograms when practical because they are more efficient, higher-resolution, and naturally aggregatable across compatible histograms.

Classic p95:

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

Native histogram p95 (when instrumentation supports it):

promql
histogram_quantile(0.95,
  sum(rate(http_request_duration_seconds[5m]))
)
  • Classic: le label defines bucket upper bound; +Inf bucket required; aggregate with sum by (le) before histogram_quantile
  • Native: prefer when client libraries and Prometheus 3.x support exist—more efficient aggregation across replicas

A strong answer is:

"Classic histograms need _bucket rates summed by le; native histograms use histogram samples directly. I know which form our instrumentation exports before writing quantile queries."

Explain common PromQL aggregations.

What interviewers are testing: whether you can teach common promql aggregations. clearly enough that a junior could follow your explanation.

Operator Meaning
sum Add values per grouping labels
avg, min, max Statistical aggregates
count Number of series in group

group_left and group_right are vector-matching modifiers for binary operations, not aggregation operators. They are used when joining vectors with many-to-one or one-to-many cardinality.

Example—error rate percentage:

promql
100 * sum(rate(http_requests_total{code=~"5.."}[5m]))
  / sum(rate(http_requests_total[5m]))

A strong answer is:

"I sum rates before dividing for ratios—never average percentages across instances without understanding the underlying counters."


Recording rules and alerting

What are recording rules?

What interviewers are testing: Whether you know when repeated expensive PromQL should become a precomputed series and understand the storage/cardinality cost of recording additional time series.

Recording rules precompute expensive PromQL into new time series on a schedule:

yaml
groups:
  - name: api_rules
    interval: 30s
    rules:
      - record: job:http_requests:rate5m
        expr: sum by (job) (rate(http_requests_total[5m]))

Benefits: faster dashboards, consistent queries, lower query load during incidents.

A strong answer is:

"Recording rules materialize heavy PromQL into new metrics. I use them when the same expensive query powers multiple dashboards or alerts."

How do Prometheus alerting rules work?

What interviewers are testing: whether you answer how do prometheus alerting rules work with specific, production-grounded detail—not generic recall.

Alerting rules evaluate PromQL; when true for for duration, Prometheus fires an alert to Alertmanager:

yaml
- alert: HighErrorRate
  expr: |
    sum(rate(http_requests_total{code=~"5.."}[5m]))
    / sum(rate(http_requests_total[5m])) > 0.05
  for: 10m
  labels:
    severity: warning
  annotations:
    summary: "High 5xx rate on {{ $labels.job }}"

for keeps an alert pending until the expression has remained true continuously for the configured duration. A brief recovery resets that pending period, which can reduce transient pages. Labels route in Alertmanager; annotations carry human text.

A strong answer is:

"Alerting rules are PromQL plus a for duration. I add severity labels for routing and put runbook links in annotations—not in the metric names."

What does Alertmanager do?

What interviewers are testing: Whether you separate alert evaluation in Prometheus from grouping, inhibition, silencing, deduplication, routing, and notification delivery in Alertmanager.

Alertmanager receives alerts from Prometheus and:

Feature Purpose
Grouping Batch related alerts (alertname, cluster)
Inhibition Suppress warning when critical fires
Routing Tree by severity, team, service
Silences / muting Maintenance windows
Receivers Email, Slack, PagerDuty, webhooks

HA Alertmanager peers gossip silence state and the notification log used for deduplication. During partitions they deliberately fail open, so duplicate notifications are preferable to missed pages.

A strong answer is:

"Alertmanager deduplicates and routes pages—I group by alertname and cluster, inhibit lower severities, and send criticals to PagerDuty only after grouping."

How do you reduce alert fatigue?

What interviewers are testing: whether you can explain how to reduce alert fatigue with the right steps, tools, and common failure modes.

Practices interviewers reward:

  • Alert on symptoms (SLO burn, user-visible latency)—not every causal metric
  • Use meaningful for windows
  • Runbooks in annotations; ownership labels per team
  • Inhibition between related alerts
  • Regular review of flapping, ignored, or unactionable alerts
  • absent() for missing critical scrapes instead of silent gaps

A strong answer is:

"Every page should be actionable. If operators routinely ignore an alert, I change or remove the rule rather than normalizing alert noise."


Federation, TSDB, and long-term storage

What is Prometheus federation?

What interviewers are testing: Whether you can distinguish hierarchical pull-based federation from remote-write/object-storage architectures used for long retention and global querying.

Federation lets one Prometheus scrape selected time series from another (/federate endpoint)—typically aggregates from many leaf Prometheus servers to a global view.

yaml
scrape_configs:
  - job_name: federate
    scrape_interval: 30s
    honor_labels: true
    metrics_path: /federate
    params:
      match[]:
        - '{job="kubernetes-pods"}'
        - 'sum:rate:http_requests:5m'
    static_configs:
      - targets: ['prometheus-dc1:9090']

Use for hierarchical setups; long-term/global architectures include remote write to systems such as Grafana Mimir/Cortex or Thanos Receive, and sidecar/object-storage architectures such as traditional Thanos—not remote write alone.

A strong answer is:

"Federation pulls selected series from downstream Prometheus—good for global aggregates. For long retention I use remote write to a compatible receiver or Thanos sidecar uploads—not infinite local retention."

How does the Prometheus TSDB work?

What interviewers are testing: Whether you understand how WAL, Head, blocks, compaction, retention, and series cardinality translate into memory, disk, startup, and query behavior.

The time-series database stores samples in blocks:

Concept Detail
WAL Write-ahead log for crash recovery
Head Active recent series/samples; protected by WAL, with head chunks also written/memory-mapped on disk
Compaction Merges blocks on disk
Retention --storage.tsdb.retention.time (default 15d)

High cardinality grows head block and compaction cost. Monitor prometheus_tsdb_head_series and scrape failures.

A strong answer is:

"TSDB uses WAL plus on-disk blocks with compaction. Retention is local and finite—I watch head series count and cardinality, not just disk bytes."

What is remote write and remote read?

What interviewers are testing: whether you define remote write and remote read accurately and tie it to a real workflow—not acronym trivia.

Remote write ships samples from the Prometheus WAL to a remote-write-compatible receiver (Grafana Mimir, Cortex, Thanos Receive, cloud vendors). The receiver may persist to object storage or its own TSDB—Prometheus does not remote-write directly to S3.

Thanos has multiple architectures: traditional sidecar uploads TSDB blocks to object storage; Thanos Receive accepts remote write. Do not teach Thanos as remote-write only.

Remote read lets Prometheus query a compatible external storage system through the remote-read protocol; whether it is used depends on the chosen long-term-storage architecture.

Trade-offs:

  • Enables long retention and global query
  • Adds network, queue backlog, and cost overhead—monitor prometheus_remote_storage_samples_pending
  • Remote write does not automatically move rule evaluation elsewhere. Prometheus can continue evaluating local alerts, while platforms such as Mimir/Cortex/Thanos may provide separate rule-evaluation architectures

A strong answer is:

"Remote write ships samples through WAL-backed queues for remote retention/querying; it does not itself move rule evaluation. Prometheus can keep scraping and alerting locally, while some remote platforms provide separate rule evaluators. I monitor pending samples and shard health when the destination falls behind."


Troubleshooting and scenarios

Scenario: Expected metrics disappeared from Grafana. What do you check?

What interviewers are testing: whether you walk through a structured, ordered investigation for expected metrics disappeared from grafana. what do you check—stating impact and first checks before deep tools.

Ordered checklist:

  1. Target up — up{job="..."} in Prometheus UI
  2. Scrape errors — Status → Targets page; TLS, DNS, timeout
  3. Label matchers — Dashboard query still matches after deploy label change
  4. Retention — Data aged out past TSDB retention
  5. Recording rule — Upstream rule failed or renamed
  6. Federation/remote — Leaf Prometheus stopped forwarding

A strong answer is:

"I start at Prometheus targets—up and last scrape error—then verify label matchers in the dashboard query. Missing data is usually scrape or label drift, not Grafana itself."

Scenario: Prometheus OOM after a deploy. Likely cause?

What interviewers are testing: whether you trace OOM to label cardinality explosions—unbounded user IDs or request paths in labels.

Classic story: new label user_id or url_path on HTTP metrics → series explosion → memory spike.

Response narrative:

  1. Confirm prometheus_tsdb_head_series jump
  2. Identify which metric gained series—for example topk(10, count by (__name__)({__name__=~".+"})) on active series (expensive during overload—use TSDB stats or tooling when possible)
  3. Inspect that metric's labels to find whether user_id, path, request_id, etc. caused the explosion
  4. Fix instrumentation first. For emergency containment, use metric_relabel_configs to drop the problematic metric/series, or carefully remove an unnecessary label only when doing so will not collapse distinct series into conflicting label sets
  5. Temporarily increase memory only after stopping the bleed

A strong answer is:

"OOM after deploy often means new high-cardinality labels. I find the metric, inspect which label values exploded, fix instrumentation, and use metric_relabel_configs for emergency containment—not just more RAM."

Scenario: Intermittent scrape timeouts on a Kubernetes job.

What interviewers are testing: whether you walk through a structured, ordered investigation for intermittent scrape timeouts on a kubernetes job.—stating impact and first checks before deep tools.

Causes and fixes:

Cause Fix
Target overload Reduce metrics exposed; split jobs
scrape_timeout too low Increase per job (less than interval)
Network policy Allow Prometheus namespace to pod port
TLS/connectivity overhead Check certificate validation, connection/network latency, proxying, and target performance; keep TLS where the security boundary requires it
Huge exposition Drop unused metrics at exporter

Check Prometheus logs and the target's /metrics response time with curl.

A strong answer is:

"Intermittent timeouts mean the target or network cannot answer in scrape_timeout—I measure /metrics size and latency, then tune interval, timeout, or metric count."

Scenario: Design an SLO alert for 99.9% availability.

What interviewers are testing: Whether you can translate a 99.9% availability objective into a defensible SLI, error budget, burn-rate calculation, and paging policy rather than setting an arbitrary availability threshold.

Multi-window burn rate pattern (conceptual):

  • Define good and valid events explicitly for the service—do not assume non-5xx equals success for every API (some 4xx may be failures; health checks may need exclusion)
  • SLI example: sum(rate(http_requests_total{handler!="/health",code!~"5.."}[window])) / sum(rate(http_requests_total{handler!="/health"}[window]))
  • Alert when error budget burns too fast over 1h and 6h windows
  • Route page only on fast burn; ticket on slow burn

Pair recording rules for SLI numerators/denominators. Document rollback criteria in annotations.

A strong answer is:

"I define good and valid requests for this service, then calculate good/valid or bad/valid—not a generic non-5xx shortcut. Multi-window burn alerts page only when budget loss is real."


Prometheus 3.x and production depth

What are native histograms?

What interviewers are testing: whether you define native histograms accurately and tie it to a real workflow—not acronym trivia.

Classic histogram Native histogram
Representation Many _bucket series + _sum + _count Histogram samples
Buckets Fixed boundaries chosen at instrumentation time Higher resolution; sparse exponential buckets
Aggregation Sum _bucket rates by le, then histogram_quantile Aggregate compatible native histograms more naturally
Status Universal Stable since Prometheus 3.8; preferred when libraries support it; enable scrape_native_histograms

Native histograms have been stable since Prometheus 3.8. Prometheus continues to advance through the 3.x series, while that stability point remains accurate. Enable native-histogram scraping with scrape_native_histograms (starting in Prometheus 3.9, the older feature flag is a no-op). For Remote Write 1.x, enable send_native_histograms; Remote Write 2.0 carries native histograms by default.

A strong answer is:

"Classic histograms multiply series per bucket; native histograms store the distribution more efficiently. I confirm client-library support and explicitly enable scrape_native_histograms before migrating quantile dashboards."

What is the difference between relabel_configs, metric_relabel_configs, and alert_relabel_configs?

What interviewers are testing: Whether you know which label transformation happens before scrape, before local ingestion, before remote write, and before Alertmanager—and therefore where to solve target selection, cardinality, remote-storage filtering, and HA alert identity problems.

Config Acts on Typical purpose
relabel_configs Targets Keep/drop targets; set instance from __address__
metric_relabel_configs Samples Drop expensive metrics or labels before local TSDB ingestion
write_relabel_configs Remote-write samples Control what is sent remotely
alert_relabel_configs Alerts Normalize or rewrite alert labels before Alertmanager; Alertmanager's routing tree performs the actual routing

A strong answer is:

"Target relabeling decides what gets scraped; metric relabeling decides what gets stored; write relabeling filters remote write; alert relabeling shapes alert identity before Alertmanager routes and deduplicates."

What are staleness and stale markers?

What interviewers are testing: whether you define staleness and stale markers accurately and tie it to a real workflow—not acronym trivia.

When a previously scraped time series disappears—target removed, pod replaced, label set changes—Prometheus marks samples stale so old values do not appear indefinitely as current data in instant queries.

Relevant scenarios:

  • Kubernetes pod churn
  • Target dropped from service discovery
  • absent() alerts when expected series vanish
  • Gaps or flat lines in graphs after deploys

A strong answer is:

"Stale markers prevent ghost data after a target goes away. I use absent() for critical series and interpret sudden gaps as deploy or SD changes—not always 'no traffic.'"

What is remote write backpressure and how do you monitor it?

What interviewers are testing: Whether you understand that remote write is an asynchronous WAL-backed queue and can detect when the receiver is falling behind before backlog becomes resource pressure or data loss.

Remote write reads from the WAL into dynamically sharded queues and sends asynchronously. If the remote endpoint is slower than ingestion, pending samples grow, increasing memory and CPU pressure; WAL retention can become a concern.

Prometheus retries remote-write failures from WAL-backed queues, but if the remote endpoint remains unavailable long enough—official guidance notes more than roughly two hours—WAL compaction can eventually remove unsent samples, so sustained backlog is a durability issue, not only a memory issue.

Monitor:

  • prometheus_remote_storage_samples_pending
  • Failed and retried sends per shard
  • Remote-write queue length and throughput

A strong answer is:

"Remote write is asynchronous through WAL-backed queues. I monitor pending samples and shard failures—if the destination stays down long enough, WAL compaction can discard unsent data, so backlog is a durability risk as well as a resource problem."

What scrape limits protect Prometheus from bad targets?

What interviewers are testing: whether you answer what scrape limits protect prometheus from bad targets with specific, production-grounded detail—not generic recall.

Per-scrape controls limit damage from one broken exporter or instrumentation change:

Limit Protects against
sample_limit Too many samples per scrape
target_limit Too many discovered targets after relabeling
label_limit Too many labels per sample
label_name_length_limit Absurd label names
label_value_length_limit Huge label values
body_size_limit Reject an oversized uncompressed scrape response; currently experimental

A strong answer is:

"I use sample, label, body-size, and target limits on risky jobs so one exporter or discovery mistake cannot overwhelm Prometheus. Limits complement instrumentation reviews; they do not replace them."


On-site Prometheus interview prep


References

Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with more than 15 years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, networking, and security, delivering robust and efficient solutions for diverse projects.

  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security
  • Cloud Computing
  • Kubernetes
  • Linux
  • Ansible (software)