1
0
mirror of https://github.com/ribbybibby/ssl_exporter.git synced 2025-07-15 23:54:18 +02:00

Fix ssl_verified_cert_not_after typo

This commit is contained in:
Rob Best
2020-09-22 18:10:07 +01:00
parent c0f4183a7a
commit b84db808b7
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ var (
[]string{"chain_no", "serial_no", "issuer_cn", "cn", "dnsnames", "ips", "emails", "ou"}, nil, []string{"chain_no", "serial_no", "issuer_cn", "cn", "dnsnames", "ips", "emails", "ou"}, nil,
) )
verifiedNotAfter = prometheus.NewDesc( verifiedNotAfter = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "verfied_cert_not_after"), prometheus.BuildFQName(namespace, "", "verified_cert_not_after"),
"NotAfter expressed as a Unix Epoch Time for a certificate in the list of verified chains", "NotAfter expressed as a Unix Epoch Time for a certificate in the list of verified chains",
[]string{"chain_no", "serial_no", "issuer_cn", "cn", "dnsnames", "ips", "emails", "ou"}, nil, []string{"chain_no", "serial_no", "issuer_cn", "cn", "dnsnames", "ips", "emails", "ou"}, nil,
) )

View File

@ -810,7 +810,7 @@ func checkVerifiedChainDates(verifiedChains [][]*x509.Certificate, body string)
"ou=\",ribbybibbys org,\"", "ou=\",ribbybibbys org,\"",
"serial_no=\"" + cert.SerialNumber.String() + "\"", "serial_no=\"" + cert.SerialNumber.String() + "\"",
}, ",") + "} " + notAfter }, ",") + "} " + notAfter
if ok := strings.Contains(body, notAfter); !ok { if ok := strings.Contains(body, notAfterMetric); !ok {
return fmt.Errorf("expected `%s` in: %s", notAfterMetric, body) return fmt.Errorf("expected `%s` in: %s", notAfterMetric, body)
} }