diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:22:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:22:44 +0000 |
commit | 1e6c93250172946eeb38e94a92a1fd12c9d3011e (patch) | |
tree | 8ca5e16dfc7ad6b3bf2738ca0a48408a950f8f7e /collectors/python.d.plugin/nsd | |
parent | Update watch file (diff) | |
download | netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.tar.xz netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.zip |
Merging upstream version 1.11.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/python.d.plugin/nsd/Makefile.inc | 13 | ||||
-rw-r--r-- | collectors/python.d.plugin/nsd/README.md | 54 | ||||
-rw-r--r-- | collectors/python.d.plugin/nsd/nsd.chart.py (renamed from python.d/nsd.chart.py) | 45 | ||||
-rw-r--r-- | collectors/python.d.plugin/nsd/nsd.conf (renamed from conf.d/python.d/nsd.conf) | 0 |
4 files changed, 93 insertions, 19 deletions
diff --git a/collectors/python.d.plugin/nsd/Makefile.inc b/collectors/python.d.plugin/nsd/Makefile.inc new file mode 100644 index 000000000..58e9fd67d --- /dev/null +++ b/collectors/python.d.plugin/nsd/Makefile.inc @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +# THIS IS NOT A COMPLETE Makefile +# IT IS INCLUDED BY ITS PARENT'S Makefile.am +# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT + +# install these files +dist_python_DATA += nsd/nsd.chart.py +dist_pythonconfig_DATA += nsd/nsd.conf + +# do not install these files, but include them in the distribution +dist_noinst_DATA += nsd/README.md nsd/Makefile.inc + diff --git a/collectors/python.d.plugin/nsd/README.md b/collectors/python.d.plugin/nsd/README.md new file mode 100644 index 000000000..02c302f41 --- /dev/null +++ b/collectors/python.d.plugin/nsd/README.md @@ -0,0 +1,54 @@ +# nsd + +Module uses the `nsd-control stats_noreset` command to provide `nsd` statistics. + +**Requirements:** + * Version of `nsd` must be 4.0+ + * Netdata must have permissions to run `nsd-control stats_noreset` + +It produces: + +1. **Queries** + * queries + +2. **Zones** + * master + * slave + +3. **Protocol** + * udp + * udp6 + * tcp + * tcp6 + +4. **Query Type** + * A + * NS + * CNAME + * SOA + * PTR + * HINFO + * MX + * NAPTR + * TXT + * AAAA + * SRV + * ANY + +5. **Transfer** + * NOTIFY + * AXFR + +6. **Return Code** + * NOERROR + * FORMERR + * SERVFAIL + * NXDOMAIN + * NOTIMP + * REFUSED + * YXDOMAIN + + +Configuration is not needed. + +--- diff --git a/python.d/nsd.chart.py b/collectors/python.d.plugin/nsd/nsd.chart.py index 499dfda2e..d713f46bd 100644 --- a/python.d/nsd.chart.py +++ b/collectors/python.d.plugin/nsd/nsd.chart.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Description: NSD `nsd-control stats_noreset` netdata python.d module # Author: <383c57 at gmail.com> +# SPDX-License-Identifier: GPL-3.0-or-later import re @@ -16,27 +17,29 @@ ORDER = ['queries', 'zones', 'protocol', 'type', 'transfer', 'rcode'] CHARTS = { 'queries': { - 'options': [ - None, "queries", 'queries/s', 'queries', 'nsd.queries', 'line'], + 'options': [None, 'queries', 'queries/s', 'queries', 'nsd.queries', 'line'], 'lines': [ - ['num_queries', 'queries', 'incremental'],]}, + ['num_queries', 'queries', 'incremental'] + ] + }, 'zones': { - 'options': [ - None, "zones", 'zones', 'zones', 'nsd.zones', 'stacked'], + 'options': [None, 'zones', 'zones', 'zones', 'nsd.zones', 'stacked'], 'lines': [ ['zone_master', 'master', 'absolute'], - ['zone_slave', 'slave', 'absolute'],]}, + ['zone_slave', 'slave', 'absolute'] + ] + }, 'protocol': { - 'options': [ - None, "protocol", 'queries/s', 'protocol', 'nsd.protocols', 'stacked'], + 'options': [None, 'protocol', 'queries/s', 'protocol', 'nsd.protocols', 'stacked'], 'lines': [ ['num_udp', 'udp', 'incremental'], ['num_udp6', 'udp6', 'incremental'], ['num_tcp', 'tcp', 'incremental'], - ['num_tcp6', 'tcp6', 'incremental'],]}, + ['num_tcp6', 'tcp6', 'incremental'] + ] + }, 'type': { - 'options': [ - None, "query type", 'queries/s', 'query type', 'nsd.type', 'stacked'], + 'options': [None, 'query type', 'queries/s', 'query type', 'nsd.type', 'stacked'], 'lines': [ ['num_type_A', 'A', 'incremental'], ['num_type_NS', 'NS', 'incremental'], @@ -49,16 +52,18 @@ CHARTS = { ['num_type_TXT', 'TXT', 'incremental'], ['num_type_AAAA', 'AAAA', 'incremental'], ['num_type_SRV', 'SRV', 'incremental'], - ['num_type_TYPE255', 'ANY', 'incremental'],]}, + ['num_type_TYPE255', 'ANY', 'incremental'] + ] + }, 'transfer': { - 'options': [ - None, "transfer", 'queries/s', 'transfer', 'nsd.transfer', 'stacked'], + 'options': [None, 'transfer', 'queries/s', 'transfer', 'nsd.transfer', 'stacked'], 'lines': [ ['num_opcode_NOTIFY', 'NOTIFY', 'incremental'], - ['num_type_TYPE252', 'AXFR', 'incremental'],]}, + ['num_type_TYPE252', 'AXFR', 'incremental'] + ] + }, 'rcode': { - 'options': [ - None, "return code", 'queries/s', 'return code', 'nsd.rcode', 'stacked'], + 'options': [None, 'return code', 'queries/s', 'return code', 'nsd.rcode', 'stacked'], 'lines': [ ['num_rcode_NOERROR', 'NOERROR', 'incremental'], ['num_rcode_FORMERR', 'FORMERR', 'incremental'], @@ -66,7 +71,9 @@ CHARTS = { ['num_rcode_NXDOMAIN', 'NXDOMAIN', 'incremental'], ['num_rcode_NOTIMP', 'NOTIMP', 'incremental'], ['num_rcode_REFUSED', 'REFUSED', 'incremental'], - ['num_rcode_YXDOMAIN', 'YXDOMAIN', 'incremental'],]} + ['num_rcode_YXDOMAIN', 'YXDOMAIN', 'incremental'] + ] + } } @@ -74,7 +81,7 @@ class Service(ExecutableService): def __init__(self, configuration=None, name=None): ExecutableService.__init__( self, configuration=configuration, name=name) - self.command = "nsd-control stats_noreset" + self.command = 'nsd-control stats_noreset' self.order = ORDER self.definitions = CHARTS self.regex = re.compile(r'([A-Za-z0-9.]+)=(\d+)') diff --git a/conf.d/python.d/nsd.conf b/collectors/python.d.plugin/nsd/nsd.conf index 078e97216..078e97216 100644 --- a/conf.d/python.d/nsd.conf +++ b/collectors/python.d.plugin/nsd/nsd.conf |