summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/ntpd
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/ntpd')
-rw-r--r--collectors/python.d.plugin/ntpd/README.md22
-rw-r--r--collectors/python.d.plugin/ntpd/ntpd.chart.py3
2 files changed, 19 insertions, 6 deletions
diff --git a/collectors/python.d.plugin/ntpd/README.md b/collectors/python.d.plugin/ntpd/README.md
index d4d0dc60d..0b08f12b8 100644
--- a/collectors/python.d.plugin/ntpd/README.md
+++ b/collectors/python.d.plugin/ntpd/README.md
@@ -1,8 +1,14 @@
-# ntpd
+<!--
+title: "NTP daemon monitoring with Netdata"
+custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/ntpd/README.md
+sidebar_label: "NTP daemon"
+-->
-Module monitors the system variables of the local `ntpd` daemon (optional incl. variables of the polled peers) using the NTP Control Message Protocol via UDP socket, similar to `ntpq`, the [standard NTP query program](http://doc.ntp.org/current-stable/ntpq.html).
+# NTP daemon monitoring with Netdata
-**Requirements:**
+Monitors the system variables of the local `ntpd` daemon (optional incl. variables of the polled peers) using the NTP Control Message Protocol via UDP socket, similar to `ntpq`, the [standard NTP query program](http://doc.ntp.org/current-stable/ntpq.html).
+
+## Requirements
- Version: `NTPv4`
- Local interrogation allowed in `/etc/ntp.conf` (default):
@@ -41,7 +47,15 @@ It produces:
- ppoll
- precision
-## configuration
+## Configuration
+
+Edit the `python.d/ntpd.conf` configuration file using `edit-config` from the Netdata [config
+directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
+
+```bash
+cd /etc/netdata # Replace this path with your Netdata config directory, if different
+sudo ./edit-config python.d/ntpd.conf
+```
Sample:
diff --git a/collectors/python.d.plugin/ntpd/ntpd.chart.py b/collectors/python.d.plugin/ntpd/ntpd.chart.py
index e33332cb3..275d2276c 100644
--- a/collectors/python.d.plugin/ntpd/ntpd.chart.py
+++ b/collectors/python.d.plugin/ntpd/ntpd.chart.py
@@ -4,12 +4,11 @@
# Author: Ilya Mashchenko (ilyam8)
# SPDX-License-Identifier: GPL-3.0-or-later
-import struct
import re
+import struct
from bases.FrameworkServices.SocketService import SocketService
-
# NTP Control Message Protocol constants
MODE = 6
HEADER_FORMAT = '!BBHHHHH'