Breaking: Rename minitor_check_milliseconds and minitor_monitor_up_count

To conform with Prometheus metric name best practices, these have been
renamed as follows:

  * `minitor_check_milliseconds` to `minitor_check_seconds`
  * `minitor_monitor_up_count` to `minitor_monitor_up`
This commit is contained in:
Ian Fijolek
2022-12-19 15:45:23 -08:00
parent 958446050f
commit 60cfac948b
4 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -91,9 +91,9 @@ func (monitor Monitor) IsUp() bool {
return monitor.alertCount == 0
}
// LastCheckMilliseconds gives number of miliseconds the last check ran for
func (monitor Monitor) LastCheckMilliseconds() int64 {
return monitor.lastCheckDuration.Milliseconds()
// LastCheckSeconds gives number of seconds the last check ran for
func (monitor Monitor) LastCheckSeconds() float64 {
return monitor.lastCheckDuration.Seconds()
}
func (monitor *Monitor) success() (notice *AlertNotice) {