Skip to content

Commit 6f23877

Browse files
committed
using forked influxdb-rust until upstream merges a feature
1 parent 45c6e5d commit 6f23877

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rand_distr = "0.4.3"
1111
num-format = "0.4.3"
1212
metriki-core = "1.7.4"
1313
derive_builder = "0.12.0"
14-
influxdb = {version="0.5.2", features=["reqwest"], path="../../influxdb-rust/influxdb"}
14+
influxdb = { git = 'https://github.com/bogdad/influxdb-rust', branch = 'main' }
1515
tokio = { version = "1.0", default-features = false, features = ["net", "time"] }
1616
futures = "0.3.26"
1717
reqwest= "0.11.14"

docker/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ services:
1818
- DOCKER_INFLUXDB_INIT_PASSWORD=adminadminadmin
1919
- DOCKER_INFLUXDB_INIT_ORG=noorg
2020
- DOCKER_INFLUXDB_INIT_BUCKET=grafana
21+
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=secrettokentoken
2122
volumes:
2223
- influxdb:/var/lib/influxdb
2324
networks:

src/influxdbreporter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl InfluxDbReporter {
5656
username: None,
5757
password: None,
5858
auth_token: env::var("AUTH_TOKEN").ok(),
59-
measurement_prefix: "sdm".to_string(),
59+
measurement_prefix: "sdm_".to_string(),
6060
tags: HashMap::new(),
6161
batch_size: 60,
6262
event_rx: event_rx,
@@ -70,7 +70,7 @@ impl InfluxDbReporter {
7070
if let (Some(username), Some(password)) = (self.username.as_ref(), self.password.as_ref()) {
7171
client.with_auth(username, password)
7272
} else if let Some(auth_token) = &self.auth_token {
73-
client.with_auth_token(auth_token)
73+
client.with_token(auth_token)
7474
} else {
7575
client
7676
}

0 commit comments

Comments
 (0)