Prometheus metric exporter for dnsmasq servers
Find a file
Felix Ehrenpfort d5b74a1f9b
metrics: adding support for servers.bind. statistic (#7)
this commit adds support for the servers.bind. statistic
which is exposed by dnsmasq and provides information about the
number of successful and failed queries on each configured
upstream server
2020-02-25 08:18:18 +01:00
testdata add integration test (running against an actual dnsmasq) 2018-05-05 17:02:25 +02:00
travis add integration test (running against an actual dnsmasq) 2018-05-05 17:02:25 +02:00
.travis.yml fix vet warnings, update invocation 2019-10-22 08:55:57 +02:00
CONTRIBUTING.md Initial commit 2017-10-30 06:23:40 -07:00
dnsmasq.go metrics: adding support for servers.bind. statistic (#7) 2020-02-25 08:18:18 +01:00
dnsmasq_exporter.service Initial commit 2017-10-30 06:23:40 -07:00
dnsmasq_test.go add integration test (running against an actual dnsmasq) 2018-05-05 17:02:25 +02:00
Dockerfile adding non-root user in dockerfile (#6) 2019-09-19 08:06:56 +02:00
go.mod Added Dockerfile (#5) 2019-06-17 16:40:24 +02:00
go.sum add go.sum 2019-10-22 08:45:09 +02:00
LICENSE Initial commit 2017-10-30 06:23:40 -07:00
README.md Added Dockerfile (#5) 2019-06-17 16:40:24 +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']