question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InfluxDB 2.0 API support

See original GitHub issue

Looks like the ‘direct’ api for 1.x will not work with 2.0. Thankfully the changes seem pretty small, for comparison 1.x write api and 2.x write api

The body remains the same (line protocol), only major change I believe is for auth (though user + password is probably also possible), instead of db query param there is org and bucket. There is also an official java client library, though I am not sure if micrometer needs all the functionality it provides.

Sorry if there is already something in place to configure micrometer so it works with influxdb 2.0 (directly), but I did not find it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:24 (17 by maintainers)

github_iconTop GitHub Comments

9reactions
coditoricommented, Dec 6, 2020

Hi guys, is there any update? I wonder why this issue is closed 😐

3reactions
shakuzencommented, Mar 16, 2021

@vadim-hleif you will have to make an InfluxConfig bean with the configuration you want until we update the configuration properties support in Spring Boot to know about the new properties.

@Bean
InfluxConfig influxConfig() {
    return new InfluxConfig() {
        @Override
        public String get(String key) {
            return null;
        }

        @Override
        public Duration step() {
            return Duration.ofSeconds(20);
        }

        @Override
        public String org() {
            return "org";
        }

        @Override
        public String bucket() {
            return "metrics";
        }

        @Override
        public String token() {
            return "my-token";
        }
    };
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

InfluxDB v2 API - InfluxData Documentation
The InfluxDB v2 API provides a programmatic interface for interactions with InfluxDB. Access the InfluxDB API using the /api/v2/ endpoint.
Read more >
InfluxDB v2.0 API documentation
The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the /api/v2/ endpoint. Quick start....
Read more >
InfluxDB v2.2 API documentation
The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the /api/v2/ endpoint. This ...
Read more >
InfluxDB API reference - InfluxData Documentation
Both InfluxDB 1.x and 2.0 APIs support the same line protocol format for raw time series data. For the purposes of writing data,...
Read more >
InfluxDB v2.0v1 API documentation
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found