Sign inSign up

tylerschmidtke/ssl_certificate_exporter

By tylerschmidtke

•Updated almost 10 years ago

Prometheus exporter that scans networks for SSL certificate expiry metrics

Image
0

2.0K

tylerschmidtke/ssl_certificate_exporter repository overview

⁠SSL Certificate Exporter

Prometheus exporter for SSL certificate metrics. This exporter is designed to scan network ranges to discover certificates on scanned hosts and retrieve the expiration time in days, namely for instances where you do not have a service discovery mechanism that Prometheus supports. If you do, I recommend using the blackbox_exporter⁠.

⁠Configuring, and running

⁠Docker
docker run tylerschmidtke/ssl_certificate_exporter --nets 127.0.0.1/32,127.0.1.1/32
⁠Running Locally
  1. Install requirements:

    pip install -r requirements.txt
    
  2. Run using your preferred method, I use supervisord⁠.

⁠Prometheus

Add a block to the scrape_configs of your prometheus.yml config file:

scrape_configs:
    
...
    
- job_name: ssl_certificate_exporter
  static_configs:
  - targets: ['example.com:9515']

...
⁠Flags
NameDescription
--netsComma-separated list of networks to scan.
--portPort to listen on for web interface and telemetry. Default 9515.
--ssl_portPort to scan on remote hosts for SSL certificates. Default 443.
--sleepTime to wait between scans in seconds. Default 43200 (12 hours).
--timeoutTimeout interval for SSL connections in seconds. Default .5.
--no_dnsDo not perform rDNS lookups.
--debugDebug level logging.
⁠Metrics
NameDescription
ssl_certificate_days_validTime in days that the certificate is valid.
⁠Labels
NameDescription
commonNameCommon Name on the certificate.
ipAddressIP address from which the certificate was received.
hostnameHostname for the scanned IP address if rDNS is available.
issuerIssuer of the certificate
serialNumberSerial number of the certificate
⁠Caveats

Requires that the certificate is signed by a valid Certificate Authority.

⁠Suggestions?

Open an issue or PR if you have more suggestions or ideas about what to add.

Tag summary

Content type

Image

Digest

Size

22.6 MB

Last updated

almost 10 years ago

docker pull tylerschmidtke/ssl_certificate_exporter