Skip to content
Novus Examples
prom2.9 KB

Prometheus Exposition — Counters and Gauges (prom)

The body a /metrics endpoint returns: five metric families with HELP and TYPE metadata across 27 labelled series — request counters by route and status, process and runtime gauges, per-target up values (one deliberately 0) and a business gauge. The baseline exposition-parser fixture.

Preview — first 40 linesprom
# HELP http_requests_total Total HTTP requests handled, by route and status.
# TYPE http_requests_total counter
http_requests_total{service="checkout-api",method="POST",route="/api/checkout",status="200"} 12394
http_requests_total{service="checkout-api",method="POST",route="/api/checkout",status="201"} 23435
http_requests_total{service="checkout-api",method="POST",route="/api/checkout",status="404"} 21049
http_requests_total{service="checkout-api",method="POST",route="/api/checkout",status="500"} 16164
http_requests_total{service="checkout-api",method="GET",route="/api/cart",status="200"} 10777
http_requests_total{service="checkout-api",method="GET",route="/api/cart",status="201"} 21751
http_requests_total{service="checkout-api",method="GET",route="/api/cart",status="404"} 516
http_requests_total{service="checkout-api",method="GET",route="/api/cart",status="500"} 8044
http_requests_total{service="checkout-api",method="GET",route="/api/catalog",status="200"} 7534
http_requests_total{service="checkout-api",method="GET",route="/api/catalog",status="201"} 9460
http_requests_total{service="checkout-api",method="GET",route="/api/catalog",status="404"} 4403
http_requests_total{service="checkout-api",method="GET",route="/api/catalog",status="500"} 23282
http_requests_total{service="checkout-api",method="GET",route="/api/orders",status="200"} 1860
http_requests_total{service="checkout-api",method="GET",route="/api/orders",status="201"} 6475
http_requests_total{service="checkout-api",method="GET",route="/api/orders",status="404"} 15379
http_requests_total{service="checkout-api",method="GET",route="/api/orders",status="500"} 13039
http_requests_total{service="checkout-api",method="GET",route="/healthz",status="200"} 13720
http_requests_total{service="checkout-api",method="GET",route="/healthz",status="201"} 15174
http_requests_total{service="checkout-api",method="GET",route="/healthz",status="404"} 19595
http_requests_total{service="checkout-api",method="GET",route="/healthz",status="500"} 3307
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes{service="checkout-api",instance="checkout-api-7d9f4c-2xk"} 418709504
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines{service="cart-api",instance="cart-api-58bd21-9qh"} 188
# HELP up 1 if the target is reachable, 0 otherwise.
# TYPE up gauge
up{job="checkout-api",instance="192.0.2.11:9090"} 1
up{job="cart-api",instance="192.0.2.12:9090"} 1
up{job="inventory-api",instance="192.0.2.21:9090"} 1
up{job="payments-api",instance="192.0.2.22:9090"} 1
up{job="notifier",instance="192.0.2.31:9090"} 0
# HELP shop_inventory_reserved Currently reserved stock units, by warehouse.
# TYPE shop_inventory_reserved gauge
shop_inventory_reserved{warehouse="wh-eu-1"} 1284
shop_inventory_reserved{warehouse="wh-eu-2"} 903

Specifications

Dialect
Prometheus text exposition 0.0.4
Families
5
Series
29
Counters
1
Gauges
4
Seed
7301
Has Timestamps
false
Down Target
notifier
Request Counter Total
247358

Testing contract

Expected to pass
Scenario
Scrape or parse the file and index the samples by family and label set.
Expected result
29 series parse into 5 families, up{job="notifier"} reads 0 while the other four targets read 1, and every family carries both HELP and TYPE metadata.

What is a .prom file?

A .prom file holds metrics in the Prometheus text exposition format, the same body a `/metrics` endpoint returns. Each metric family is introduced by `# HELP` and `# TYPE` comments and followed by one sample per line: a metric name, an optional brace-delimited label set, a value, and an optional millisecond timestamp. Counters, gauges, histograms (with `_bucket`, `_sum`, `_count` series and a `+Inf` bucket), and summaries with quantile labels all use this one grammar.

How to use this file

Use an example .prom file to test exposition-format parsers, scrapers, and the node_exporter textfile collector — checking label escaping, histogram bucket ordering and cumulative counts, and the handling of `NaN` and `+Inf` values.

How to use this file for testing

“Prometheus Exposition — Counters and Gauges (prom)” is a deterministic Novus Examples fixture for Observability, Time-series data, Config parsing. Structured and plain-text telemetry with known timestamps, levels, request identifiers, and error states for testing log ingestion, correlation, dashboards, and alert pipelines.

Documented properties for this file: seed 7301. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Telemetry fixtures use fixed trace IDs, span IDs, and timestamps so ingestion is reproducible run to run. Point your collector, parser, or query layer at the file and assert the documented span tree, metric families, or severity mix; service and host names are invented.

Generated by generation/observability.py. Free for any use, no attribution required — license.