Skip to content

Commit

Permalink
Rename to ntpd, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
rda0 committed Feb 20, 2018
1 parent cb68bfa commit b43b605
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 41 deletions.
13 changes: 4 additions & 9 deletions conf.d/python.d/ntp.conf → conf.d/python.d/ntpd.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# netdata python.d.plugin configuration for ntp
# netdata python.d.plugin configuration for ntpd
#
# This file is in YaML format. Generally the format is:
#
Expand Down Expand Up @@ -58,15 +58,10 @@
#
# host: 'localhost' # the host to query
# port: '123' # the UDP port where `ntpd` listens
# peer_filter: '127\..*' # regex to exclude peers by ip or name
# all_peers: no # use `yes` to show peer charts
# peer_filter: '127\..*' # regex to exclude peers
# # by default local peers are hidden
# # use `'.*'` to disable the peers submenu.
# peer_names: yes # show peer names instead of ip addresses
# # by default names are shown, if the dns name
# # of the peer matches the local host's fqdn,
# # the matching domain part is hidden.
# # Set to `no` to show ip addresses.
# # Dots `.` are replaced by dashes `-`.
# # use `''` to show all peers.
#
# ----------------------------------------------------------------------
# AUTO-DETECTION JOBS
Expand Down
10 changes: 5 additions & 5 deletions python.d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1472,9 +1472,9 @@ Configuration is not needed.

---

# ntp
# ntpd

Module monitors the system variables of the local `ntpd` daemon, incl. variables of the polled peers using the NTP Control Message Protocol via UDP socket, similar to `ntpq`.
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`.

**Requirements:**
* Version of `ntpd` must be 2.0+
Expand Down Expand Up @@ -1521,8 +1521,8 @@ update_every: 10
host: 'localhost'
port: '123'
peer_names: yes
peer_filter: '(127\..*)|(.*\.example\.com)'
all_peers: yes
peer_filter: '(127\..*)|(192\.168\..*)'
```

