Skip to content

Conversation

@slrtbtfs
Copy link

@slrtbtfs slrtbtfs commented Dec 3, 2024

blackbox-exporter currently offers two metrics to
measure when TLS Certificates will expire.

The difference between those is very subtle, but
using probe_ssl_earliest_cert_expiry
for checking whether a certificate is due to
replacement can lead to false positive alerts.

This documents the difference between those two.

Generally, probe_ssl_last_chain_expiry_timestamp_seconds
seems to be what most people would want to use.

@slrtbtfs slrtbtfs force-pushed the document_ssl_expiry branch from 4084f63 to fece8bc Compare December 3, 2024 12:45
@slrtbtfs
Copy link
Author

slrtbtfs commented Dec 3, 2024

Hm, the CircleCI Tests seem to be failing for reasons unrelated to this PR:

level=error msg="Resolution with IP protocol failed" target=ipv6.google.com ip_protocol=ip4 err="lookup ipv6.google.com on 10.89.4.1:53: no such host"

Looks like the CI Test environment is having some network Issues.

Locally, the tests run fine.

blackbox-exporter currently offers two metrics to
measure when TLS Certificates will expire.

The difference between them is very subtle, but
using `probe_ssl_earliest_cert_expiry`
for checking whether a certificate is due to
replacement can lead to false positive alerts.

This documents the difference between those two.

Generally `probe_ssl_last_chain_expiry_timestamp_seconds`
seems to be what most people would want to use.

Signed-off-by: Tobias Guggenmos <guggenmos@dfn-cert.de>
@slrtbtfs slrtbtfs force-pushed the document_ssl_expiry branch from 82bb799 to 3443a24 Compare February 25, 2025 08:54
@slrtbtfs
Copy link
Author

CI is passing now after a rebase, so this PR is ready.

@github-actions github-actions bot removed the stale label Apr 14, 2025
@github-actions github-actions bot added the stale label Jul 1, 2025
const (
helpSSLEarliestCertExpiry = "Returns last SSL chain expiry in unixtime"
helpSSLChainExpiryInTimeStamp = "Returns last SSL chain expiry in timestamp"
helpSSLEarliestCertExpiry = "Returns the earliest expiry of any peer certificate returned by the server as an unix timestamp. This can include certificates that are not validated by TLS clients. In rare server configurations this might return a time in the past, even for valid TLS certificate chains."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels bit much for the help, can you trim it a bit and make it less verbose?

same for the example below.

if you wish to add more details, please add a section about SSL metrics in README.md to document these in details.

@github-actions github-actions bot removed the stale label Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants