From 9cfaf9841a8376760c9f98db540fd89cbf9d51b5 Mon Sep 17 00:00:00 2001 From: Stephen Papierski Date: Wed, 15 Nov 2023 17:17:14 -0700 Subject: [PATCH] Add threshold to pingMsg --- server/model/monitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index be607122e..619078015 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1565,7 +1565,7 @@ class Monitor extends BeanModel { // Create stats to append to messages/logs const methodDescription = [ "average", "max" ].includes(method) ? `${method} of last ${windowDuration}s` : method; let msgStats = `Response: ${actualResponseTime}ms (${methodDescription}) | Threshold: ${threshold}ms (${thresholdDescription})`; - let pingMsg = `${actualResponseTime}ms response (${methodDescription})`; + let pingMsg = `${actualResponseTime}ms resp. (${methodDescription})`; // Verify valid response time was calculated if (actualResponseTime === 0 || !Number.isInteger(actualResponseTime)) { @@ -1593,6 +1593,7 @@ class Monitor extends BeanModel { Monitor.sendSlowResponseNotification(monitor, bean, msg); // Mark important (SLOW -> NOMINAL) + pingMsg += ` < ${threshold}ms`; bean.pingImportant = true; bean.pingMsg = pingMsg; } @@ -1612,6 +1613,7 @@ class Monitor extends BeanModel { Monitor.sendSlowResponseNotification(monitor, bean, msg); // Mark important (NOMINAL -> SLOW) + pingMsg += ` > ${threshold}ms`; bean.pingImportant = true; bean.pingMsg = pingMsg;