github.com/netdata/go.d.plugin@v0.58.1/modules/ping/integrations/ping.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/ping/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/ping/metadata.yaml" 4 sidebar_label: "Ping" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/Synthetic Checks" 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 # Ping 12 13 14 <img src="https://netdata.cloud/img/globe.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: ping 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This module measures round-tripe time and packet loss by sending ping messages to network hosts. 25 26 There are two operational modes: 27 28 - privileged (send raw ICMP ping, default). Requires 29 CAP_NET_RAW [capability](https://man7.org/linux/man-pages/man7/capabilities.7.html) or root privileges: 30 > **Note**: set automatically during Netdata installation. 31 32 ```bash 33 sudo setcap CAP_NET_RAW=eip <INSTALL_PREFIX>/usr/libexec/netdata/plugins.d/go.d.plugin 34 ``` 35 36 - unprivileged (send UDP ping, Linux only). 37 Requires configuring [ping_group_range](https://www.man7.org/linux/man-pages/man7/icmp.7.html): 38 39 ```bash 40 sudo sysctl -w net.ipv4.ping_group_range="0 2147483647" 41 ``` 42 To persist the change add `net.ipv4.ping_group_range="0 2147483647"` to `/etc/sysctl.conf` and 43 execute `sudo sysctl -p`. 44 45 46 47 48 This collector is supported on all platforms. 49 50 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 51 52 53 ### Default Behavior 54 55 #### Auto-Detection 56 57 This integration doesn't support auto-detection. 58 59 #### Limits 60 61 The default configuration for this integration does not impose any limits on data collection. 62 63 #### Performance Impact 64 65 The default configuration for this integration is not expected to impose a significant performance impact on the system. 66 67 68 ## Metrics 69 70 Metrics grouped by *scope*. 71 72 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 73 74 75 76 ### Per host 77 78 These metrics refer to the remote host. 79 80 Labels: 81 82 | Label | Description | 83 |:-----------|:----------------| 84 | host | remote host | 85 86 Metrics: 87 88 | Metric | Dimensions | Unit | 89 |:------|:----------|:----| 90 | ping.host_rtt | min, max, avg | milliseconds | 91 | ping.host_std_dev_rtt | std_dev | milliseconds | 92 | ping.host_packet_loss | loss | percentage | 93 | ping.host_packets | received, sent | packets | 94 95 96 97 ## Alerts 98 99 100 The following alerts are available: 101 102 | Alert name | On metric | Description | 103 |:------------|:----------|:------------| 104 | [ ping_host_reachable ](https://github.com/netdata/netdata/blob/master/health/health.d/ping.conf) | ping.host_packet_loss | network host ${lab1el:host} reachability status | 105 | [ ping_packet_loss ](https://github.com/netdata/netdata/blob/master/health/health.d/ping.conf) | ping.host_packet_loss | packet loss percentage to the network host ${label:host} over the last 10 minutes | 106 | [ ping_host_latency ](https://github.com/netdata/netdata/blob/master/health/health.d/ping.conf) | ping.host_rtt | average latency to the network host ${label:host} over the last 10 seconds | 107 108 109 ## Setup 110 111 ### Prerequisites 112 113 No action required. 114 115 ### Configuration 116 117 #### File 118 119 The configuration file name for this integration is `go.d/ping.conf`. 120 121 122 You can edit the configuration file using the `edit-config` script from the 123 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 124 125 ```bash 126 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 127 sudo ./edit-config go.d/ping.conf 128 ``` 129 #### Options 130 131 The following options can be defined globally: update_every, autodetection_retry. 132 133 134 <details><summary>Config options</summary> 135 136 | Name | Description | Default | Required | 137 |:----|:-----------|:-------|:--------:| 138 | update_every | Data collection frequency. | 5 | no | 139 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 140 | hosts | Network hosts. | | yes | 141 | network | Allows configuration of DNS resolution. Supported options: ip (select IPv4 or IPv6), ip4 (select IPv4), ip6 (select IPv6). | ip | no | 142 | privileged | Ping packets type. "no" means send an "unprivileged" UDP ping, "yes" - raw ICMP ping. | yes | no | 143 | packets | Number of ping packets to send. | 5 | no | 144 | interval | Timeout between sending ping packets. | 100ms | no | 145 146 </details> 147 148 #### Examples 149 150 ##### IPv4 hosts 151 152 An example configuration. 153 154 <details><summary>Config</summary> 155 156 ```yaml 157 jobs: 158 - name: example 159 hosts: 160 - 192.0.2.0 161 - 192.0.2.1 162 163 ``` 164 </details> 165 166 ##### Unprivileged mode 167 168 An example configuration. 169 170 <details><summary>Config</summary> 171 172 ```yaml 173 jobs: 174 - name: example 175 privileged: no 176 hosts: 177 - 192.0.2.0 178 - 192.0.2.1 179 180 ``` 181 </details> 182 183 ##### Multi-instance 184 185 > **Note**: When you define multiple jobs, their names must be unique. 186 187 Multiple instances. 188 189 190 <details><summary>Config</summary> 191 192 ```yaml 193 jobs: 194 - name: example1 195 hosts: 196 - 192.0.2.0 197 - 192.0.2.1 198 199 - name: example2 200 packets: 10 201 hosts: 202 - 192.0.2.3 203 - 192.0.2.4 204 205 ``` 206 </details> 207 208 209 210 ## Troubleshooting 211 212 ### Debug Mode 213 214 To troubleshoot issues with the `ping` collector, run the `go.d.plugin` with the debug option enabled. The output 215 should give you clues as to why the collector isn't working. 216 217 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 218 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 219 220 ```bash 221 cd /usr/libexec/netdata/plugins.d/ 222 ``` 223 224 - Switch to the `netdata` user. 225 226 ```bash 227 sudo -u netdata -s 228 ``` 229 230 - Run the `go.d.plugin` to debug the collector: 231 232 ```bash 233 ./go.d.plugin -d -m ping 234 ``` 235 236