Add missing probe_tls_version_info and probe_ssl_last_chain_info metrics to STARTTLS...
authorLyas Spiehler <lspiehler@gmail.com>
Tue, 15 Nov 2022 19:07:06 +0000 (13:07 -0600)
committerGitHub <noreply@github.com>
Tue, 15 Nov 2022 19:07:06 +0000 (00:37 +0530)
probe_tls_version_info and probe_ssl_last_chain_info metrics were missing from STARTTLS TCP probes and added them.

Signed-off-by: Lyas Spiehler lspiehler@gmail.com
prober/tcp.go

index dab140c59fa21f6b4e7fc959a4fc814414ac94d0..de960db26a4ef3216eb4114e3ef3356b6cdaa090 100644 (file)
@@ -192,7 +192,7 @@ func ProbeTCP(ctx context.Context, target string, module config.Module, registry
 
                        // Get certificate expiry.
                        state := tlsConn.ConnectionState()
-                       registry.MustRegister(probeSSLEarliestCertExpiry, probeSSLLastChainExpiryTimestampSeconds)
+                       registry.MustRegister(probeSSLEarliestCertExpiry, probeTLSVersion, probeSSLLastChainExpiryTimestampSeconds, probeSSLLastInformation)
                        probeSSLEarliestCertExpiry.Set(float64(getEarliestCertExpiry(&state).Unix()))
                        probeTLSVersion.WithLabelValues(getTLSVersion(&state)).Set(1)
                        probeSSLLastChainExpiryTimestampSeconds.Set(float64(getLastChainExpiry(&state).Unix()))