Page 1 of 1
Bulk loaded hosts, but they are reporting down
Posted: Fri Apr 27, 2018 12:23 pm
by andrewatmacys
I bulk loaded hosts onto an installation of Nagios XI, but every single one is reporting down. I will attach pictures, it's giving me a strange error I've never encountered before. Please let me know how to fix this so I can run host checks on these servers.
Re: Bulk loaded hosts, but they are reporting down
Posted: Fri Apr 27, 2018 1:11 pm
by cdienger
check_imcp is one of a couple plugins that require special permissions. Doing a "ll /usr/local/nagios/libexec/check_icmp" should show something like:
-rwsrwxr-x 1 root nagios 181827 Jan 26 2017 check_icmp
If you see something different try changing permissions with:
chmod 4775 /usr/local/nagios/libexec/check_icmp
chown root:nagios /usr/local/nagios/libexec/check_icmp
Re: Bulk loaded hosts, but they are reporting down
Posted: Mon Apr 30, 2018 10:03 am
by andrewatmacys
In performing the above commands, I noticed the rest of the commands in that directory were not owned by Nagios, should they be?
Re: Bulk loaded hosts, but they are reporting down
Posted: Mon Apr 30, 2018 10:11 am
by cdienger
Most of the other plugins will likely have permissions set to something like:
-rwxrwxr-x. 1 apache nagios 2791 Mar 26 10:35 utils.sh
This is default and okay.
Re: Bulk loaded hosts, but they are reporting down
Posted: Mon Apr 30, 2018 10:39 am
by andrewatmacys
Unfortunately I am still encountering the same error as before. Should I remove the hosts and reload them?
Re: Bulk loaded hosts, but they are reporting down
Posted: Mon Apr 30, 2018 12:52 pm
by cdienger
Were the permissions set correctly on check_icmp? What's the output of:
ll /usr/local/nagios/libexec/check_icmp
The host can be deleted and recreated but the problem will remain if the permissions are not set. Another option would be to switch to check_ping which effectively does the same job but doesn't require the setuid bit to be set.
Re: Bulk loaded hosts, but they are reporting down
Posted: Tue May 01, 2018 7:55 am
by andrewatmacys
-rwxrwxr-x 1 root nagios 181827 Apr 17 15:11 /usr/local/nagios/libexec/check_icmp
This is the output, it seems correct from the example given earlier.
Re: Bulk loaded hosts, but they are reporting down
Posted: Tue May 01, 2018 12:50 pm
by cdienger
There is a slight difference actually. The setuid(the s in -rwsrwxr-x) isn't set. To set it run:
chmod 4775 /usr/local/nagios/libexec/check_icmp