Shared System Health collector should export zero when no health issues are present (#135)

Signed-off-by: Russell Troxel <russell.troxel@segment.com>
This commit is contained in:
Russell Troxel 2023-03-22 15:22:35 -07:00 committed by GitHub
parent 98e7b015e4
commit fed7319e77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,5 +59,7 @@ func (collector *systemHealthCollector) Collect(ch chan<- prometheus.Metric) {
s.Source, s.Type, s.Message, s.WikiURL,
)
}
} else {
ch <- prometheus.MustNewConstMetric(collector.systemHealthMetric, prometheus.GaugeValue, float64(0), "", "", "", "")
}
}