https://github.com/sapcc/k8s-secrets-certificate-exporter
Exports expiry metrics for certificates found in kubernetes secrets.
https://github.com/sapcc/k8s-secrets-certificate-exporter
Last synced: 9 months ago
JSON representation
Exports expiry metrics for certificates found in kubernetes secrets.
- Host: GitHub
- URL: https://github.com/sapcc/k8s-secrets-certificate-exporter
- Owner: sapcc
- License: apache-2.0
- Created: 2019-04-09T13:30:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:57:10.000Z (over 2 years ago)
- Last Synced: 2025-04-30T14:16:55.664Z (about 1 year ago)
- Language: Go
- Size: 18.6 KB
- Stars: 4
- Watchers: 50
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Secret Certificate Exporter
Exports expiry metrics for certificates found in kubernetes secrets.
## Features
- Automatically discovers secrets via Kubernetes API
- Exposes Prometheus metrics
## Requirements
- go 1.11
## Usage
```
Usage of certificate-exporter:
--kubeconfig string Path to kube config (optional).
--metric-port int Port for Prometheus metrics. (default 9091)
--namespace string Limit exporter to this namespace.
--recheck-interval duration Interval to check secrets. (default 30m0s)
--resync-interval duration Interval to resync secrets. (default 15m0s)
--threadiness int Exporter threadiness. (default 1)
```
## Example metrics
```
# HELP secrets_exporter_certificate_not_after How long the certificate is valid.
# TYPE secrets_exporter_certificate_not_after gauge
secrets_exporter_certificate_not_after{host="",name="ca.crt",secret="default/my-secret"} 1.806907249e+09
secrets_exporter_certificate_not_after{host="",name="tls.crt",secret="default/my-secret"} 1.806907249e+09
# HELP secrets_exporter_certificate_not_before How long the certificate is valid.
# TYPE secrets_exporter_certificate_not_before gauge
secrets_exporter_certificate_not_before{host="",name="ca.crt",secret="default/my-secret"} 1.491547249e+09
secrets_exporter_certificate_not_before{host="",name="tls.crt",secret="default/my-secret"} 1.491547249e+09
```