Prometheus metric exporter for dnsmasq servers
Find a file
Gabriel Simmer 15a997cf5b
All checks were successful
CI / tests (push) Successful in 27s
CI / build (push) Successful in 35s
Fix up Actions (#2)
Reviewed-on: #2
Co-authored-by: Gabriel Simmer <g@gmem.ca>
Co-committed-by: Gabriel Simmer <g@gmem.ca>
2024-04-24 10:27:18 +01:00
.github/workflows Fix up Actions (#2) 2024-04-24 10:27:18 +01:00
collector Tweak test expected values, share same ID for queries 2024-04-24 09:12:29 +01:00
dnsmasq-mixin Upgrade dependencies for Go 1.22 2024-04-24 08:40:42 +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 Fix up Actions (#2) 2024-04-24 10:27:18 +01:00
dnsmasq_exporter.service Initial commit 2017-10-30 06:23:40 -07:00
Dockerfile Upgrade dependencies for Go 1.22 2024-04-24 08:40:42 +01:00
go.mod Upgrade dependencies for Go 1.22 2024-04-24 08:40:42 +01:00
go.sum Upgrade dependencies for Go 1.22 2024-04-24 08:40:42 +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']