Update mdadm_linux.go

changed sync_minutes_remaining to sync_time_remaining (in seconds)

Signed-off-by: Frederic <fredleitenb@yahoo.de>
This commit is contained in:
Frederic 2024-05-01 18:44:45 +02:00 committed by GitHub
parent 3179601876
commit f21e3b547e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,9 +105,9 @@ var (
[]string{"device"}, []string{"device"},
nil, nil,
) )
syncMinutesRemainingDesc = prometheus.NewDesc( syncTimeRemainingDesc = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "md", "sync_minutes_remaining"), prometheus.BuildFQName(namespace, "md", "sync_time_remaining"),
"Estimated finishing time for current sync in minutes.", "Estimated finishing time for current sync in seconds.",
[]string{"device"}, []string{"device"},
nil, nil,
) )
@ -231,9 +231,9 @@ func (c *mdadmCollector) Update(ch chan<- prometheus.Metric) error {
mdStat.Name, mdStat.Name,
) )
ch <- prometheus.MustNewConstMetric( ch <- prometheus.MustNewConstMetric(
syncMinutesRemainingDesc, syncTimeRemainingDesc,
prometheus.GaugeValue, prometheus.GaugeValue,
float64(mdStat.BlocksSyncedFinishTime), float64(mdStat.BlocksSyncedFinishTime * 60),
mdStat.Name, mdStat.Name,
) )
ch <- prometheus.MustNewConstMetric( ch <- prometheus.MustNewConstMetric(