Skip to content

Commit

Permalink
Document InfluxDB v2 support
Browse files Browse the repository at this point in the history
Support was added in Micrometer 1.7.0-M1.

Resolves gh-154
  • Loading branch information
shakuzen committed Mar 18, 2021
1 parent 930ea19 commit b074da7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/docs/implementations/influx.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Jon Schneider <jschneider@pivotal.io>
:sectnums:
:system: influx

The InfluxData suite of tools supports real-time stream processing and storage of time-series data. It supports downsampling, automatically expiring and deleting unwanted data, as well as backup and restore. Analysis of data is done via a SQL-like query language.
The InfluxData suite of tools supports real-time stream processing and storage of time-series data. It supports downsampling, automatically expiring and deleting unwanted data, as well as backup and restore.

Since Micrometer 1.7, the InfluxMeterRegistry supports the 1.x InfluxDB API as well as the v2 API.

== Configuring

Expand Down Expand Up @@ -53,6 +55,8 @@ InfluxConfig config = new InfluxConfig() {
MeterRegistry registry = new InfluxMeterRegistry(config, Clock.SYSTEM);
----

To ship metrics to InfluxDB 2.x, make sure to configure the `org` and `bucket` to write the metrics to, as well as the authentication `token`.

`InfluxConfig` is an interface with a set of default methods. If, in the implementation of `get(String k)`, rather than returning `null`, you instead bind it to a property source, you can override the default configuration. For example, Micrometer's Spring Boot support binds properties prefixed with `management.metrics.export.influx` directly to the `InfluxConfig`:

[source, yaml]
Expand Down

0 comments on commit b074da7

Please sign in to comment.