Skip to main content
Prometheus stores metrics using a dimensional data model: each time series is identified by a metric name plus a set of key-value labels. Example metric samples:
Prometheus obtains these samples by scraping targets according to scrape configurations (jobs). In many deployments Prometheus scrapes itself on localhost:9090 and collects node-level metrics from exporters running on Kubernetes nodes. But what exactly does Prometheus receive when it scrapes a target? What does that HTTP response look like? Every scrape target exposes an HTTP endpoint—commonly /metrics. When Prometheus performs an HTTP GET against that path, the target returns a plain-text payload in the OpenMetrics format. This format is simple, human-readable, and intentionally not JSON or YAML. Here is a compact OpenMetrics response example:
Quick reference — the three primary line types in OpenMetrics: Prometheus parses the OpenMetrics payload on every scrape and stores the resulting time series in its TSDB.
OpenMetrics (the plain-text format shown above) is the expected format for endpoints that Prometheus scrapes. Many Kubernetes components (for example the kubelet and kube-apiserver) and many exporters expose metrics in exactly this format to be compatible with Prometheus.
This diagram illustrates Prometheus scraping Kubernetes components (GET /metrics) and ingesting OpenMetrics-formatted responses.
A simple diagram titled "OpenMetrics...OpenMetrics Everywhere" showing Prometheus scraping metrics from Kubernetes (GET /metrics) with kubelet and kube-apiserver listed. Arrows indicate Prometheus querying the Kubernetes endpoints for /metrics.
All targets listed in your scrape configuration must expose metrics in the OpenMetrics format so Prometheus can scrape and ingest them. A typical scrape_configs section in prometheus.yml may look like this:
Prometheus supports multiple metric types; here’s a concise summary:
Be careful exposing /metrics endpoints publicly. Metrics can contain sensitive metadata (hostnames, labels) and may become high-volume endpoints. Use network policies, authentication, or internal-only endpoints for production workloads.
Next steps:
  • Read the Prometheus documentation for scrape configuration and relabeling rules.
  • Explore PromQL to query and aggregate the time series Prometheus stores from these OpenMetrics responses.
Links and references: Following sections cover Prometheus metric types in more detail and introduce Prometheus’s built-in query language for exploring and aggregating this data.

Watch Video