Sample (multiple jobs):
Expand All @@ -1537,7 +1537,7 @@ otherhost:
host: 'otherhost'
```
If no configuration is given, module will attempt to connect to `ntpd` on `::1:123` or `127.0.0.1:123`. Peer names are resolved using reverse dns lookup of the source address. Local peers (127.*) are hidden by default, use `peer_filter: '.*'` to show all. To disable reverse lookup and show ip addresses instead, use `peer_names: no`. Any dots `.` are replaced with dashes `-`.
If no configuration is given, module will attempt to connect to `ntpd` on `::1:123` or `127.0.0.1:123` and show charts for the systemvars. Use `all_peers: yes` to also show the charts for configured peers. Local peers (127.*) are hidden by default, use `peer_filter: ''` to show all.

---

Expand Down
46 changes: 23 additions & 23 deletions python.d/ntp.chart.py → python.d/ntpd.chart.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Description: ntp netdata python.d module
# Description: ntpd netdata python.d module
# Author: Sven Mäder (rda0)
# Author: Ilya Mashchenko (l2isbad)

Expand Down Expand Up @@ -53,109 +53,109 @@

CHARTS = {
'sys_offset': {
'options': [None, 'Combined offset of server relative to this host', 'ms', 'system', 'ntp.sys_offset', 'area'],
'options': [None, 'Combined offset of server relative to this host', 'ms', 'system', 'ntpd.sys_offset', 'area'],
'lines': [
['offset', 'offset', 'absolute', 1, PRECISION]
]},
'sys_jitter': {
'options': [None, 'Combined system jitter and clock jitter', 'ms', 'system', 'ntp.sys_jitter', 'line'],
'options': [None, 'Combined system jitter and clock jitter', 'ms', 'system', 'ntpd.sys_jitter', 'line'],
'lines': [
['sys_jitter', 'system', 'absolute', 1, PRECISION],
['clk_jitter', 'clock', 'absolute', 1, PRECISION]
]},
'sys_frequency': {
'options': [None, 'Frequency offset relative to hardware clock', 'ppm', 'system', 'ntp.sys_frequency', 'area'],
'options': [None, 'Frequency offset relative to hardware clock', 'ppm', 'system', 'ntpd.sys_frequency', 'area'],
'lines': [
['frequency', 'frequency', 'absolute', 1, PRECISION]
]},
'sys_wander': {
'options': [None, 'Clock frequency wander', 'ppm', 'system', 'ntp.sys_wander', 'area'],
'options': [None, 'Clock frequency wander', 'ppm', 'system', 'ntpd.sys_wander', 'area'],
'lines': [
['clk_wander', 'clock', 'absolute', 1, PRECISION]
]},
'sys_rootdelay': {
'options': [None, 'Total roundtrip delay to the primary reference clock', 'ms', 'system',
'ntp.sys_rootdelay', 'area'],
'ntpd.sys_rootdelay', 'area'],
'lines': [
['rootdelay', 'delay', 'absolute', 1, PRECISION]
]},
'sys_rootdisp': {
'options': [None, 'Total root dispersion to the primary reference clock', 'ms', 'system',
'ntp.sys_rootdisp', 'area'],
'ntpd.sys_rootdisp', 'area'],
'lines': [
['rootdisp', 'dispersion', 'absolute', 1, PRECISION]
]},
'sys_stratum': {
'options': [None, 'Stratum (1-15)', '1', 'system', 'ntp.sys_stratum', 'line'],
'options': [None, 'Stratum (1-15)', '1', 'system', 'ntpd.sys_stratum', 'line'],
'lines': [
['stratum', 'stratum', 'absolute', 1, PRECISION]
]},
'sys_tc': {
'options': [None, 'Time constant and poll exponent (3-17)', 'log2 s', 'system', 'ntp.sys_tc', 'line'],
'options': [None, 'Time constant and poll exponent (3-17)', 'log2 s', 'system', 'ntpd.sys_tc', 'line'],
'lines': [
['tc', 'current', 'absolute', 1, PRECISION],
['mintc', 'minimum', 'absolute', 1, PRECISION]
]},
'sys_precision': {
'options': [None, 'Precision', 'log2 s', 'system', 'ntp.sys_precision', 'line'],
'options': [None, 'Precision', 'log2 s', 'system', 'ntpd.sys_precision', 'line'],
'lines': [
['precision', 'precision', 'absolute', 1, PRECISION]
]}
}

PEER_CHARTS = {
'peer_offset': {
'options': [None, 'Filter offset', 'ms', 'peers', 'ntp.peer_offset', 'line'],
'options': [None, 'Filter offset', 'ms', 'peers', 'ntpd.peer_offset', 'line'],
'lines': [
]},
'peer_delay': {
'options': [None, 'Filter delay', 'ms', 'peers', 'ntp.peer_delay', 'line'],
'options': [None, 'Filter delay', 'ms', 'peers', 'ntpd.peer_delay', 'line'],
'lines': [
]},
'peer_dispersion': {
'options': [None, 'Filter dispersion', 'ms', 'peers', 'ntp.peer_dispersion', 'line'],
'options': [None, 'Filter dispersion', 'ms', 'peers', 'ntpd.peer_dispersion', 'line'],
'lines': [
]},
'peer_jitter': {
'options': [None, 'Filter jitter', 'ms', 'peers', 'ntp.peer_jitter', 'line'],
'options': [None, 'Filter jitter', 'ms', 'peers', 'ntpd.peer_jitter', 'line'],
'lines': [
]},
'peer_xleave': {
'options': [None, 'Interleave delay', 'ms', 'peers', 'ntp.peer_xleave', 'line'],
'options': [None, 'Interleave delay', 'ms', 'peers', 'ntpd.peer_xleave', 'line'],
'lines': [
]},
'peer_rootdelay': {
'options': [None, 'Total roundtrip delay to the primary reference clock', 'ms', 'peers',
'ntp.peer_rootdelay', 'line'],
'ntpd.peer_rootdelay', 'line'],
'lines': [
]},
'peer_rootdisp': {
'options': [None, 'Total root dispersion to the primary reference clock', 'ms', 'peers',
'ntp.peer_rootdisp', 'line'],
'ntpd.peer_rootdisp', 'line'],
'lines': [
]},
'peer_stratum': {
'options': [None, 'Stratum (1-15)', '1', 'peers', 'ntp.peer_stratum', 'line'],
'options': [None, 'Stratum (1-15)', '1', 'peers', 'ntpd.peer_stratum', 'line'],
'lines': [
]},
'peer_hmode': {
'options': [None, 'Host mode (1-6)', '1', 'peers', 'ntp.peer_hmode', 'line'],
'options': [None, 'Host mode (1-6)', '1', 'peers', 'ntpd.peer_hmode', 'line'],
'lines': [
]},
'peer_pmode': {
'options': [None, 'Peer mode (1-5)', '1', 'peers', 'ntp.peer_pmode', 'line'],
'options': [None, 'Peer mode (1-5)', '1', 'peers', 'ntpd.peer_pmode', 'line'],
'lines': [
]},
'peer_hpoll': {
'options': [None, 'Host poll exponent', 'log2 s', 'peers', 'ntp.peer_hpoll', 'line'],
'options': [None, 'Host poll exponent', 'log2 s', 'peers', 'ntpd.peer_hpoll', 'line'],
'lines': [
]},
'peer_ppoll': {
'options': [None, 'Peer poll exponent', 'log2 s', 'peers', 'ntp.peer_ppoll', 'line'],
'options': [None, 'Peer poll exponent', 'log2 s', 'peers', 'ntpd.peer_ppoll', 'line'],
'lines': [
]},
'peer_precision': {
'options': [None, 'Precision', 'log2 s', 'peers', 'ntp.peer_precision', 'line'],
'options': [None, 'Precision', 'log2 s', 'peers', 'ntpd.peer_precision', 'line'],
'lines': [
]}
}
Expand Down
8 changes: 4 additions & 4 deletions web/dashboard_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ netdataDashboard.menu = {
info: 'Provides statistics on the <b><a href="http://ceph.com/">ceph</a></b> cluster server, the open-source distributed storage system.'
},

'ntp': {
title: 'NTP',
'ntpd': {
title: 'ntpd',
icon: '<i class="fas fa-clock"></i>',
info: 'Provides statistics for the internal variables of the Network Time Protocol daemon <b><a href="http://www.ntp.org/">ntpd</a></b> including the configured peers.'
}
Expand Down Expand Up @@ -495,12 +495,12 @@ netdataDashboard.submenu = {
info: 'Detailed information about the status of the Erlang VM that hosts CouchDB. These are intended for advanced users only. High values of the peak message queue (>10e6) generally indicate an overload condition.'
},

'ntp.system': {
'ntpd.system': {
title: 'system',
info: 'Statistics of the internal system variables as shown by <a href="http://doc.ntp.org/current-stable/ntpq.html">ntpq</a> (standard NTP query program).'
},

'ntp.peers': {
'ntpd.peers': {
title: 'peers',
info: 'Statistics of the peer variables for each peer as shown by <a href="http://doc.ntp.org/current-stable/ntpq.html">ntpq</a> (standard NTP query program).'
}
Expand Down

0 comments on commit b43b605

Please sign in to comment.