Skip to content

Commit

Permalink
Issue #62: Adding Voltage conversion from MilliVolt to Volt
Browse files Browse the repository at this point in the history
* Added `milliVolt2Volt` conversion on `hw.voltage` and `hw.voltage.limit` values to convert values to V.
  • Loading branch information
CherfaElyes committed Apr 25, 2024
1 parent 094fc09 commit 6f8e5ac
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/main/connector/hardware/GenericUPS/GenericUPS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ monitors:
hw.parent.type: enclosure
name: "${awk::sprintf(\"%s (%s)\", $2, \"UPS\")}"
metrics:
hw.voltage.limit{limit_type="high.degraded"}: $4
hw.voltage.limit{limit_type="low.critical"}: $5
hw.voltage.limit{limit_type="high.degraded"}: milliVolt2Volt($4)
hw.voltage.limit{limit_type="low.critical"}: milliVolt2Volt($5)
collect:
# Voltage Collect
type: multiInstance
Expand Down Expand Up @@ -301,7 +301,7 @@ monitors:
attributes:
id: $2
metrics:
hw.voltage: $3
hw.voltage: milliVolt2Volt($3)
temperature:
discovery:
sources:
Expand Down
6 changes: 3 additions & 3 deletions src/main/connector/hardware/IpmiTool/IpmiTool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ monitors:
hw.parent.id: IPMI
name: ${awk::sprintf("%s (%s)", $3, $4)}
metrics:
hw.voltage.limit{limit_type="low.critical"}: $6
hw.voltage.limit{limit_type="high.degraded"}: $7
hw.voltage.limit{limit_type="low.critical"}: milliVolt2Volt($6)
hw.voltage.limit{limit_type="high.degraded"}: milliVolt2Volt($7)
collect:
# Collect type is all instances in one shot
type: multiInstance
Expand All @@ -339,7 +339,7 @@ monitors:
attributes:
id: $2
metrics:
hw.voltage: $5
hw.voltage: milliVolt2Volt($5)
power_supply:
discovery:
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ monitors:
attributes:
id: $1
metrics:
hw.voltage: $2
hw.voltage: milliVolt2Volt($2)
temperature:
discovery:
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ monitors:
attributes:
id: $1
metrics:
hw.voltage: $4
hw.voltage: milliVolt2Volt($4)
hw.status{hw.type="voltage"}: $5
legacyTextParameters:
StatusInformation: $6
Expand Down
2 changes: 1 addition & 1 deletion src/main/connector/hardware/NvidiaSmi/NvidiaSmi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ monitors:
attributes:
id: $2
metrics:
hw.voltage: $3
hw.voltage: milliVolt2Volt($3)
fan:
discovery:
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -976,11 +976,11 @@ monitors:
hw.parent.type: enclosure
name: $2
metrics:
hw.voltage.limit{limit_type="high.degraded"}: $7
hw.voltage.limit{limit_type="low.critical"}: $6
hw.voltage.limit{limit_type="high.degraded"}: milliVolt2Volt($7)
hw.voltage.limit{limit_type="low.critical"}: milliVolt2Volt($6)
conditionalCollection:
hw.status{hw.type="voltage"}: $5
hw.voltage: $3
hw.voltage: milliVolt2Volt($3)
collect:
type: multiInstance
keys:
Expand Down Expand Up @@ -1045,7 +1045,7 @@ monitors:
id: $2
metrics:
hw.status{hw.type="voltage"}: $4
hw.voltage: $3
hw.voltage: milliVolt2Volt($3)
legacyTextParameters:
StatusInformation: $5
network:
Expand Down
6 changes: 3 additions & 3 deletions src/main/connector/hardware/lmsensors/lmsensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ monitors:
hw.parent.id: Computer
name: ${awk::sprintf("%s (%s)", $2, "Planar")}
metrics:
hw.voltage.limit{limit_type="low.critical"}: $5
hw.voltage.limit{limit_type="high.degraded"}: $6
hw.voltage.limit{limit_type="low.critical"}: milliVolt2Volt($5)
hw.voltage.limit{limit_type="high.degraded"}: milliVolt2Volt($6)
collect:
# Collection Type
type: multiInstance
Expand All @@ -161,7 +161,7 @@ monitors:
attributes:
id: $2
metrics:
hw.voltage: $4
hw.voltage: milliVolt2Volt($4)
fan:
discovery:
sources:
Expand Down

0 comments on commit 6f8e5ac

Please sign in to comment.