From 5eb4f55dfd56051a2343c4524abdee837f5dbaab Mon Sep 17 00:00:00 2001 From: Matthew Macdonald-Wallace Date: Tue, 10 Aug 2021 07:55:06 +0100 Subject: [PATCH] Add the new gauges to the prometheus handler --- server/prometheus.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/prometheus.js b/server/prometheus.js index f60ec45a6..a6b4d7aac 100644 --- a/server/prometheus.js +++ b/server/prometheus.js @@ -8,6 +8,17 @@ const commonLabels = [ 'monitor_port', ] +const monitor_cert_days_remaining = new PrometheusClient.Gauge({ + name: 'monitor_cert_days_remaining', + help: 'The number of days remaining until the certificate expires', + labelNames: commonLabels +}); + +const monitor_cert_is_valid = new PrometheusClient.Gauge({ + name: 'monitor_cert_is_valid', + help: 'Is the certificate still valid? (1 = Yes, 0= No)', + labelNames: commonLabels +}); const monitor_response_time = new PrometheusClient.Gauge({ name: 'monitor_response_time', help: 'Monitor Response Time (ms)',