x509 certificate exporter issue

9/11/2021

I have installed x509-certificate-exporter for prometheus metrics expose on my k8s cluster. I have couple of nodes on my k8s cluster which are used one x.509 certificate for work. When I go to the endpoint with prometheus metrics I get some errors like:

6 error(s) occurred:
* collected metric "x509_cert_expired" { label:<name:"issuer_C" value:"US" > label:<name:"issuer_CN" value:"xxx" > label:<name:"issuer_O" value:"IRCS" > label:<name:"secret_key" value:"cert.crt" > label:<name:"secret_name" value:"default-cert" > label:<name:"secret" value:"cert" > label:<name:"serial_number" value:"12345678901234567890" > label:<name:"subject_C" value:"EU" > label:<name:"subject_CN" value:"M1" > label:<name:"subject_O" value:"OK" > gauge:<value:0 > } was collected before with the same name and label values

I think it happens because my nodes uses only one ssl certificate and when prometheus try to scrape the same metrics from each node I got these errors. If you have any ideas how can I fix this problem, please share them with me. Thank you!

x509-certificate-exporter: https://github.com/enix/helm-charts/tree/master/charts/x509-certificate-exporter#-tldr

-- Danil Savchenko
exporter
kubernetes
prometheus
ssl-certificate

0 Answers