From: Kai Blin Date: Tue, 6 Jun 2017 09:37:24 +0000 (+0200) Subject: Register probeSSLEarliestCertExpiryGauge X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f8207571aeb4489953f3f419f6b99be8f407655;p=blackbox_exporter.git Register probeSSLEarliestCertExpiryGauge This makes the gauge show up in the probe output when a TLS endpoint is probed. Signed-off-by: Kai Blin --- diff --git a/http.go b/http.go index d3fa554..140139d 100644 --- a/http.go +++ b/http.go @@ -227,6 +227,7 @@ func probeHTTP(target string, w http.ResponseWriter, module Module, registry *pr if resp.TLS != nil { isSSLGauge.Set(float64(1)) + registry.MustRegister(probeSSLEarliestCertExpiryGauge) probeSSLEarliestCertExpiryGauge.Set(float64(getEarliestCertExpiry(resp.TLS).UnixNano() / 1e9)) if config.FailIfSSL { success = false