Skip to content

Commit

Permalink
Update README for inputs.ping with correct cmd for native ping on Lin…
Browse files Browse the repository at this point in the history
…ux (influxdata#8787)

* Update readme  to enable native ping

* Provide more information on the numbers being set

* reference for ping_group_range already exists
  • Loading branch information
sspaink authored Feb 8, 2021
1 parent 291100e commit 690ffd8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/inputs/ping/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ setting capabilities.

[man 7 capabilities]: http://man7.org/linux/man-pages/man7/capabilities.7.html

When Telegraf cannot listen on a privileged ICMP socket it will attempt to use
ICMP echo sockets. If you wish to use this method you must ensure Telegraf's
group, usually `telegraf`, is allowed to use ICMP echo sockets:
On Linux the default behaviour is to restrict creation of ping sockets for everybody. Execute the below command to enable creation of ping sockets for all possible user groups. The integers provided to ping_group_range defines the range of user groups that are permited to create ping sockets, were 2147483647 (the max of a signed int 2^31) is the max group identifier (GID).

```sh
$ sysctl -w net.ipv4.ping_group_range="GROUP_ID_LOW GROUP_ID_HIGH"
$ sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"
```

Reference [`man 7 icmp`][man 7 icmp] for more information about ICMP echo
Expand Down

0 comments on commit 690ffd8

Please sign in to comment.