Skip to content

Commit

Permalink
fix(notifier): fix metric in notifier-selfcheck (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
kissken authored Sep 14, 2023
1 parent 8e3367e commit 2d493de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notifier/selfstate/heartbeat/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ func GetNotifier(logger moira.Logger, database moira.Database, metrics *metrics.
func (check notifier) Check(int64) (int64, bool, error) {
state, _ := check.db.GetNotifierState()
if state != moira.SelfStateOK {
check.metrics.MarkNotifierIsAlive(true)
check.metrics.MarkNotifierIsAlive(false)

check.log.Error().
String("error", check.GetErrorMessage()).
Msg("Notifier is not healthy")

return 0, true, nil
}
check.metrics.MarkNotifierIsAlive(false)
check.metrics.MarkNotifierIsAlive(true)

check.log.Debug().
String("state", state).
Expand Down

0 comments on commit 2d493de

Please sign in to comment.