Host Critical status - Sysem call sent warnings to stderr

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Nagios_Admin_M
Posts: 77
Joined: Fri Jul 22, 2016 4:39 am

Host Critical status - Sysem call sent warnings to stderr

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
Nagios_Admin_M
Posts: 77
Joined: Fri Jul 22, 2016 4:39 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Nagios_Admin_M
Posts: 77
Joined: Fri Jul 22, 2016 4:39 am

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

Post by Nagios_Admin_M »

It did not fix the problem.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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
Former Nagios Employee
Nagios_Admin_M
Posts: 77
Joined: Fri Jul 22, 2016 4:39 am

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

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Nagios_Admin_M
Posts: 77
Joined: Fri Jul 22, 2016 4:39 am

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

Post by Nagios_Admin_M »

I replaced check-host-active section in the commands.cfg file from check_ping to check_icmp. Post is solved.
Locked