ntpd

package
v0.52.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

README

NTP daemon collector

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.

Metrics

All metrics have "ntpd." prefix.

Labels per scope:

  • global: no labels.
  • peer: peer_address.
Metric Scope Dimensions Units
sys_offset global offset milliseconds
sys_jitter global system, clock milliseconds
sys_frequency global frequency ppm
sys_wander global clock ppm
sys_rootdelay global delay milliseconds
sys_rootdisp global dispersion milliseconds
sys_stratum global stratum stratum
sys_tc global current, minimum log2
sys_precision global precision log2
peer_offset peer offset milliseconds
peer_delay peer delay milliseconds
peer_dispersion peer dispersion milliseconds
peer_jitter peer jitter milliseconds
peer_xleave peer xleave milliseconds
peer_rootdelay peer rootdelay milliseconds
peer_rootdisp peer dispersion milliseconds
peer_stratum peer stratum stratum
peer_hmode peer hmode hmode
peer_pmode peer pmode pmode
peer_hpoll peer hpoll log2
peer_ppoll peer ppoll log2
peer_precision peer precision log2

Configuration

Edit the go.d/ntpd.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory, if different
sudo ./edit-config go.d/ntpd.conf

Configuration example:

jobs:
  - name: local
    address: '127.0.0.1:123'
    collect_peers: no

  - name: remote
    address: '203.0.113.0:123'
    timeout: 3
    collect_peers: no

For all available options please see module configuration file.


Troubleshooting

To troubleshoot issues with the ntpd collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    sudo -u netdata -s
    
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m ntpd
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address      string       `yaml:"address"`
	Timeout      web.Duration `yaml:"timeout"`
	CollectPeers bool         `yaml:"collect_peers"`
}

type NTPd

type NTPd struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

func New

func New() *NTPd

func (*NTPd) Charts

func (n *NTPd) Charts() *module.Charts

func (*NTPd) Check

func (n *NTPd) Check() bool

func (*NTPd) Cleanup

func (n *NTPd) Cleanup()

func (*NTPd) Collect

func (n *NTPd) Collect() map[string]int64

func (*NTPd) Init

func (n *NTPd) Init() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL