Skip to main content

Dnsmasq DNS Forwarder

Dnsmasq is a lightweight, easy to configure DNS forwarder, designed to provide DNS (and optionally DHCP and TFTP) services to a small-scale network.

This module monitors one or more Dnsmasq DNS Forwarder instances, depending on your configuration.

It collects DNS cache statistics by reading the response on the following query:

;; opcode: QUERY, status: NOERROR, id: 37862
;; flags: rd; QUERY: 7, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;cachesize.bind. CH TXT
;insertions.bind. CH TXT
;evictions.bind. CH TXT
;hits.bind. CH TXT
;misses.bind. CH TXT
;auth.bind. CH TXT
;servers.bind. CH TXT


  • Queries forwarded to the upstream servers in queries/s
  • Cache size in entries
  • Cache operations in operations/s
  • Cache performance in events/s


Edit the go.d/dnsmasq.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/dnsmasq.conf

Needs only address, here is an example with two jobs:

- name: local
address: ''

- name: remote
address: ''

For all available options, see the dnsmasq collector's configuration file.


To troubleshoot issues with the dnsmasq collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

First, navigate to your plugins directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the setting plugins directory. Once you're in the plugin's directory, switch to the netdata user.

cd /usr/libexec/netdata/plugins.d/
sudo -u netdata -s

You can now run the go.d.plugin to debug the collector:

./go.d.plugin -d -m dnsmasq

Was this page helpful?