Fix hwmon measurement names
This commit is contained in:
parent
116f9b1cec
commit
c7ec9f0dfb
@ -65,7 +65,7 @@ impl ChimemonSource for HwmonSource {
|
|||||||
);
|
);
|
||||||
let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap();
|
let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap();
|
||||||
let mut builder =
|
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 {
|
for (key, value) in &self.config.influxdb.tags {
|
||||||
builder = builder.tag(key, value)
|
builder = builder.tag(key, value)
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ pub struct HwmonSensorConfig {
|
|||||||
pub struct HwmonConfig {
|
pub struct HwmonConfig {
|
||||||
pub enabled: bool,
|
pub enabled: bool,
|
||||||
pub interval: u64,
|
pub interval: u64,
|
||||||
pub measurement_prefix: String,
|
pub measurement: String,
|
||||||
pub sensors: Map<String, HwmonSensorConfig>,
|
pub sensors: Map<String, HwmonSensorConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ impl Default for HwmonConfig {
|
|||||||
HwmonConfig {
|
HwmonConfig {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
interval: 60,
|
interval: 60,
|
||||||
measurement_prefix: "hwmon.".into(),
|
measurement: "hwmon".into(),
|
||||||
sensors: map! {},
|
sensors: map! {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user