plugins/inputs/nsd/README.md
This plugin gathers statistics from a NLnet Labs Name Server Daemon, an authoritative DNS name server.
⭐ Telegraf v1.0.0 🏷️ server 💻 all
Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See CONFIGURATION.md for more details.
# A plugin to collect stats from the NSD DNS resolver
[[inputs.nsd]]
## Address of server to connect to, optionally ':port'. Defaults to the
## address in the nsd config file.
server = "127.0.0.1:8953"
## If running as a restricted user you can prepend sudo for additional access:
# use_sudo = false
## The default location of the nsd-control binary can be overridden with:
# binary = "/usr/sbin/nsd-control"
## The default location of the nsd config file can be overridden with:
# config_file = "/etc/nsd/nsd.conf"
## The default timeout of 1s can be overridden with:
# timeout = "1s"
It's important to note that this plugin references nsd-control, which may require additional permissions to execute successfully. Depending on the user/group permissions of the telegraf user executing this plugin, you may need to alter the group membership, set facls, or use sudo.
Group membership (Recommended):
$ groups telegraf
telegraf : telegraf
$ usermod -a -G nsd telegraf
$ groups telegraf
telegraf : telegraf nsd
Sudo privileges: If you use this method, you will need the following in your telegraf config:
[[inputs.nsd]]
use_sudo = true
You will also need to update your sudoers file:
$ visudo
# Add the following line:
Cmnd_Alias NSDCONTROLCTL = /usr/sbin/nsd-control
telegraf ALL=(ALL) NOPASSWD: NSDCONTROLCTL
Defaults!NSDCONTROLCTL !logfile, !syslog, !pam_session
Please use the solution you see as most appropriate.
This is the full list of stats provided by nsd-control. In the output, the dots in the nsd-control stat name are replaced by underscores (see https://www.nlnetlabs.nl/documentation/nsd/nsd-control/ for details).
nsd
nsd_servers