Awesome Open Source
Awesome Open Source

domain_exporter

Exports the expiration time of your domains as prometheus metrics.

Running

./domain_exporter -b ":9222"

Or with docker:

docker run -p 9222:9222 caarlos0/domain_exporter

Environment variables

  • DOMAIN_EXPORTER_URL_PREFIX - use when HTTP endpoint served with a prefix, e.g.:

    For this endpoint http://example.org/exporters/domains set to /exporters/domains.

    Not really required since useful only to prevent breaking human-oriented links.

    Defaults to empty string.

Configuration

On the prometheus settings, add the domain_exporter prober:

- job_name: domain
  metrics_path: /probe
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: domain
    - target_label: __address__
      replacement: localhost:9222 # domain_exporter address
  static_configs:
    - targets:
      - carlosbecker.com
      - carinebecker.com
      - watchub.pw

It works more or less like prometheus's blackbox_exporter.

Alerting rules examples can be found on the _examples folder.

Building locally

Install the needed tooling and libs:

make setup

Run with:

go run main.go

Run tests with:

make test

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (15,124
prometheus-exporter (80