Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Prometheus

Direct answer

Prometheus is a pull-based metrics system: it scrapes HTTP /metrics endpoints, stores time series in a local TSDB, evaluates rules and sends alerts to Alertmanager.

When to use this

Use it to collect metrics and alert on them.

First 30 seconds

1. Targets: curl -s localhost:9090/api/v1/targets | jq '.data.activeTargets[] | {job:.labels.job,health,lastError}'.

2. Config: promtool check config.

3. Rules: promtool check rules.

4. Reload: curl -X POST localhost:9090/-/reload (with --web.enable-lifecycle).

5. TSDB status page for cardinality.

Operational verification

service discovery → scrape → TSDB → rules → alerts → Alertmanager

Evidence · next step

Common failures are wrong discovery labels, scrape authentication/TLS issues, relabeling that drops targets or labels, cardinality explosions, remote-write backlog and dashboards querying a recording rule whose source expression changed. Preserve the first divergent observation and repeat the same bounded verification after remediation.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
What not to infer

Common failures are wrong discovery labels, scrape authentication/TLS issues, relabeling that drops targets or labels, cardinality explosions, remote-write backlog and dashboards querying a recording rule whose source expression changed.

Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines · Observability owns Prometheus scrape/query/rule behavior. Exported system metrics remain semantically owned by the source Domain.
Scope / prerequisiteUse it to collect metrics and alert on them.
What next?3 suggested next steps
Child topics (this level)3
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification workflow Verify boundary

Check target discovery, scrape URL, last scrape, duration and error before debugging dashboards. Query the raw metric/labels in PromQL, then inspect recording rules/remote-write if the expected series diverges between local Prometheus and downstream systems.

Step 2 Failure signatures and limits Narrow the fault

Common failures are wrong discovery labels, scrape authentication/TLS issues, relabeling that drops targets or labels, cardinality explosions, remote-write backlog and dashboards querying a recording rule whose source expression changed.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

test · 1
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Check target health at /targets first. Validate config with promtool before reloading. Local storage is not long-term or HA — use remote_write or Thanos/Mimir for that.

Key checks
  • curl -s localhost:9090/api/v1/targets | jq '.data.activeTargets[] | {job:.labels.job,health,lastError}' — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid
ReferenceWhat it is1 section · depth on demand

Operating model

Prometheus collects labeled time series primarily by scraping targets discovered through static or dynamic configuration. Exporters expose metrics for systems that do not natively speak the exposition format; PromQL evaluates series over time; recording rules precompute expressions for reuse/performance.

ReferenceHow it works1 section · depth on demand

In depth

Prometheus is the open-source metrics system most used for cloud-native and infrastructure monitoring. It scrapes metrics over HTTP from targets (exporters and instrumented applications), stores them in a time-series database, and evaluates PromQL queries and alerting rules.

ComponentRole
Prometheus serverScraping, storage, queries, rules
Exportersnode_exporter, snmp_exporter, blackbox_exporter, database exporters
AlertmanagerGrouping, routing, silencing alerts
Service discoveryKubernetes, file, Consul, cloud
Remote writeLong-term storage (Thanos, Mimir, VictoriaMetrics)
rate(node_network_receive_bytes_total{device="eth0"}[5m]) * 8
histogram_quantile(0.95, sum by (le) (rate(http_request_duration_seconds_bucket[5m])))
up == 0

Keep label cardinality under control, and use recording rules for expensive queries used in dashboards and alerts.

ReferenceImportant terms & boundaries1 section · depth on demand

Scope map

  • Pull/scrape model
  • Targets
  • Exporters
  • Service discovery
  • PromQL fundamentals
  • Recording rules
  • Federation/remote-write boundaries
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Prometheus Prometheus 2.45 or laterScrape job with static targets and a label.

Assumptions: Targets expose /metrics on port 9100 (node_exporter).

scrape_configs:
- job_name: node
  scrape_interval: 30s
  static_configs:
  - targets: ['app1:9100', 'app2:9100']
    labels: {env: prod}

Expected output

Prometheus Prometheus 2.45 or latercurl -s http://prometheus:9090/api/v1/targets?state=active | jq -r '.data.activeTargets[] | "\(.labels.instance) \(.health) \(.lastError)"'

Expected state: Every target is up with no last error.

app1:9100 up 
app2:9100 up
A target that is down shows the scrape error here (timeout, connection refused, TLS); the query up == 0 alerts on the same condition. Illustrative authored output: field layout matches the tool, values will differ in your environment.
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-29 · otherOpenTelemetry / Prometheus / Grafana ecosystem Prometheus current documentation

Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.

Basis: https://prometheus.io/docs/introduction/overview/ · confidence 92%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
prometheusPrometheus monitoringPromQLPrometheus scrape target
Embedded reference data

Quick lookup tables

Prometheus verification boundary matrix

A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Prometheus.

BoundaryInspectHealthy interpretationDo not infer
IntentPull/scrape modelIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeTargets / ExportersOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateService discoveryIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomePromQL fundamentalsThe original bounded check succeeds in the same time windowProduction correctness outside this scope
Depth when you need it

Deep reference

Design & tradeoffs

Scope

Exported system metrics remain semantically owned by the source Domain.

Confirmation

Confirm action

Continue?