Fix metric names

This commit is contained in:
Josh Deprez 2024-09-30 14:58:24 +10:00
parent 29340a3933
commit a5d989b3b7

View file

@ -38,12 +38,12 @@ var (
lifepo4weredPOutSummary = jmetrics.NewLiteGaugeSummary("lifepo4wered_power_out", "Power out (mW)")
lifepo4weredHists = map[string]prometheus.Histogram{
"VIN": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Name: "voltage_in", Help: "Voltage in (mV)"}),
"VOUT": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Name: "voltage_out", Help: "Voltage out (mV)"}),
"VBAT": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Name: "voltage_bat", Help: "Battery voltage (mV)"}),
"IOUT": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Name: "current_out", Help: "Current out (mA)"}),
"VIN": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Subsystem: "hist", Name: "voltage_in", Help: "Voltage in (mV)"}),
"VOUT": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Subsystem: "hist", Name: "voltage_out", Help: "Voltage out (mV)"}),
"VBAT": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Subsystem: "hist", Name: "voltage_bat", Help: "Battery voltage (mV)"}),
"IOUT": promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Subsystem: "hist", Name: "current_out", Help: "Current out (mA)"}),
}
lifepo4weredPOutHist = promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Name: "power_out", Help: "Power out (mW)"})
lifepo4weredPOutHist = promauto.NewHistogram(prometheus.HistogramOpts{Namespace: "lifepo4wered", Subsystem: "hist", Name: "power_out", Help: "Power out (mW)"})
)
func pollVars() {