OBSERVABILITY PLATFORM
Prometheus and OpenMetrics
Prometheus and OpenMetrics ingestion
You can configure the Collector to accept text-exposition payloads in either Prometheus or OpenMetrics formats.
To enable the Prometheus and OpenMetrics ingestion for the Collector, add
importPrometheus
and importOpenMetrics
under the push
YAML collection in the
Collector configuration:
push:
importPrometheus:
enabled: true
importOpenMetrics:
enabled: true
Traffic is served from /import/openmetrics
and /import/prometheus
from the
listenAddress
, which defaults to 0.0.0.0:3030
.
# Importing an untyped metric in OpenMetrics format.
curl -d $'test_metric_import 100\n# EOF' -X POST http://localhost:3030/import/openmetrics
# Same import, but in Prometheus format.
curl -d 'test_metric_import 100' -X POST http://localhost:3030/import/prometheus
Additional query parameters:
extra_label
: pass in repeated, default labels for all time series, formatted asname=value
.default_timestamp
: provide a default timestamp in Unix milliseconds for any time series that doesn't have one. Otherwise, the value defaults toNow()
on the Chronosphere backend.
The following command includes both of these additional query parameters:
curl -d 'test_metric_import 100' -X POST \
http://localhost:3030/import/prometheus?extra_label=svc%3Dauth&extra_label=team%3Dbar&default_timestamp=1669701600