Skip to content

SinksPrometheus

Brian L. Troutwine edited this page Dec 4, 2017 · 3 revisions

The prometheus sink accepts telemetry and is intended to be a scrape interface for used for prometheus aggregation server. The prometheus sink supports both the Text and Binary export protocols.

Data Model

The data model of the prometheus sink is particular. The aggregation methods discussed in Data Model map onto their Prometheus counterparts like so:

  • SET -> gauge
  • SUM -> counter
  • HISTOGRAM -> histogram
  • SUMMARIZE -> summary

SET, SUM and HISTOGRAM values persist indefinately. SUMMARIZE telemetry are maintained in a moving window whose width is defined by the retain_limit option. See configuration for more details on this option.

Configuration

The prometheus sink configuration options are as follows:

  • port :: the port to start the prometheus HTTP server on [default: 8086]
  • host :: the host to bind the prometheus HTTP server to [default: "127.0.0.1"]
  • capacity_in_seconds :: the total number of seconds of SUMMARIZE telemetry to maintain [default: 600]

The SUMMARIZE telemetry are maintained in a sliding window, summed together when Prometheus performs a scrape and with older values being discarded only on insertion of new values. The width of this window is capacity_in_seconds seconds.

Example

[sinks]
  [sinks.prometheus]
  host = "cernan.example.org"
  port = 8086
  retain_limit = 60

This enables the prometheus sink, listening at "cernan.example.org" on port 8086 with any SUMMARIZE metrics being maintained in a 60 second window.