From 690ffd8d2ee6220ee9bb95bee63791ebef40d2a7 Mon Sep 17 00:00:00 2001 From: Sebastian Spaink <3441183+sspaink@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:36:23 -0600 Subject: [PATCH] Update README for inputs.ping with correct cmd for native ping on Linux (#8787) * Update readme to enable native ping * Provide more information on the numbers being set * reference for ping_group_range already exists --- plugins/inputs/ping/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/inputs/ping/README.md b/plugins/inputs/ping/README.md index 83a91a2eeb96d..7293a17081a71 100644 --- a/plugins/inputs/ping/README.md +++ b/plugins/inputs/ping/README.md @@ -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