summaryrefslogtreecommitdiffstats
path: root/conf.d/python.d/nsd.conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--conf.d/python.d/nsd.conf (renamed from conf.d/python.d/nginx_log.conf)38
1 files changed, 26 insertions, 12 deletions
diff --git a/conf.d/python.d/nginx_log.conf b/conf.d/python.d/nsd.conf
index 6a53c520..7566fe85 100644
--- a/conf.d/python.d/nginx_log.conf
+++ b/conf.d/python.d/nsd.conf
@@ -1,4 +1,4 @@
-# netdata python.d.plugin configuration for nginx log
+# netdata python.d.plugin configuration for nsd
#
# This file is in YaML format. Generally the format is:
#
@@ -20,7 +20,8 @@
# update_every sets the default data collection frequency.
# If unset, the python.d.plugin default is used.
-# update_every: 1
+# nsd-control is slow, so once every 30 seconds
+# update_every: 30
# priority controls the order of charts at the netdata dashboard.
# Lower numbers move the charts towards the top of the page.
@@ -54,19 +55,32 @@
# priority: 60000 # the JOB's order on the dashboard
# retries: 5 # the JOB's number of restoration attempts
#
-# Additionally to the above, nginx_log also supports the following:
+# Additionally to the above, nsd also supports the following:
#
-# path: 'PATH' # the path to nginx's access.log
+# command: 'nsd-control stats_noreset' # the command to run
#
# ----------------------------------------------------------------------
-# AUTO-DETECTION JOBS
-# only one of them will run (they have the same name)
+# IMPORTANT Information
+#
+# Netdata must have permissions to run `nsd-control stats_noreset` command
+#
+# - Example-1 (use "sudo")
+# 1. sudoers (e.g. visudo -f /etc/sudoers.d/netdata)
+# Defaults:netdata !requiretty
+# netdata ALL=(ALL) NOPASSWD: /usr/sbin/nsd-control stats_noreset
+# 2. etc/netdata/python.d/nsd.conf
+# local:
+# update_every: 30
+# command: 'sudo /usr/sbin/nsd-control stats_noreset'
+#
+# - Example-2 (add "netdata" user to "nsd" group)
+# usermod -aG nsd netdata
+#
-nginx_log:
- name: 'local'
- path: '/var/log/nginx/access.log'
+# ----------------------------------------------------------------------
+# AUTO-DETECTION JOBS
-nginx_log2:
- name: 'local'
- path: '/var/log/nginx/nginx-access.log'
+local:
+ update_every: 30
+ command: 'nsd-control stats_noreset'