From cab5b0bd29876b5a6527191bea596b6691141c13 Mon Sep 17 00:00:00 2001 From: William Blew Date: Sun, 23 Mar 2025 21:51:48 -0700 Subject: [PATCH] fix: UptimeKuma Up/Down counts are always zero Fix UptimeKuma::livestats() function. An incorrect !== operator, that should be ===, prevent the monitor_status metric lines from being counted by livestats(). --- UptimeKuma/UptimeKuma.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UptimeKuma/UptimeKuma.php b/UptimeKuma/UptimeKuma.php index 6e3552419a..cf8c6851a8 100644 --- a/UptimeKuma/UptimeKuma.php +++ b/UptimeKuma/UptimeKuma.php @@ -62,7 +62,7 @@ public function livestats() continue; } - if (strpos($line, 'monitor_status') !== 0) { + if (strpos($line, 'monitor_status') === 0) { // If the line is a metric but not a monitor we can ignore it continue; }