blackbox_exporter: Negative timestamps in probe_ssl_last_chain_expiry_timestamp_seconds
blackbox_exporter version:
v0.17.0
What did you do that produced an error?
Replaced probe_ssl_earliest_cert_expiry
with probe_ssl_last_chain_expiry_timestamp_seconds
in our alert definitions to fix issue #340
What did you expect to see?
A positive timestamp, equal to probe_ssl_earliest_cert_expiry
in most cases.
What did you see instead?
Value -62135596800
everywhere – the value does not seem to ever change, unlike probe_ssl_earliest_cert_expiry
. The formatted version of that timestamp is 1677-09-21 00:12:43.146 +0000 UTC
.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 2
- Comments: 24 (9 by maintainers)
Are you using
insecure_skip_verify: True
? If so, you’ll see this value.As a workaround, filter out this value in your PromQL expressions:
or more simply (assuming you don’t have any certificates dating to before 1970):
I don’t care that the container in which blackbox_exporter runs does not have the exact same CA bundle(s) that a normal client (Windows, Mac, Linux) running a typical browser (Chrome, Firefox, IE) would have, because those are subject to corporate policies that distribute custom CAs across the organization.
However, I do care about the dates on the certificate(s) presented by the target, because those are definitely going to break users if they are in the past, even if they have the proper CA bundle.
Which was a fine strategy for the old metric
probe_ssl_earliest_cert_expiry
, but not withprobe_ssl_last_chain_expiry_timestamp_seconds
which requires validation.Yes,
ca_file: /path/to/cacert.pem
wherecacert.pem
is the home-made root certificate you used to sign other certificates.