diff --git a/server/prometheus.js b/server/prometheus.js index 870581d2..f91b0a13 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); }