Page 2 of 3

Re: Restarting Nagios Client on OSX server

Posted: Fri Jul 17, 2015 12:56 pm
by cfgriffith
As far as I can tell xinetd is not installed or running. There is no /etc/ config for it and I do not see it when I ps aux | grep xine

Re: Restarting Nagios Client on OSX server

Posted: Fri Jul 17, 2015 1:07 pm
by tgriep
Can you upload the log file that should be in the folder that you compiled NRPE in?
Maybe it didn't compile so that is why it may not be running.

Re: Restarting Nagios Client on OSX server

Posted: Fri Jul 17, 2015 2:50 pm
by cfgriffith
Here are the log files.

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 8:01 am
by jdalrymple
what about `ps aux | grep nrpe`? I suspect it has to be running otherwise your errors would look a bit different. I wonder what the exact command being run is though - namely I wonder if it's loading the right config file.

The next step if that looks right is to spin up debugging in the nrpe.cfg:

Code: Select all

# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on

debug=1
And then of course restart the daemon... then see what comes of it

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 1:49 pm
by cfgriffith
Marcomm-Server-MM-0487:etc admin$ ps aux | grep nrpe
nagios 39497 0.0 0.0 2460752 476 ?? Ss Thu09AM 0:02.84 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
admin 45036 0.0 0.0 2432772 540 s000 S+ 1:57PM 0:00.00 grep nrpe


Yeah I see the process when I ps aux grep for it. Will restart the daemon in debugging and see what it finds. Although I was having trouble starting and stoping the daemon we'll see if i I have it this time.

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 2:01 pm
by cfgriffith
Okay I put it into debugging mode and restarted the daemon. Is there a log file I should give you guys from somewhere now after putting it in debug mode?

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 2:09 pm
by jolson
# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
Looks like the debug data will be sent to the system log. Try this:

Code: Select all

sudo cat /var/log/system.log

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 3:57 pm
by cfgriffith
Well I think I found the problem sort of

Jul 20 13:18:46 Marcomm-Server-MM-0487.local nrpe[44465]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:18:57 Marcomm-Server-MM-0487.local nrpe[44469]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:19:14 Marcomm-Server-MM-0487.local nrpe[44474]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:19:24 Marcomm-Server-MM-0487.local nrpe[44477]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:20:27 Marcomm-Server-MM-0487.local nrpe[44488]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:21:24 Marcomm-Server-MM-0487.local nrpe[44499]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:21:40 Marcomm-Server-MM-0487.local nrpe[44504]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:23:30 Marcomm-Server-MM-0487.local nrpe[44521]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:23:44 Marcomm-Server-MM-0487.local nrpe[44526]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:23:55 Marcomm-Server-MM-0487.local nrpe[44530]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:24:12 Marcomm-Server-MM-0487.local nrpe[44535]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:24:22 Marcomm-Server-MM-0487.local nrpe[44538]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:25:25 Marcomm-Server-MM-0487.local nrpe[44550]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:26:23 Marcomm-Server-MM-0487.local nrpe[44561]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:26:38 Marcomm-Server-MM-0487.local nrpe[44565]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:28:28 Marcomm-Server-MM-0487.local nrpe[44583]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:28:42 Marcomm-Server-MM-0487.local nrpe[44588]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:28:53 Marcomm-Server-MM-0487.local nrpe[44592]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:29:10 Marcomm-Server-MM-0487.local nrpe[44595]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:29:20 Marcomm-Server-MM-0487.local nrpe[44599]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:30:23 Marcomm-Server-MM-0487.local nrpe[44613]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:31:21 Marcomm-Server-MM-0487.local nrpe[44625]: Host 140.225.8.240 is not allowed to talk to us!
Jul 20 13:31:36 Marcomm-Server-MM-0487.local nrpe[44629]: Host 140.225.8.240 is not allowed to talk to us!


But:

in /usr/local/nagios/etc/nrpe.cfg

allowed_hosts=127.0.0.1,140.225.8.240


8.240 is indeed our nagios server.


What other config file would it be reading from and where would I find it? I don't think it is xinetd because as far as I can tell it is not running. There is no /etc/ config for it and I do not see it when I ps aux | grep xine

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 4:16 pm
by jolson
Try removing localhost from the equation and permitting just the Nagios Server IP address. Maybe there's a bug with the comma delimitation?

Re: Restarting Nagios Client on OSX server

Posted: Mon Jul 20, 2015 4:20 pm
by lmiltchev
I don't think running:

Code: Select all

launchctl stop org.nagios.nrpe
will actually stop the nrpe process.

Try running the following commands:

Code: Select all

killall nrpe
launchctl start org.nagios.nrpe
then schedule a forced immediate check from XI to test it.