What is Prometheus, and what is its data model? [Basic]
Answer
Prometheus is an open-source monitoring and alerting system built around a time-series data model. Each sample belongs to a metric name plus a set of labels, and PromQL is used to query and aggregate those series.
Technical explanation
Prometheus scrapes metrics over HTTP, stores them in a local TSDB, evaluates rules, and sends alerts to Alertmanager.
The data model is dimensional: labels such as job, instance, namespace, pod, method, and status allow slicing and aggregation.
It is strong for metrics and alerting, but long-term retention and global querying often require systems such as Thanos, Cortex, or Mimir.
Hands-on example
Minimal scrape config:
scrape_configs:
- job_name: 'checkout'
static_configs:
- targets: ['checkout.default.svc:9100']Then query: up{job='checkout'} and rate(http_requests_total{job='checkout'}[5m]).
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Observability interview questions
- What is a time series in Prometheus, and how is it identified (metric name plus labels)? [Basic]
- What is the difference between a symptom-based and a cause-based alert, and which is better? [Basic]
- What are the Prometheus metric types (counter, gauge, histogram, summary)? [Basic]
- Why are multi-window, multi-burn-rate alerts better than a single threshold? [Basic]
- What is the difference between a counter and a gauge? [Basic]
- What is a burn rate, and how do you alert on it? [Basic]
- How does Prometheus collect metrics — what is the pull model and scraping? [Basic]
- What is a scrape target, and how does service discovery find them? [Basic]