From 165c5c113457e025c6c6bb0907be7219a38d20b7 Mon Sep 17 00:00:00 2001 From: Manu <4445816+tr4nt0r@users.noreply.github.com> Date: Fri, 6 Mar 2026 12:51:09 +0100 Subject: [PATCH] fix: removal of uptime ratio and avg. response time from prometheus metrics (#6915) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- server/prometheus.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/prometheus.js b/server/prometheus.js index adc1872e0..e30b86fdd 100644 --- a/server/prometheus.js +++ b/server/prometheus.js @@ -245,8 +245,10 @@ class Prometheus { try { monitorCertDaysRemaining.remove(this.monitorLabelValues); monitorCertIsValid.remove(this.monitorLabelValues); - monitorUptimeRatio.remove(this.monitorLabelValues); - monitorAverageResponseTimeSeconds.remove(this.monitorLabelValues); + ["1d", "30d", "365d"].forEach((window) => { + monitorUptimeRatio.remove({ ...this.monitorLabelValues, window }); + monitorAverageResponseTimeSeconds.remove({ ...this.monitorLabelValues, window }); + }); monitorResponseTime.remove(this.monitorLabelValues); monitorStatus.remove(this.monitorLabelValues); } catch (e) {