From 6c3199438749c6a113ae7f4ca6493b8b34b0e673 Mon Sep 17 00:00:00 2001 From: Stephen Papierski Date: Wed, 1 Nov 2023 00:06:05 -0600 Subject: [PATCH] Fix behavior of slowResponseNotificationRetryInterval --- server/model/monitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index c4890339c..8fde44c1f 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1484,11 +1484,11 @@ class Monitor extends BeanModel { log.debug("monitor", `[${this.name}] Responded slowly (${actualResponseTime}ms > ${thresholdResponseTime}ms, Slow Response Count: ${bean.slowResponseCount})`); // Always send first notification - if (this.slowResponseNotificationResendInterval <= 0 || bean.slowResponseCount == 1) { + if (bean.slowResponseCount == 1) { log.debug("monitor", `[${this.name}] Responded slowly, sending notification (${actualResponseTime}ms > ${thresholdResponseTime}ms, Slow Response Count: ${bean.slowResponseCount})`); let message = `[${this.name}] Started responding slowly (${actualResponseTime}ms > ${thresholdResponseTime}ms)`; Monitor.sendSlowResponseNotification(monitor, bean, message); - } else { + } else if (this.slowResponseNotificationResendInterval > 0){ // Send notification every x times if (((bean.slowResponseCount) % this.slowResponseNotificationResendInterval) == 0) { // Send notification again, because we are still responding slow