From 1d9774e4533512ce708bdd7abeb10fa7e6a93806 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 24 Feb 2021 23:48:31 -0800 Subject: [PATCH] Display the current value not the threshold --- metrics/alerting.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metrics/alerting.go b/metrics/alerting.go index e7a9de082..853adb955 100644 --- a/metrics/alerting.go +++ b/metrics/alerting.go @@ -31,7 +31,7 @@ func handleCPUAlerting() { avg := recentAverage(Metrics.CPUUtilizations) if avg > maxCPUAlertingThresholdPCT && !inCpuAlertingState { - log.Warnf(alertingError, "CPU", maxCPUAlertingThresholdPCT) + log.Warnf(alertingError, "CPU", avg) inCpuAlertingState = true resetTimer := time.NewTimer(errorResetDuration) @@ -49,7 +49,7 @@ func handleRAMAlerting() { avg := recentAverage(Metrics.RAMUtilizations) if avg > maxRAMAlertingThresholdPCT && !inRamAlertingState { - log.Warnf(alertingError, "memory", maxRAMAlertingThresholdPCT) + log.Warnf(alertingError, "memory", avg) inRamAlertingState = true resetTimer := time.NewTimer(errorResetDuration) @@ -68,7 +68,7 @@ func handleDiskAlerting() { avg := recentAverage(Metrics.DiskUtilizations) if avg > maxDiskAlertingThresholdPCT && !inDiskAlertingState { - log.Warnf(alertingError, "disk", maxRAMAlertingThresholdPCT) + log.Warnf(alertingError, "disk", avg) inDiskAlertingState = true resetTimer := time.NewTimer(errorResetDuration)