Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

dnsmasq_exporter

Prometheus metrics exporter for the Dnsmasq network services

Description

Prometheus metrics exporter for the Dnsmasq network services.

Metrics are obtained by querying Dnsmasq directly over its DNS endpoint.

Usage

Considerations

  • Requires Dnsmasq 2.69 or above!
  • Tune your configuration. All configuration is done through environment variables:
    • DNSMASQ_SERVERS: (defaults to 127.0.0.1:53) comma-separated list of <address>:<port> pairs of Dnsmasq servers' addresses
    • EXPORTER_LISTEN_ADDR: (defaults to 127.0.0.1:9153), bind address for dnsmasq_exporter

With the prebuilt container image

Available on Docker Hub as docker.io/ricardbejarano/dnsmasq_exporter:

Also available on Quay as quay.io/ricardbejarano/dnsmasq_exporter:

Any of both registries will do, example:

docker run -it -p 9153:9153 quay.io/ricardbejarano/dnsmasq_exporter

Building the container image from source

First clone the repository, and cd into it:

docker build -t dnsmasq_exporter .

Now run it:

docker run -it -p 9153:9153 dnsmasq_exporter

Building the binary from source

First clone the repository, and cd into it.

make

Now run it:

./bin/dnsmasq_exporter

Integrating with Prometheus

Add the following to prometheus.yml:

scrape_configs:
  - job_name: "dnsmasq"
    static_configs:
      - targets: ["<DNSMASQ_EXPORTER_ADDRESS>:9153"]

License

MIT licensed, see LICENSE for more details.