What is a .prom file?
text/plain
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 a .prom 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.
Download example .prom files
- 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.
- Prometheus Exposition — Cumulative Histogram (prom)A classic Prometheus histogram: eleven finite le buckets plus +Inf, with monotonically non-decreasing cumulative counts and matching _sum and _count series. The fixture for bucket ordering, cumulative arithmetic and histogram_quantile interpolation.
- Prometheus Exposition — Summary with and without Quantiles (prom)Two summary families — one exposing four client-side quantiles including quantile="1" for the observed maximum, and one exposing only _sum and _count, which is legal and common. Summaries cannot be re-aggregated across instances, and this fixture is where that gets tested.
- Prometheus Exposition — Label Value Escaping Edge Cases (prom)Ten series whose label values contain the characters that break naive line splitting — escaped quotes and backslashes, an escaped newline, non-ASCII text, braces, commas, equals signs, a leading hash and significant whitespace. The exposition format defines exactly three escapes and this file uses all of them.
- Prometheus Exposition — NaN, Infinities and Float Limits (prom)Every numeric form the exposition format permits: NaN, +Inf and -Inf, negative zero, denormal and maximum doubles, and a uint64 counter beyond the exact range of a double. Parsers that route values through a JSON number or a 32-bit float fail on this file specifically.
- Prometheus Exposition — Explicit and Skewed Timestamps (prom)Samples with explicit millisecond timestamps alongside samples without any, including one an hour stale and one an hour in the future. Optional timestamps are the part of the exposition format most parsers get wrong, and out-of-window samples are what a scraper must reject rather than backfill.
- Prometheus Exposition — 2,000-Series Cardinality Explosion (prom)A single metric family blown up to 2,000 series by two unbounded labels — customer_id and session_id — which is the most common way a metrics bill and a TSDB both fall over. A load fixture for scrape parsing and a worked example for cardinality-limit rules.
- Prometheus Exposition — Duplicate Series, Intentionally Invalid (prom)One label set exposed twice, a second pair that is only a duplicate once labels are sorted, and a repeated HELP line. Intentionally invalid: a scrape must fail rather than let last-write-wins decide which of two values for the same series survives.
and 8 more in the library.