x509-certificate-exporter icon indicating copy to clipboard operation
x509-certificate-exporter copied to clipboard

[feature request]Handel duplicate cert

Open muzammilrehman opened this issue 1 year ago • 2 comments

With version 3.x.x, the server doesn't crash when Kubernetes secret has a duplicate certificate but it does not expose other certs' metrics. It would be good to either directly ignore the duplicate certs or give the option to the user via a flag to ignore these.

~ # curl http://172.20.72.13:9793/metrics
An error has occurred while serving metrics:

collected metric "x509_cert_error" { label:{name:"secret_key"  value:"pubkey"}  label:{name:"secret_name"  value:"certs-server"}  label:{name:"secret_namespace"  value:"xxx"}  xxx:{value:1}} was collected before with the same name and label values

muzammilrehman avatar Feb 05 '24 10:02 muzammilrehman

@muzammilrehman this should be bug if it is 100% reproducible

AnuragEkkati avatar Feb 12 '24 19:02 AnuragEkkati

I've encountered the same problem. I would suggest that if a duplicate cert is found then it's simply ignored and an error printed to the logs.

carinadigital avatar Jul 10 '24 16:07 carinadigital