Giter Site home page Giter Site logo

prometheus-ssl-exporter's Introduction

SSL Exporter for Prometheus

Run checks against HTTPS and SMTP (STARTTLS) endpoints and expose metrics about their SSL certificates

Installation

$ go get -u github.com/chrj/prometheus-ssl-exporter

Usage

Usage of prometheus-ssl-exporter:
  -config string
    	Configuration file (default "/etc/ssl/checks")
  -listen-address string
    	Prometheus metrics port (default ":9203")
  -timeout duration
    	Timeout for network operations (default 10s)

Metrics

Gauge: ssl_certificate_days_left

Number of days left on the certificate.

Labels:

  • domain
  • type

Gauge: ssl_endpoint_up

Was the last SSL poll successful.

Labels:

  • domain
  • type

Examples

# HELP ssl_certificate_days_left Number of days left on the certificate
# TYPE ssl_certificate_days_left gauge
ssl_certificate_days_left{domain="smtp.gmail.com",type="smtp"} 48
ssl_certificate_days_left{domain="www.google.com",type="http"} 48
ssl_certificate_days_left{domain="www.technobabble.dk",type="http"} 36
# HELP ssl_endpoint_up Was the last SSL poll successful
# TYPE ssl_endpoint_up gauge
ssl_endpoint_up{domain="smtp.gmail.com",type="smtp"} 1
ssl_endpoint_up{domain="www.google.com",type="http"} 1
ssl_endpoint_up{domain="www.technobabble.dk",type="http"} 1

Configuration

Supply a configuration file path with -config (optionally, defaults to /etc/ssl/checks). Uses TOML.

Sample configuration file

Prometheus target

Supply a listen address with -addr (optionally, defaults to :9203), and configure a Prometheus job:

- job_name: "ssl"
  scrape_interval: "1m"
  static_configs:
    - targets:
        - "server:9203"

Prometheus alert

The real benefit is getting an alert triggered when an SSL certificate is nearing expiration or not responding. Check this sample alert definition.

prometheus-ssl-exporter's People

Contributors

chrj avatar yuriykis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.