Skip to content

Commit

Permalink
Shared System Health collector should export zero when no health issu…
Browse files Browse the repository at this point in the history
…es are present (#135)

Signed-off-by: Russell Troxel <[email protected]>
  • Loading branch information
rtrox authored Mar 22, 2023
1 parent 98e7b01 commit fed7319
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/collector/shared/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -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), "", "", "", "")
}
}

0 comments on commit fed7319

Please sign in to comment.