Skip to content

Commit

Permalink
Update comment to reflect requirements of healthz check
Browse files Browse the repository at this point in the history
  • Loading branch information
s-amann authored and cadenmarchese committed Jul 11, 2023
1 parent 5a9b293 commit ff5b656
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/monitor/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ func (mon *Monitor) Monitor(ctx context.Context) (errs []error) {
})
}

// If API is not returning 200, fallback to checking ping and short circuit the rest of the checks
//this API server healthz check must be first, our geneva monitor relies on this metric to always be emitted.
statusCode, err := mon.emitAPIServerHealthzCode(ctx)
if err != nil {
errs = append(errs, err)
friendlyFuncName := steps.FriendlyName(mon.emitAPIServerHealthzCode)
mon.log.Printf("%s: %s", friendlyFuncName, err)
mon.emitGauge("monitor.clustererrors", 1, map[string]string{"monitor": friendlyFuncName})
}
// If API is not returning 200, fallback to checking ping and short circuit the rest of the checks
if statusCode != http.StatusOK {
err := mon.emitAPIServerPingCode(ctx)
if err != nil {
Expand Down

0 comments on commit ff5b656

Please sign in to comment.