Skip to content

Commit 9bd9d83

Browse files
authored
Merge pull request #724 from roidelapluie/gauge1
Set gauge to 1 when collector is successful
2 parents 02aff21 + 5fcceb4 commit 9bd9d83

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/postgres_exporter/probe.go

+1
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)