Error for ICMP Plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajesh_kohmu
Posts: 8
Joined: Tue Jul 21, 2020 2:00 pm

Error for ICMP Plugin

Post by rajesh_kohmu »

Hello Guys,

While creating host services there was error for host which says it is down. But all services were up and running and on Nagios XI console it was 'OK' State(Which is green)

out of curious i tried to check the script which is checking for ICMP ping and it had root permissions. Changed it to apache:nagios and it throwed me an error. Rolled back the changes to root:nagios. But now it is still showing as below error:


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


Can someone please help on the above error?

Thanks,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error for ICMP Plugin

Post by scottwilkerson »

check_icmp need root suid permissions

Code: Select all

-rwsrwxr-x 1 root nagios 159216 Jun  2 09:07 /usr/local/nagios/libexec/check_icmp
You likely need to run

Code: Select all

chmod u+s /usr/local/nagios/libexec/check_icmp
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rajesh_kohmu
Posts: 8
Joined: Tue Jul 21, 2020 2:00 pm

Re: Error for ICMP Plugin

Post by rajesh_kohmu »

Thanks Scott,

yes, I made changes to the file with u+s and it worked for few hosts but for few it is "(No output on stdout) stderr:"

Any idea?
rajesh_kohmu
Posts: 8
Joined: Tue Jul 21, 2020 2:00 pm

Re: Error for ICMP Plugin

Post by rajesh_kohmu »

now it is:

rta nan, lost 100% :(
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error for ICMP Plugin

Post by scottwilkerson »

Are you sure you can ping these same host addresses from the CLI?

Code: Select all

ping x.x.x.x
Because if you cannot, it could be a firewall issue between your Nagios server and the host blocking ICMP requests
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rajesh_kohmu
Posts: 8
Joined: Tue Jul 21, 2020 2:00 pm

Re: Error for ICMP Plugin

Post by rajesh_kohmu »

Solved it. It was firewall issue. Thanks much for quick response.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error for ICMP Plugin

Post by scottwilkerson »

rajesh_kohmu wrote:Solved it. It was firewall issue. Thanks much for quick response.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked