mirror of
https://github.com/prometheus/node_exporter
synced 2025-01-03 04:02:09 +00: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
|
||||
|
||||
driveTemperature *prometheus.GaugeVec
|
||||
driveCounters *prometheus.CounterVec
|
||||
driveCounters *prometheus.GaugeVec
|
||||
drivePresence *prometheus.GaugeVec
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ func NewMegaCliCollector() (Collector, error) {
|
||||
Name: "megacli_drive_temperature_celsius",
|
||||
Help: "megacli: drive temperature",
|
||||
}, []string{"enclosure", "slot"}),
|
||||
driveCounters: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
driveCounters: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: Namespace,
|
||||
Name: "megacli_drive_count",
|
||||
Help: "megacli: drive error and event counters",
|
||||
|
Loading…
Reference in New Issue
Block a user