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,
Error for ICMP Plugin
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error for ICMP Plugin
check_icmp need root suid permissions
You likely need to run
Code: Select all
-rwsrwxr-x 1 root nagios 159216 Jun 2 09:07 /usr/local/nagios/libexec/check_icmpCode: Select all
chmod u+s /usr/local/nagios/libexec/check_icmp-
rajesh_kohmu
- Posts: 8
- Joined: Tue Jul 21, 2020 2:00 pm
Re: Error for ICMP Plugin
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?
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
now it is:
rta nan, lost 100%
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
Are you sure you can ping these same host addresses from the CLI?
Because if you cannot, it could be a firewall issue between your Nagios server and the host blocking ICMP requests
Code: Select all
ping x.x.x.x-
rajesh_kohmu
- Posts: 8
- Joined: Tue Jul 21, 2020 2:00 pm
Re: Error for ICMP Plugin
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
Great!rajesh_kohmu wrote:Solved it. It was firewall issue. Thanks much for quick response.
Locking thread