@cryptotaxi247 / netdata-1 / commits / 3a372f9b9

docs(go.d/ping): clarify permissions (#18868)

Ilya Mashchenko committed Oct 25, 2024 at 12:33 UTC 3a372f9b9a772fa209be917ea440657fb97aadd5
1 file changed +22 -17
src/go/plugin/go.d/modules/ping/metadata.yaml
+22 -17
@@ -22,25 +22,30 @@ modules:
22 data_collection:
23 metrics_description: |
24 This module measures round-trip time and packet loss by sending ping messages to network hosts.
25 -
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 -
27 +
28 + - **Privileged** (send raw ICMP ping, default). Requires the necessary permissions ([CAP_NET_RAW](https://man7.org/linux/man-pages/man7/capabilities.7.html) on Linux, `setuid` bit on other systems).
29 +
30 + These permissions are **automatically** set during Netdata installation. However, if you need to set them manually:
31 + - set `CAP_NET_RAW` (Linux only).
32 + ```bash
33 + sudo setcap CAP_NET_RAW=eip <INSTALL_PREFIX>/usr/libexec/netdata/plugins.d/go.d.plugin
34 + ```
35 + - set `setuid` bit (Other OS).
36 + ```bash
37 + sudo chmod 4750 <INSTALL_PREFIX>/usr/libexec/netdata/plugins.d/go.d.plugin
38 + ```
39 +
40 + - **Unprivileged** (send UDP ping, Linux only). Requires configuring [ping_group_range](https://www.man7.org/linux/man-pages/man7/icmp.7.html):
41 +
42 + This configuration is **not set automatically** and requires manual configuration.
43 +
44 ```bash
45 sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"
46 ```
42 - To persist the change add `net.ipv4.ping_group_range=0 2147483647` to `/etc/sysctl.conf` and
43 - execute `sudo sysctl -p`.
47 +
48 + To persist the change add `net.ipv4.ping_group_range=0 2147483647` to `/etc/sysctl.conf` and execute `sudo sysctl -p`.
49 method_description: ""
50 supported_platforms:
51 include: []
@@ -121,7 +126,7 @@ modules:
126 - name: Multi-instance
127 description: |
128 > **Note**: When you define multiple jobs, their names must be unique.
124 -
129 +
130 Multiple instances.
131 config: |
132 jobs:
@@ -129,7 +134,7 @@ modules:
134 hosts:
135 - 192.0.2.0
136 - 192.0.2.1
132 -
137 +
138 - name: example2
139 packets: 10
140 hosts: