Page 1 of 1
Monitoring OS X and NRPE
Posted: Mon Sep 10, 2012 3:04 pm
by mpeterson
We're trying out Nagios XI as a possible monitoring solution. I'm trying to get nrpe installed and working on a Mac (OS X 6.8 (not Server)). We had XCode installed on the box already, and I wasn't sure about Workgroup Manager. So I followed the instructions for the install, and had success (meaning no complaints from the installer).
However when I went and looked at the logs I was seeing an error about getgrname("anApproriateGroup"). So I went back and tracked down the Server Admin and installed it. Looked at the users/groups didn't see anything that seemed to match this. So if at first things don't succeed, try, try again, right? I ran the install again. Again it completed, although it was skipping the steps for users and groups because they were already installed.
Double checked the logs. Still erroring with the getgrname.
I'm not quite sure the best way to proceed here. It appears that the installer thinks the groups are installed. The daemon and Workgroup Manager don't seem to think so.
Thoughts?
Re: Monitoring OS X and NRPE
Posted: Mon Sep 10, 2012 3:27 pm
by scottwilkerson
You should be able to add a user and group names nagios
Then reboot the machine.
Re: Monitoring OS X and NRPE
Posted: Tue Sep 11, 2012 3:48 pm
by mpeterson
A couple of things I should point out. As I just installed Workgroup Manager, I do not have a Workgroup Manager Server to connect to, so I'm connecting to 127.0.0.1.
Also as mentioned the script (upon a second run) says the user & groups necessary are created. I say that because I'm not convinced I'm looking in the correct place for the user/group but don't know where to look.
Additionally if I'm supposed to add the user, I don't know what I'm supposed to be specifying for options (Password as an example).
I'm also assuming that once I create this nagios user I should be making a member of the nagios group?
Re: Monitoring OS X and NRPE
Posted: Tue Sep 11, 2012 10:46 pm
by scottwilkerson
If you ran the install script again and it said the user and group were created you may not need to do anything else, but you may still need to reboot the machine before the NRPE service starts
Re: Monitoring OS X and NRPE
Posted: Mon Sep 17, 2012 9:20 am
by mpeterson
Finally found a time where I could restart the box without interfering with others and now I'm not getting the user issue.
However, looking in the logs I'm getting the following:
org.nagios.nrpe[326]: posix_spawn("/usr/local/nagios/bin/nrpe", ...): No such file or directory
And it's correct. nrpe does not exist in the bin directory.
Re: Monitoring OS X and NRPE
Posted: Mon Sep 17, 2012 10:37 am
by scottwilkerson
then it looks like for some reason the agent install didn't go correctly.
Can you attach the logs from the install
Re: Monitoring OS X and NRPE
Posted: Tue Oct 09, 2012 3:56 pm
by mpeterson
Sorry it's been a while. The issue with the one box ended up being that the command line tools also weren't installed (not sure why it said it completed successfully).
In the end for a number of reasons we ended up moving to a new box. I had the prereqs installed, however the install didn't go perfectly either. It had issues with nrpe.pid. It tried to put it in a location where it didn't have permissions to. Then it had issues with the group. It created a nagios user and group, but then in the plist it was configured to "anAppropriateGroup". Not sure what was up with that.
Anyways, got those items fixed and it seems to be good.
Re: Monitoring OS X and NRPE
Posted: Tue Oct 09, 2012 4:23 pm
by slansing
Hmm.. interesting, well thank you for the additional information on your fix.