Documentation

Prometheus endpoints support in InfluxDB

This page documents an earlier version of InfluxDB. InfluxDB v2.0 is the latest stable version.

Prometheus remote read and write API support

Note: The Prometheus API Stability Guarantees states that remote read and remote write endpoints are features listed as experimental or subject to change, and thus considered unstable for 2.x”. Any breaking changes will be included in the InfluxDB release notes.

InfluxDB support for the Prometheus remote read and write API adds the following two HTTP endpoints to the InfluxDB httpd handler:

  • /api/v1/prom/read
  • /api/v1/prom/write

Additionally, there is a /metrics endpoint configured to produce default Go metrics in Prometheus metrics format.

Configuration

To enable the use of the Prometheus remote read and write API with InfluxDB, you need to add URL values to the following settings in the Prometheus configuration file:

Example of Prometheus endpoint configuration

# Remote write endpoint configuration (for Graphite, OpenTSDB, or InfluxDB).
remote_write:
* url: "http://localhost:8086/api/v1/prom/write?u=paul&p=foo&db=prometheus"
# Remote read endpoint configuration (for InfluxDB only at the moment).
remote_read:
* url: "http://localhost:8086/api/v1/prom/read?u=paul&p=foo&db=prometheus"

You can use query parameters to pass in an optional database user and password.

Note: Including the password in the config file is not ideal. See this Prometheus issue: “Support for environment variable substitution in configuration file”.


New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: