Restarting Nagios Client on OSX server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Restarting Nagios Client on OSX server

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

Re: Restarting Nagios Client on OSX server

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Restarting Nagios Client on OSX server

Post by cfgriffith »

Here are the log files.
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Restarting Nagios Client on OSX server

Post 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
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Restarting Nagios Client on OSX server

Post 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.
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Restarting Nagios Client on OSX server

Post 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?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Restarting Nagios Client on OSX server

Post 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
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
cfgriffith
Posts: 83
Joined: Tue Jan 15, 2013 4:22 pm

Re: Restarting Nagios Client on OSX server

Post 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
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Restarting Nagios Client on OSX server

Post 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?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Restarting Nagios Client on OSX server

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked