liveBook · Manning

Prometheus exposition format

As explained in Learn Docker in a Month of Lunches, Second Edition

Prometheus format is a text-based exposition format in which named metrics are represented with values, help text, and data types.

Prometheus exposition format is a text-based representation of metrics. Each metric has a name and value, with help text describing it and a data type identifying its kind. section 9.1

Use the format in a container-monitoring workflow:

  • Enable Docker Engine metrics and publish them on port 9323. section 9.1
  • Browse to http://localhost:9323/metrics to inspect the exposed output. section 9.1
  • Let Prometheus periodically collect the values, add timestamps, store previous collections, and support queries over time. section 9.1

Docker metrics endpoint

Configure Docker with "metrics-addr": "0.0.0.0:9323", then inspect the sample metrics exposed through its HTTP API.

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Defines the text structure and collection workflow but stops short of specifying the complete format grammar.
Examples
Uses Docker’s port 9323 endpoint, the metrics-addr setting, and sample metrics exposed through the HTTP API.
What it assumes
Assumes Docker configuration and basic container operation, while introducing metric exposition and Prometheus collection.
What you can do after
Operate Docker metrics export and verify the resulting endpoint before connecting Prometheus.
How it connects
Connects Docker Engine metrics, HTTP APIs, Prometheus collection, timestamps, storage, and metric queries.

Also explained in

Compare how 2 books explain Prometheus exposition format →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.