What are the useful Prometheus HTTP API endpoints?
IntermediateConceptPrometheus Architecture
Answer
curl -s 'localhost:9090/api/v1/query?query=up'
curl -s 'localhost:9090/api/v1/query_range?query=up&start=2026-11-01T00:00:00Z&end=2026-11-01T01:00:00Z&step=60s'
curl -s localhost:9090/api/v1/targets | jq '.data.activeTargets[] | {job:.labels.job, health}'
curl -s localhost:9090/api/v1/rules
curl -s localhost:9090/api/v1/alerts
curl -s localhost:9090/api/v1/status/tsdb # top series by metric and label
curl -s localhost:9090/api/v1/label/__name__/values
/api/v1/status/tsdb is the first stop for cardinality investigations.
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced