Register probeSSLEarliestCertExpiryGauge
authorKai Blin <kblin@biosustain.dtu.dk>
Tue, 6 Jun 2017 09:37:24 +0000 (11:37 +0200)
committerBrian Brazil <brian.brazil@robustperception.io>
Tue, 6 Jun 2017 10:13:00 +0000 (11:13 +0100)
This makes the gauge show up in the probe output when a TLS endpoint is
probed.

Signed-off-by: Kai Blin <kblin@biosustain.dtu.dk>
http.go

diff --git a/http.go b/http.go
index d3fa554105b0cbf50a81b6612a42099832f0aa40..140139d9189d68ff516c55b0c4adfdac1952b830 100644 (file)
--- 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