Prometheus metric exporter for dnsmasq servers
Find a file
Marc Tudurí 44b1448080
Move collector logic from main to separate package (#26)
Co-authored-by: Robert Fratto <robertfratto@gmail.com>
2023-06-20 12:00:26 +02:00
.github/workflows Move collector logic from main to separate package (#26) 2023-06-20 12:00:26 +02:00
collector Move collector logic from main to separate package (#26) 2023-06-20 12:00:26 +02:00
dnsmasq-mixin Fix accidental leftovers from dashboard schema upgrade (#21) 2023-01-31 12:46:47 +01:00
examples/openwrt-init.d Add init script for openwrt. (#8) 2020-10-11 19:18:38 +02:00
travis add integration test (running against an actual dnsmasq) 2018-05-05 17:02:25 +02:00
.promu.yml Add a build_info metric and a promu build spec. (#9) 2020-10-11 23:42:22 +02:00
CONTRIBUTING.md Initial commit 2017-10-30 06:23:40 -07:00
dnsmasq.go Move collector logic from main to separate package (#26) 2023-06-20 12:00:26 +02:00
dnsmasq_exporter.service Initial commit 2017-10-30 06:23:40 -07:00
Dockerfile Bump docker file so it builds again. (#18) 2021-10-14 20:24:47 +02:00
go.mod Bump github.com/prometheus/client_golang from 1.11.0 to 1.11.1 (#22) 2023-02-15 08:27:27 +01:00
go.sum Bump github.com/prometheus/client_golang from 1.11.0 to 1.11.1 (#22) 2023-02-15 08:27:27 +01:00
LICENSE Initial commit 2017-10-30 06:23:40 -07:00
README.md feat: add option to enable granular lease metrics (#24) 2023-04-07 18:09:17 +02:00

dnsmasq exporter

Build Status

dnsmasq_exporter is an exporter for Prometheus, allowing you to monitor/alert on the number of DHCP leases and various DNS statistics.

The minimum required version of dnsmasq is 2.69, which added support for querying the statistics via DNS.

See also the “cache statistics” section in https://manpages.debian.org/stretch/dnsmasq-base/dnsmasq.8.en.html#NOTES

This is not an official Google product.

Installation

go get -u github.com/google/dnsmasq_exporter

Usage

Place dnsmasq_exporter.service in /etc/systemd/system/dnsmasq_exporter.service, then enable and start the service using:

systemctl daemon-reload
systemctl enable --now dnsmasq_exporter

Alternative usage

docker build -t dnsmasq_exporter .
docker run --restart=unless-stopped --net=host dnsmasq_exporter

Then, add the endpoint to your Prometheus configuration file:

scrape_configs:
  - job_name: dnsmasq
    static_configs:
      - targets: ['localhost:9153']