Giter Site home page Giter Site logo

kea-exporter's Introduction

GitHub license GitHub tag (latest SemVer) PyPI - Version PyPI - Downloads

kea-exporter

Prometheus Exporter for the ISC Kea DHCP Server.

From v0.4.0 on Kea >=1.3.0 is required, as the configuration, specifically subnet information, will be read from the control socket.

Installation

Package versions via repology.org

The latest stable version can always be installed from PyPi:

$ pip install kea-exporter

and upgraded with:

$ pip install --upgrade kea-exporter

Docker

A docker image is available and can be configured with environment variables see usage section

$ docker pull ghcr.io/mweinelt/kea-exporter

Features

  • DHCP4 & DHCP6 Metrics (tested against Kea 2.4.1)
  • Configuration and statistics via control socket or http api

Currently not working:

  • Automatic config reload (through inotify)

Known Limitations

The following features are not supported yet, help is welcome.

  • Shared Networks
  • Custom Subnet Identifiers

Usage

Pass one or multiple Unix Domain Socket path or HTTP Control-Agent URLs to the kea-exporter executable. All other options are optional.

Usage: python -m kea_exporter [OPTIONS] TARGETS...

Options:
  -a, --address TEXT      Address that the exporter binds to.
  -p, --port INTEGER      Port that the exporter binds to.
  -i, --interval INTEGER  Minimal interval between two queries to Kea in
                          seconds.
  --client-cert PATH      Path to client certificate used to in HTTP requests
  --client-key PATH       Path to client key used in HTTP requests
  --version               Show the version and exit.
  --help                  Show this message and exit.

You can also configure the exporter using environment variables:

export ADDRESS="0.0.0.0"
export PORT="9547"
export INTERVAL="7.5"
export TARGETS="http://router.example.com:8000"
export CLIENT_CERT="/etc/kea-exporter/client.crt"
export CLIENT_KEY="/etc/kea-exporter/client.key"

Configure Control Socket

The exporter uses Kea's control socket to request both configuration and statistics. Consult the documentation on how to set up the control socket:

HTTPS

If you need to validate a self-signed certificate on a Kea instance, you can set REQUESTS_CA_BUNDLE environment variable to a bundle CA path.

Permissions

Kea Exporter needs to be able to read and write on the socket, hence it's permissions might need to be modified accordingly.

Grafana-Dashboard

A dashboard for this exporter is available at https://grafana.com/grafana/dashboards/12688.

kea-exporter's People

Contributors

mweinelt avatar m0nsterrr avatar qwiko 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.