joe-elliott / cert-exporter

A Prometheus exporter that publishes cert expirations on disk and in Kubernetes secrets
Apache License 2.0
316 stars 87 forks source link

added CN and ISSUER to a kubeconfig exported metrics #76

Closed ladmitry closed 3 years ago

ladmitry commented 3 years ago

Suggesting to extend the kubeconfig metrics with cn and issuer for better visibity. Example: two different CA certificates encoded in one certificate-authority-data (OpenShift 3.11) cert_exporter_kubeconfig_expires_in_seconds{cn="root",filename="certs/kubeconfig",issuer="root",name="cluster1",nodename="master0",type="cluster"}

jenting commented 3 years ago

I remember I try to fix this issue before, but at that time, we found that too many items displayed in one column make the Grafana GUI hard to read.

ladmitry commented 3 years ago

I remember I try to fix this issue before, but at that time, we found that too many items displayed in one column make the Grafana GUI hard to read.

We mostly use exported metrics for alerting. So the more metrics are exported, the more detailed alerts we receive. I almost 100% sure Grafana dashboard could be easily tuned.

joe-elliott commented 3 years ago

Sure, i'm happy to accept this PR. This shouldn't increase the metric count since these values should be 1:1 with the filename?

Can you double check @jenting 's concern about it blowing up the dashboard?

ladmitry commented 3 years ago

Hi guys, Is there any chance to get these changes implemented in the coming days?

joe-elliott commented 3 years ago

Sure, I was honestly waiting on your response to:

Can you double check @jenting 's concern about it blowing up the dashboard?

jenting commented 3 years ago

Hi guys, Is there any chance to get these changes implemented in the coming days?

Please go ahead, it'd be nice if you could provide the Dashboard screenshot after added CN and ISSUER, thank u ^^

joe-elliott commented 3 years ago

Seems like @jenting is ok with this change? I'll merge and build.