From c7ec9f0dfbbad7c53b1a0c6801a6797c07311a44 Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Tue, 22 Nov 2022 11:59:00 -0800 Subject: [PATCH] Fix hwmon measurement names --- src/hwmon.rs | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hwmon.rs b/src/hwmon.rs index 4448bb9..a0b950b 100644 --- a/src/hwmon.rs +++ b/src/hwmon.rs @@ -65,7 +65,7 @@ impl ChimemonSource for HwmonSource { ); let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); let mut builder = - DataPoint::builder(&s.device).timestamp(now.as_nanos().try_into().unwrap()); + DataPoint::builder(&self.config.sources.hwmon.measurement).timestamp(now.as_nanos().try_into().unwrap()); for (key, value) in &self.config.influxdb.tags { builder = builder.tag(key, value) } diff --git a/src/lib.rs b/src/lib.rs index e748eb9..404945d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,7 +70,7 @@ pub struct HwmonSensorConfig { pub struct HwmonConfig { pub enabled: bool, pub interval: u64, - pub measurement_prefix: String, + pub measurement: String, pub sensors: Map, } @@ -79,7 +79,7 @@ impl Default for HwmonConfig { HwmonConfig { enabled: false, interval: 60, - measurement_prefix: "hwmon.".into(), + measurement: "hwmon".into(), sensors: map! {}, } }