Skip to content

Commit

Permalink
fix PowerTotal type and desc
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Oct 7, 2019
1 parent f6edb34 commit 9deb459
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ func NewExporter(t *ExporterTarget) *Exporter {
"Current voltage connected to device in Volt.",
labelNames, constLabels),
metricsPowerLoad: prometheus.NewDesc("kasa_power_load",
"Power of load in Watt.",
"Current power in Watt.",
labelNames, constLabels),
metricsPowerTotal: prometheus.NewDesc("kasa_power_total",
"Power of load and device itself in Watt.",
"Power consumption since device connected in kWh.",
labelNames, constLabels),
}
return e
Expand Down Expand Up @@ -109,7 +109,7 @@ func (k *Exporter) Collect(ch chan<- prometheus.Metric) {
float64(r.Voltage), alias)
ch <- prometheus.MustNewConstMetric(k.metricsPowerLoad, prometheus.GaugeValue,
float64(r.Power), alias)
ch <- prometheus.MustNewConstMetric(k.metricsPowerTotal, prometheus.GaugeValue,
ch <- prometheus.MustNewConstMetric(k.metricsPowerTotal, prometheus.CounterValue,
float64(r.Total), alias)
}

Expand Down

0 comments on commit 9deb459

Please sign in to comment.