This makes the exporter expose a dnsmasq_exporter_build_info metric, which not only allows you to see what version you're running, but also allows you to dynamically select the job label in a Gragana dashboard - making the dashboards more portable. To make sure the the build_info metric is correctly populated, I've added a promu build spec, allowing the exporter to be build with promu, the tool we use to build Prometheus and various exporters. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
dnsmasq exporter
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']
Description
Languages
Go
87.3%
Dockerfile
7.7%
Makefile
4.3%
Jsonnet
0.7%