Restarting Nagios Client on OSX server
-
cfgriffith
- Posts: 83
- Joined: Tue Jan 15, 2013 4:22 pm
Re: Restarting Nagios Client on OSX server
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
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.
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
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
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:
And then of course restart the daemon... then see what comes of it
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-
cfgriffith
- Posts: 83
- Joined: Tue Jan 15, 2013 4:22 pm
Re: Restarting Nagios Client on OSX server
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.
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
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
Looks like the debug data will be sent to the system log. Try this:# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
Code: Select all
sudo cat /var/log/system.log-
cfgriffith
- Posts: 83
- Joined: Tue Jan 15, 2013 4:22 pm
Re: Restarting Nagios Client on OSX server
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
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
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
I don't think running:
will actually stop the nrpe process.
Try running the following commands:
then schedule a forced immediate check from XI to test it.
Code: Select all
launchctl stop org.nagios.nrpeTry running the following commands:
Code: Select all
killall nrpe
launchctl start org.nagios.nrpeBe sure to check out our Knowledgebase for helpful articles and solutions!