Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
cb711475d4
@ -64,7 +64,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)
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ pub struct HwmonSensorConfig {
|
||||
pub struct HwmonConfig {
|
||||
pub enabled: bool,
|
||||
pub interval: u64,
|
||||
pub measurement_prefix: String,
|
||||
pub measurement: String,
|
||||
pub sensors: Map<String, HwmonSensorConfig>,
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ impl Default for HwmonConfig {
|
||||
HwmonConfig {
|
||||
enabled: false,
|
||||
interval: 60,
|
||||
measurement_prefix: "hwmon.".into(),
|
||||
measurement: "hwmon".into(),
|
||||
sensors: map! {},
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user