mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-02-21 03:25:57 -08:00
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:
parent
01a9a37556
commit
ad2eb4a788
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue