Use Gauge for megacli counters

Without refactoring this to use const metrics, we need to make this a
gauge to we can keep using Set() which was deprecated for counters.
This commit is contained in:
Johannes 'fish' Ziemke 2017-01-06 12:32:12 +01:00
parent 01a9a37556
commit ad2eb4a788
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ type megaCliCollector struct {
cli string cli string
driveTemperature *prometheus.GaugeVec driveTemperature *prometheus.GaugeVec
driveCounters *prometheus.CounterVec driveCounters *prometheus.GaugeVec
drivePresence *prometheus.GaugeVec drivePresence *prometheus.GaugeVec
} }
@ -58,7 +58,7 @@ func NewMegaCliCollector() (Collector, error) {
Name: "megacli_drive_temperature_celsius", Name: "megacli_drive_temperature_celsius",
Help: "megacli: drive temperature", Help: "megacli: drive temperature",
}, []string{"enclosure", "slot"}), }, []string{"enclosure", "slot"}),
driveCounters: prometheus.NewCounterVec(prometheus.CounterOpts{ driveCounters: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: Namespace, Namespace: Namespace,
Name: "megacli_drive_count", Name: "megacli_drive_count",
Help: "megacli: drive error and event counters", Help: "megacli: drive error and event counters",