Ping check is failing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Ping check is failing

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Ping check is failing

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Ping check is failing

Post 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 :(
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Ping check is failing

Post by smapple »

Hello, This issue still persists. I don't know what i am missing.Can you please help me?
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Ping check is failing

Post by smapple »

I also get this:


Warning: This plugin must be either run as root or setuid root.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Ping check is failing

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Ping check is failing

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Ping check is failing

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Ping check is failing

Post 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
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Ping check is failing

Post by smapple »

sorry! Checking on that
Locked