Page 1 of 1

Host Critical status - Sysem call sent warnings to stderr

Posted: Thu Sep 01, 2016 6:13 am
by Nagios_Admin_M
I have a host down notification email plus website output compounded with a proper string informing, that state of the monitoring host is critical, and string which says, "System call sent warnings to stderr."

PING CRITICAL - System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr Packet loss = 100%

When I tried to run this command from command line using this /usr/local/nagios/libexec/check_icmp I am echoing with:

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

Than I change the file permission and ownership
chmod u+s
chmod g+s
chown root:nagios

The solutions not helped and I am continuously having this information from failing server.

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Thu Sep 01, 2016 2:13 pm
by rkennedy
First off, what version of check_icmp are you running? /usr/local/nagios/libexec/check_icmp -V

What are the full permissions on the file?

Code: Select all

ls -al /usr/local/nagios/libexec/check_icmp
Lastly, what happens if you run su nagios and then /usr/local/nagios/libexec/check_icmp -H google.com? Please post the full input / output.

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Fri Sep 02, 2016 5:14 am
by Nagios_Admin_M
1.
check_icmp v2.0.3 (nagios-plugins 2.0.3)
2.
-rwxrwSrwx. 1 nagios nagios 181765 May 12 2015 /usr/local/nagios/libexec/check_icmp
OR
-rwsrwSrwx. 1 nagios nagios 181765 May 12 2015 /usr/local/nagios/libexec/check_icmp
3.
bash:/usr/local/nagios/libexec/check_icmp -H localhost
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

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Fri Sep 02, 2016 11:46 am
by tgriep
The user ownership for that plugin has to set as root. Run these commands to fix that.

Code: Select all

chown root.nagios /usr/local/nagios/libexec/check_icmp
chmod u+s /usr/local/nagios/libexec/check_icmp
That should fix it for you.

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Sun Sep 04, 2016 7:08 am
by Nagios_Admin_M
It did not fix the problem.

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Tue Sep 06, 2016 10:39 am
by rkennedy
Can you provide more information? Simply 'It did not fix the problem' doesn't help us very much to see what's going on.

Please show us the full permissions on the file -

Code: Select all

ls -al /usr/local/nagios/libexec/check_icmp

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Tue Sep 06, 2016 11:18 am
by Nagios_Admin_M
Sure, this is the output:

-rwsrwsrwx. 1 root nagios 181765 May 12 2015 /usr/local/nagios/libexec/check_icmp

I could run the /usr/local/nagios/libexec/check_icmp command when I logged in as nagios user, but I have this error again.

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Tue Sep 06, 2016 3:46 pm
by tgriep
Could you post your commands.cfg file and how the settings for the host are configured that is causing the error so we can view them?

Re: Host Critical status - Sysem call sent warnings to stder

Posted: Wed Sep 07, 2016 10:00 am
by Nagios_Admin_M
I replaced check-host-active section in the commands.cfg file from check_ping to check_icmp. Post is solved.