Skip to content

Commit dc1c19e

Browse files
Julien Pivottokhiemdoan
Julien Pivotto
authored andcommitted
Set gauge to 1 when collector is successful
Signed-off-by: Julien Pivotto <[email protected]> Signed-off-by: Khiem Doan <[email protected]>
1 parent 02aff21 commit dc1c19e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/postgres_exporter/probe.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func handleProbe(logger log.Logger) http.HandlerFunc {
114114

115115
duration := time.Since(start).Seconds()
116116
probeDurationGauge.Set(duration)
117+
probeSuccessGauge.Set(1)
117118

118119
// TODO check success, etc
119120
h := promhttp.HandlerFor(registry, promhttp.HandlerOpts{})

0 commit comments

Comments
 (0)