github.com/netdata/go.d.plugin@v0.58.1/modules/ntpd/integrations/ntpd.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/ntpd/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/ntpd/metadata.yaml" 4 sidebar_label: "NTPd" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/System Clock and NTP" 7 most_popular: False 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # NTPd 12 13 14 <img src="https://netdata.cloud/img/ntp.png" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: ntpd 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This 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](https://doc.ntp.org/current-stable/ntpq.html). 25 26 27 28 29 This collector is supported on all platforms. 30 31 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 32 33 34 ### Default Behavior 35 36 #### Auto-Detection 37 38 This integration doesn't support auto-detection. 39 40 #### Limits 41 42 The default configuration for this integration does not impose any limits on data collection. 43 44 #### Performance Impact 45 46 The default configuration for this integration is not expected to impose a significant performance impact on the system. 47 48 49 ## Metrics 50 51 Metrics grouped by *scope*. 52 53 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 54 55 56 57 ### Per NTPd instance 58 59 These metrics refer to the entire monitored application. 60 61 This scope has no labels. 62 63 Metrics: 64 65 | Metric | Dimensions | Unit | 66 |:------|:----------|:----| 67 | ntpd.sys_offset | offset | milliseconds | 68 | ntpd.sys_jitter | system, clock | milliseconds | 69 | ntpd.sys_frequency | frequency | ppm | 70 | ntpd.sys_wander | clock | ppm | 71 | ntpd.sys_rootdelay | delay | milliseconds | 72 | ntpd.sys_rootdisp | dispersion | milliseconds | 73 | ntpd.sys_stratum | stratum | stratum | 74 | ntpd.sys_tc | current, minimum | log2 | 75 | ntpd.sys_precision | precision | log2 | 76 77 ### Per peer 78 79 These metrics refer to the NTPd peer. 80 81 Labels: 82 83 | Label | Description | 84 |:-----------|:----------------| 85 | peer_address | peer's source IP address | 86 87 Metrics: 88 89 | Metric | Dimensions | Unit | 90 |:------|:----------|:----| 91 | ntpd.peer_offset | offset | milliseconds | 92 | ntpd.peer_delay | delay | milliseconds | 93 | ntpd.peer_dispersion | dispersion | milliseconds | 94 | ntpd.peer_jitter | jitter | milliseconds | 95 | ntpd.peer_xleave | xleave | milliseconds | 96 | ntpd.peer_rootdelay | rootdelay | milliseconds | 97 | ntpd.peer_rootdisp | dispersion | milliseconds | 98 | ntpd.peer_stratum | stratum | stratum | 99 | ntpd.peer_hmode | hmode | hmode | 100 | ntpd.peer_pmode | pmode | pmode | 101 | ntpd.peer_hpoll | hpoll | log2 | 102 | ntpd.peer_ppoll | ppoll | log2 | 103 | ntpd.peer_precision | precision | log2 | 104 105 106 107 ## Alerts 108 109 There are no alerts configured by default for this integration. 110 111 112 ## Setup 113 114 ### Prerequisites 115 116 No action required. 117 118 ### Configuration 119 120 #### File 121 122 The configuration file name for this integration is `go.d/ntpd.conf`. 123 124 125 You can edit the configuration file using the `edit-config` script from the 126 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 127 128 ```bash 129 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 130 sudo ./edit-config go.d/ntpd.conf 131 ``` 132 #### Options 133 134 The following options can be defined globally: update_every, autodetection_retry. 135 136 137 <details><summary>Config options</summary> 138 139 | Name | Description | Default | Required | 140 |:----|:-----------|:-------|:--------:| 141 | update_every | Data collection frequency. | 1 | no | 142 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 143 | address | Server address in IP:PORT format. | 127.0.0.1:123 | yes | 144 | timeout | Connection/read/write timeout. | 3 | no | 145 | collect_peers | Determines whether peer metrics will be collected. | no | no | 146 147 </details> 148 149 #### Examples 150 151 ##### Basic 152 153 A basic example configuration. 154 155 <details><summary>Config</summary> 156 157 ```yaml 158 jobs: 159 - name: local 160 address: 127.0.0.1:123 161 162 ``` 163 </details> 164 165 ##### With peers metrics 166 167 Collect peers metrics. 168 169 <details><summary>Config</summary> 170 171 ```yaml 172 jobs: 173 - name: local 174 address: 127.0.0.1:123 175 collect_peers: yes 176 177 ``` 178 </details> 179 180 ##### Multi-instance 181 182 > **Note**: When you define multiple jobs, their names must be unique. 183 184 Collecting metrics from local and remote instances. 185 186 187 <details><summary>Config</summary> 188 189 ```yaml 190 jobs: 191 - name: local 192 address: 127.0.0.1:123 193 194 - name: remote 195 address: 203.0.113.0:123 196 197 ``` 198 </details> 199 200 201 202 ## Troubleshooting 203 204 ### Debug Mode 205 206 To troubleshoot issues with the `ntpd` collector, run the `go.d.plugin` with the debug option enabled. The output 207 should give you clues as to why the collector isn't working. 208 209 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 210 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 211 212 ```bash 213 cd /usr/libexec/netdata/plugins.d/ 214 ``` 215 216 - Switch to the `netdata` user. 217 218 ```bash 219 sudo -u netdata -s 220 ``` 221 222 - Run the `go.d.plugin` to debug the collector: 223 224 ```bash 225 ./go.d.plugin -d -m ntpd 226 ``` 227 228