dns plugin¶
| Plugin name | dns |
| Type | read |
| Callbacks | config, init, read |
| Status | supported |
| Since | 3.11 |
| Copyright | 2006–2007 Florian octo Forster, 2009 Mirko Buffoni |
| License | GPLv2 |
| Configuration | collectd.conf(5) |
The DNS plugin has a similar functionality to dnstop: It uses libpcap to get a copy of all traffic from/to port UDP/53 (that's the DNS port), interprets the packets and collects statistics of your DNS traffic. The interface it should listen on and whether or not the packets sent by the own host should be collected or not can be set in the configuration file. The details are documented in the collectd.conf(5) manpage.
The metrics collected by this plugin are:
- OpCode: Number of packets with a specific opcode, e. g. the number of packets that contained a query.
QType: Number of queries for each record type. Common record types are for example
A,AAAA,MX, andNS. RCode: Number of response codes seen. Common response codes are for exampleNOERROR(query was successful) andNXDOMAIN(domain or subdomain doesn't exist). Octets: Number of octets sent/received.
Example graphs¶

Caveats¶
chkrootkit¶
Since with this plugin acts as a packet sniffer, tools like chkrootkit may start reporting collectd as "suspicious program". Please don't be alarmed – if you load this plugin collectd is supposed to sniff packets. Nothing is done with the sniffed data except counting various aspects of DNS traffic, as you can see in the Example graphs section. But you don't have to take my word for it: Let the source code do the convincing ;)
Dependencies¶
See also¶
Configuration¶
Configuration options · from collectd.conf(5)
See this section in the full configuration reference
- Interface Interface
- The dns plugin uses libpcap to capture dns traffic and analyzes it. This option sets the interface that should be used. If this option is not set, or set to "any", the plugin will try to get packets from all interfaces. This may not work on certain platforms, such as MacE<nbsp>OSE<nbsp>X.
- IgnoreSource IP-address
- Ignore packets that originate from this address.
- SelectNumericQueryTypes true|false
- Enabled by default, collects unknown (and thus presented as numeric only) query types.