https://github.com/bromaniac/ssl-exporter
Checks SSL certificate expiration and exports as Prometheus metric.
https://github.com/bromaniac/ssl-exporter
certificate container kubernetes monitoring openshift prometheus prometheus-exporter rust ssl tls
Last synced: about 2 months ago
JSON representation
Checks SSL certificate expiration and exports as Prometheus metric.
- Host: GitHub
- URL: https://github.com/bromaniac/ssl-exporter
- Owner: bromaniac
- License: other
- Created: 2022-01-12T18:40:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-12T07:43:43.000Z (over 1 year ago)
- Last Synced: 2025-09-11T04:35:55.542Z (9 months ago)
- Topics: certificate, container, kubernetes, monitoring, openshift, prometheus, prometheus-exporter, rust, ssl, tls
- Language: Rust
- Homepage:
- Size: 72.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
As of version 1.3.7 the [cert-util-operator](https://github.com/redhat-cop/cert-utils-operator) supports alerting on expiring certs stored as secrets in the cluster so you should probably use that instead. It can also populate Routes with certs stored in secrets.
# ssl-expiration
Checks SSL certificate expiration, exports as Prometheus metric and alerts when expiry is near. (I wrote this for Openshift but it should work in vanilla Kubernetes. I haven't tested it.)
## Deploy in Openshift
Review ocp-deploy.yaml and then deploy in Openshift
```bash
oc apply -f ocp-deploy.yaml
```
## Run container locally
```bash
docker pull alpha60/ssl-exporter:latest
docker run --rm -e SSL_EXPIRATION_DOMAIN=github.com -p 80:8080 ssl-exporter
```
In another terminal
```bash
curl localhost/metrics
```
## Run binary locally
```bash
SSL_EXPIRATION_DOMAIN=github.com cargo r
```
In another terminal
```bash
curl localhost:8080/metrics
```
## Build container image
```bash
cargo b --release
BUILD_KIT=1 docker build -t ssl-exporter .
```
## Multiple domains
Just add them as a comma separated list like this: SSL_EXPIRATION_DOMAIN=github.com,microsoft.com,google.com