Giter Club home page Giter Club logo

domain_exporter's Introduction

domain_exporter

FOSSA Status

Very simple service which performs WHOIS lookups for a list of domains provided in the "config" file and exposes them on a "/metrics" endpoint for consumption via Prometheus.

domains:
  - google.com
  - google.co.uk

Flags:

usage: domain_exporter [<flags>]

Flags:
  -h, --help                  Show context-sensitive help (also try --help-long and --help-man).
      --config="domains.yml"  Domain exporter configuration file.
      --bind=":9203"          The address to listen on for HTTP requests.
      --log.level=info        Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt     Output format of log messages. One of: [logfmt, json]
      --version               Show application version.

Docker image

We publish a docker image on the Quay registry. You can pull this with docker pull quay.io/shift/domain_exporter.

Running on Kubernetes

Here is an example Kubernetes deployment configuration for how to deploy the domain_exporter.

Example Prometheus Alert

The following alert will be triggered when domains expire within 45 days, or if they don't have a whois record available (perhaps having been long expired).

groups:
 - name: ./domain.rules
   rules:
    - alert: DomainExpiring
      expr: domain_expiration{} < 45
      for: 24h
      labels:
        severity: warning
      annotations:
        description: "{{ $labels.domain }} expires in {{ $value }} days"
    - alert: DomainUnfindable
      expr: domain_expiration_unfindable > 0
      for: 24h
      labels:
        severity: critical
      annotations:
        description: "Unable to find or parse expiry for {{ $labels.domain }}"
    - alert: DomainMetricsAbsent
      expr: absent(domain_expiration) > 0
      for: 1h
      labels:
        severity: warning
      annotations:
        description: "Metrics for domain-exporter are absent"

FAQ

Why did I get a negative amount of days until expiry?

The WHOIS resposne probably doesn't parse correctly. Please create an issue with the response and we'll add the format.

License

FOSSA Status

domain_exporter's People

Contributors

adamdecaf avatar fossabot avatar lostsnow avatar razius avatar shift avatar starkers avatar superq avatar vaelatern avatar yasharne avatar

Watchers

 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.