prober/tls: adding metric to expose certificate fingerprint info (#678)
authorFelix Ehrenpfort <felix.ehrenpfort@codecentric.de>
Tue, 18 Aug 2020 22:55:48 +0000 (00:55 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Aug 2020 22:55:48 +0000 (23:55 +0100)
commitc79355fedab23c4343df321cfa4e7cf64274a67c
tree1cf299068668a322f973819cdff5c3e83ff6ecfb
parent5b7f4ed2a153ca4cff6360069fb4827aef83bdc1
prober/tls: adding metric to expose certificate fingerprint info (#678)

this change adds a new metric `probe_ssl_fingerprint_info` to both tcp
and http probes. the metric always returns 1 similar to the tls version
metric and contains the leaf certificates sha256 fingerprint (hex) as a
label value.

this change allows users to validate in prometheus if a particular
certificate is being served.

Signed-off-by: xinau <felix.ehrenpfort@protonmail.com>
prober/http.go
prober/tcp.go
prober/tcp_test.go
prober/tls.go