Update exported status metric to properly reflect alerting status of a monitor

It was using the result of the individual check and not the monitor as a whole
This commit is contained in:
Ian Fijolek
2020-07-14 17:09:56 -07:00
parent 5dc5ba5257
commit aad9eaa32f
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ func checkMonitors(config *Config) error {
hasAlert := alertNotice != nil
// Track status metrics
Metrics.SetMonitorStatus(monitor.Name, success)
Metrics.SetMonitorStatus(monitor.Name, monitor.IsUp())
Metrics.CountCheck(monitor.Name, success, hasAlert)
// Should probably consider refactoring everything below here