Skip to content

Commit

Permalink
Display the current value not the threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
gabek committed Feb 25, 2021
1 parent 8c31b77 commit 1d9774e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metrics/alerting.go
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 1d9774e

Please sign in to comment.