1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-09 15:42:47 +03:00

Merge pull request #724 from roidelapluie/gauge1

Set gauge to 1 when collector is successful
This commit is contained in:
Joe Adams
2022-11-27 14:05:26 -05:00
committed by GitHub

View File

@@ -114,6 +114,7 @@ func handleProbe(logger log.Logger) http.HandlerFunc {
duration := time.Since(start).Seconds()
probeDurationGauge.Set(duration)
probeSuccessGauge.Set(1)
// TODO check success, etc
h := promhttp.HandlerFor(registry, promhttp.HandlerOpts{})