---
title: ''
description: Telegraf plugin for collecting metrics from NLnet Labs Name Server Daemon
url: https://docs.influxdata.com/telegraf/v1/input-plugins/nsd/
estimated_tokens: 1216
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/input-plugins/nsd/
date: '2026-05-21T20:10:18+02:00'
lastmod: '2026-05-21T20:10:18+02:00'
---

==========

* Telegraf v1.0.0+

[Plugin source](https://github.com/influxdata/telegraf/tree/v1.39.1/plugins/inputs/nsd/)[Download configuration](https://raw.githubusercontent.com/influxdata/telegraf/refs/tags/v1.39.1/plugins/inputs/nsd/sample.conf)

# NLnet Labs Name Server Daemon Input Plugin

This plugin gathers statistics from a [NLnet Labs Name Server Daemon](https://www.nlnetlabs.nl/projects/nsd/about), an
authoritative DNS name server.

**Introduced in:** Telegraf v1.0.0**Tags:** server**OS support:** all

## Global configuration options

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](/telegraf/v1/configuration/#plugins) for more details.

## Configuration

```toml
# 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"
```

### Permissions

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)**:

```bash
$ 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:

```toml
[[inputs.nsd]]
  use_sudo = true
```

You will also need to update your sudoers file:

```bash
$ 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.

## Metrics

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/](https://www.nlnetlabs.nl/documentation/nsd/nsd-control/) for details).

* nsd

  * fields:
    * num\_queries
    * time\_boot
    * time\_elapsed
    * size\_db\_disk
    * size\_db\_mem
    * size\_xfrd\_mem
    * size\_config\_disk
    * size\_config\_mem
    * num\_type\_TYPE0
    * num\_type\_A
    * num\_type\_NS
    * num\_type\_MD
    * num\_type\_MF
    * num\_type\_CNAME
    * num\_type\_SOA
    * num\_type\_MB
    * num\_type\_MG
    * num\_type\_MR
    * num\_type\_NULL
    * num\_type\_WKS
    * num\_type\_PTR
    * num\_type\_HINFO
    * num\_type\_MINFO
    * num\_type\_MX
    * num\_type\_TXT
    * num\_type\_RP
    * num\_type\_AFSDB
    * num\_type\_X25
    * num\_type\_ISDN
    * num\_type\_RT
    * num\_type\_NSAP
    * num\_type\_SIG
    * num\_type\_KEY
    * num\_type\_PX
    * num\_type\_AAAA
    * num\_type\_LOC
    * num\_type\_NXT
    * num\_type\_SRV
    * num\_type\_NAPTR
    * num\_type\_KX
    * num\_type\_CERT
    * num\_type\_DNAME
    * num\_type\_OPT
    * num\_type\_APL
    * num\_type\_DS
    * num\_type\_SSHFP
    * num\_type\_IPSECKEY
    * num\_type\_RRSIG
    * num\_type\_NSEC
    * num\_type\_DNSKEY
    * num\_type\_DHCID
    * num\_type\_NSEC3
    * num\_type\_NSEC3PARAM
    * num\_type\_TLSA
    * num\_type\_SMIMEA
    * num\_type\_CDS
    * num\_type\_CDNSKEY
    * num\_type\_OPENPGPKEY
    * num\_type\_CSYNC
    * num\_type\_SPF
    * num\_type\_NID
    * num\_type\_L32
    * num\_type\_L64
    * num\_type\_LP
    * num\_type\_EUI48
    * num\_type\_EUI64
    * num\_type\_TYPE252
    * num\_type\_TYPE253
    * num\_type\_TYPE255
    * num\_opcode\_QUERY
    * num\_opcode\_NOTIFY
    * num\_class\_CLASS0
    * num\_class\_IN
    * num\_class\_CH
    * num\_rcode\_NOERROR
    * num\_rcode\_FORMERR
    * num\_rcode\_SERVFAIL
    * num\_rcode\_NXDOMAIN
    * num\_rcode\_NOTIMP
    * num\_rcode\_REFUSED
    * num\_rcode\_YXDOMAIN
    * num\_rcode\_NOTAUTH
    * num\_edns
    * num\_ednserr
    * num\_udp
    * num\_udp6
    * num\_tcp
    * num\_tcp6
    * num\_tls
    * num\_tls6
    * num\_answer\_wo\_aa
    * num\_rxerr
    * num\_txerr
    * num\_raxfr
    * num\_truncated
    * num\_dropped
    * zone\_master
    * zone\_slave

* nsd\_servers

  * tags:
    * server

  * fields:
    * queries

## Example Output
