Page 1 of 2
Ping check is failing
Posted: Sat Jun 30, 2018 9:13 pm
by smapple
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
check_icmp: Failed to obtain ICMP socket: Operation not permitted
Ping check is failing..Can you let me know how do i get this working?
Re: Ping check is failing
Posted: Mon Jul 02, 2018 10:14 am
by lmiltchev
This is most likely a permissions issue. Can you verify the permissions on the "check_icmp" plugin, and correct them if necessary?
The same issue and a solution to the problem are described in the forum post below:
https://support.nagios.com/forum/viewto ... 28&p=30738
Let us know if this helped. Thank you!
Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:08 am
by smapple
I changed the permission as listed in the link you sent:
The permissions are changed to:
r-sr-sr-t
Howerver it still does not work

Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:24 am
by smapple
Hello, This issue still persists. I don't know what i am missing.Can you please help me?
Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:36 am
by smapple
I also get this:
Warning: This plugin must be either run as root or setuid root.
Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:45 am
by lmiltchev
These are the correct permissions (from a clean install of Nagios XI):
Code: Select all
ls -la /usr/local/nagios/libexec/check_icmp
-rwsrwxr-x 1 root nagios 191923 Jul 2 00:34 /usr/local/nagios/libexec/check_icmp
Make sure that your permissions are the same, then test running the plugin from the CLI, for example:
Code: Select all
/usr/local/nagios/libexec/check_icmp -V
Did this help?
Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:48 am
by smapple
[nagios@nagios3 libexec]$ ls -la /usr/local/nagios/libexec/check_icmp
-r-xr-xr-t. 1 root nagios 182123 Apr 9 2016 /usr/local/nagios/libexec/check_icmp
[nagios@nagios3 libexec]$ /usr/local/nagios/libexec/check_icmp -V
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
check_icmp v2.0.3 (nagios-plugins 2.0.3)
[nagios@nagios3 libexec]$
Nope its says u need to sun as root
Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:57 am
by lmiltchev
[nagios@nagios3 libexec]$ ls -la /usr/local/nagios/libexec/check_icmp
-r-xr-xr-t. 1 root nagios 182123 Apr 9 2016 /usr/local/nagios/libexec/check_icmp
[nagios@nagios3 libexec]$ /usr/local/nagios/libexec/check_icmp -V
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
check_icmp v2.0.3 (nagios-plugins 2.0.3)
[nagios@nagios3 libexec]$
Your permissions are
NOT the same as the ones I showed you. I would recommend running the command above (outlined in red) in order to fix your problem.
Example:
Code: Select all
chmod u+s /usr/local/nagios/libexec/check_icmp
Re: Ping check is failing
Posted: Mon Jul 02, 2018 11:59 am
by smapple
[nagios@nagios3 libexec]$ sudo chmod 775 check_icmp
[nagios@nagios3 libexec]$ /usr/local/nagios/libexec/check_icmp -V
Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
check_icmp v2.0.3 (nagios-plugins 2.0.3)
[nagios@nagios3 libexec]$ ls -la /usr/local/nagios/libexec/check_icmp
-rwxrwxr-x. 1 root nagios 182123 Apr 9 2016 /usr/local/nagios/libexec/check_icmp
Re: Ping check is failing
Posted: Mon Jul 02, 2018 12:00 pm
by smapple
sorry! Checking on that