Skip to content

Commit

Permalink
docs(go.d/ping): clarify permissions (netdata#18868)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Oct 25, 2024
1 parent d7827c4 commit 3a372f9
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions src/go/plugin/go.d/modules/ping/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,30 @@ modules:
data_collection:
metrics_description: |
This module measures round-trip time and packet loss by sending ping messages to network hosts.
There are two operational modes:
- privileged (send raw ICMP ping, default). Requires
CAP_NET_RAW [capability](https://man7.org/linux/man-pages/man7/capabilities.7.html) or root privileges:
> **Note**: set automatically during Netdata installation.
```bash
sudo setcap CAP_NET_RAW=eip <INSTALL_PREFIX>/usr/libexec/netdata/plugins.d/go.d.plugin
```
- unprivileged (send UDP ping, Linux only).
Requires configuring [ping_group_range](https://www.man7.org/linux/man-pages/man7/icmp.7.html):
- **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).
These permissions are **automatically** set during Netdata installation. However, if you need to set them manually:
- set `CAP_NET_RAW` (Linux only).
```bash
sudo setcap CAP_NET_RAW=eip <INSTALL_PREFIX>/usr/libexec/netdata/plugins.d/go.d.plugin
```
- set `setuid` bit (Other OS).
```bash
sudo chmod 4750 <INSTALL_PREFIX>/usr/libexec/netdata/plugins.d/go.d.plugin
```
- **Unprivileged** (send UDP ping, Linux only). Requires configuring [ping_group_range](https://www.man7.org/linux/man-pages/man7/icmp.7.html):
This configuration is **not set automatically** and requires manual configuration.
```bash
sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"
```
To persist the change add `net.ipv4.ping_group_range=0 2147483647` to `/etc/sysctl.conf` and
execute `sudo sysctl -p`.
To persist the change add `net.ipv4.ping_group_range=0 2147483647` to `/etc/sysctl.conf` and execute `sudo sysctl -p`.
method_description: ""
supported_platforms:
include: []
Expand Down Expand Up @@ -121,15 +126,15 @@ modules:
- name: Multi-instance
description: |
> **Note**: When you define multiple jobs, their names must be unique.
Multiple instances.
config: |
jobs:
- name: example1
hosts:
- 192.0.2.0
- 192.0.2.1
- name: example2
packets: 10
hosts:
Expand Down

0 comments on commit 3a372f9

Please sign in to comment.