Closed Zhang21 closed 6 months ago
codes change in v2.1.2
codes: https://github.com/megaease/easeprobe/blob/main/probe/tls/metrics.go#L46C1-L54C2
time.Time{}.Unix()
is -62135596800.
It seems in this pr https://github.com/megaease/easeprobe/pull/386/files#diff-f4ba94b6ceb9d73b8797e5ca558f756010112d0d6b71ca4ffcdf3da10fbe2c1f, the author add constant labels and change LatChainExpiryTimestampSeconds
to EarliestExpiry
by mistake, as a result there are two EarliestExpiry
?
If you change it back, will the problem be solved? If it is solved, could you make a pr to fix it?
yes, double t.metrics.EarliestCertExpiry
here.
the 2nd t.metrics.EarliestCertExpiry
rewrite LastChainExpiryTimestampSeconds to EarliestCertExpiry.
@qdongxu You need to fix it.
Environment (please complete the following information):
Describe the bug use tls to check k8s apiserver cert((signed by unknown authority), the cert expiration date is incorrect, use the default
0001-01-01 00:00:00 +0000 UTC
.tls checks insecure_skip_verify cert(signed by unknown authority) will be incorrect about prometheus metric
EaseProbe_tls_earliest_cert_expiry
。such as tls checks k8s apiserver cert(
127.0.0.1:6443
)。cert signed by known authority is ok(
www.baidu.com:443
)!Expected behavior The result is the tls x509 cert.NotAfter.Before timestamp.