On-demand SSL/TLS certificate checker that receives web and ftp targets from Prometheus
384
Short description: On-demand SSL/TLS certificate checker that receives web and ftp targets from Prometheus (?target=), exposes metrics on /metrics, and ships with Docker/Compose/Swarm manifests plus a ready-to-import Grafana dashboard.
If the repository is public, this description is used to index your content on Docker Hub and in search engines, and is visible to users in search results.
Exporter serves metrics on request and gets the domain from query ?target= (or ?domain=). It does not read any local domain list; targets always come from Prometheus relabel.
# from services/monitoring/ssl-exporter-v2
docker build -t ssl-exporter2:latest .
docker run -d --name ssl-exporter-v2 \
-p 9115:9115 \
ssl-exporter2:latest
Uses docker-compose.yml (builds image locally, publishes 9116->9115, joins external network monitoring):
docker compose up -d
docker compose logs -f ssl-exporter-v2
docker compose down
Uses docker-stack.yml (expects image ssl-exporter2:latest already built/pushed):
docker network create --driver overlay monitoring # once
docker stack deploy -c docker-stack.yml exporters
docker service logs -f exporters_ssl-exporter-v2
Prometheus passes domains via target param; exporter address is rewritten by relabel. Job example:
- job_name: ssl_exporter_v2
metrics_path: /probe
params:
module: [https]
file_sd_configs:
- files:
- /etc/prometheus/targets/ssl-exporter-v2/*.yml
refresh_interval: 1m
relabel_configs:
- source_labels: [__address__]
target_label: __param_target # domain -> query param
- source_labels: [__address__]
target_label: instance # instance = domain
- replacement: monitoring_ssl-exporter-v2:9116
target_label: __address__ # exporter service address
file_sd example (services/monitoring/prometheus/configs/targets/ssl-exporter-v2/ssl-exporter-v2.yml):
targets:
- example.com
- www.example.com
- ftp://ftp.example.com
Prometheus will scrape: http://monitoring_ssl-exporter-v2:9116/metrics?target=<domain>.
ssl_cert_days_left{domain,is_ftp}ssl_cert_start_timestamp{domain,is_ftp}ssl_cert_end_timestamp{domain,is_ftp}ssl_cert_domain_colored{domain,is_ftp}ssl_target_http_status{domain,is_ftp} — HTTPS status or FTP reply code.grafana-dashboard-ssl-exporter-v2.json (next to this README, author: mr.imi).DS_PROM).Status color: 200–399 green, 400–499 yellow, ≥500 red.Days Left color: 0–10 red, 11–20 orange, 21–30 yellow, 30+ green.Content type
Image
Digest
sha256:6e14ef436…
Size
5.9 MB
Last updated
5 months ago
docker pull imitatop/ssl-exporter2-web-ftp:linux-amd64-latest