From 13acdd4c657c4774a2b51ae323b43723fddfbc15 Mon Sep 17 00:00:00 2001 From: Joseph Benguira Date: Wed, 12 Jan 2022 10:12:12 +0200 Subject: [PATCH] Fix for issue in logs This fix address the issue described here: https://github.com/louislam/uptime-kuma/issues/1024 --- server/prometheus.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/prometheus.js b/server/prometheus.js index 870581d2e..e53dee5ca 100644 --- a/server/prometheus.js +++ b/server/prometheus.js @@ -60,7 +60,9 @@ class Prometheus { } try { - monitor_cert_days_remaining.set(this.monitorLabelValues, tlsInfo.certInfo.daysRemaining); + if ( tlsInfo.certInfo != null ){ + monitor_cert_days_remaining.set(this.monitorLabelValues, tlsInfo.certInfo.daysRemaining); + } } catch (e) { console.error(e); }