Page 1 of 1

Please help setting up MacOs Monitoring

Posted: Tue Aug 21, 2012 1:53 am
by stebbo
Hi All,

I'm gradually setting up the monitoring on my network. I'm trying to add some MacOS 10.7 hosts to my monitoring. I've managed to download and compile the monitoring agent, but can't connect.

When I try check_nrpe -H xx.xx.xx.xx from my nagios installation machine, i get the error message "Could not complete SSL handshake". I've checked that nrpe is running on the Mac server, and when I run that same command with -H localhost on the Mac Server it replies with a version number.

What should I test next? This is running internally on my network so there's no firewalls or routers in the way, and as near as I can tell there's no firewall running on the Mac Server.

Many thanks,
Chris.

Re: Please help setting up MacOs Monitoring

Posted: Tue Aug 21, 2012 9:37 am
by scottwilkerson
Can you post the command that is set for check_nrpe

Configure -> CCM -> Commands -> check_nrpe -> Modify

Re: Please help setting up MacOs Monitoring

Posted: Tue Aug 21, 2012 8:14 pm
by stebbo
Hi Scott,

the command being used is
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
for the check memory command, the arguments are as follows
check_mem
-a '-w 80 -c 90'
Cheers,
Chris.

Re: Please help setting up MacOs Monitoring

Posted: Wed Aug 22, 2012 10:05 am
by slansing
Hello,

Okay so, when you run ./check_nrpe -H <Mac.IP.Address.Here> it returns the NRPE agent version, and you have completely configured the nrpe.cfg "If using xinetd.d, edit /etc/xinetd.d/nrpe." Have you attempted any other checks against the Mac system? What OS is the Mac running?

Re: Please help setting up MacOs Monitoring

Posted: Fri Aug 24, 2012 5:34 am
by stebbo
Hi Slansing,

if I use the check_nrpe command on the actual Mac that I'm trying to monitor, I get the version number returned.

However, if I use the check_nrpe on another host in the network (on the nagios machine) I get the error "Could not complete SSL handshake".

I'm not using xinetd.d so can't modify that file.

I am running MacOS 10.7.4 on the mac server.

Cheers,
Chris.

Re: Please help setting up MacOs Monitoring

Posted: Fri Aug 24, 2012 10:30 am
by scottwilkerson
In the nrpe.cfg on the other machine you will have a line

Code: Select all

allowed_hosts=
Add the IP of your Nagios XI server in there and restart NRPE.

Also, if you are passing arguments and you did compile it with you need to change nrpe.cfg dont_blame_nrpe to

Code: Select all

dont_blame_nrpe=1
Again, restarting nrpe after changes

Re: Please help setting up MacOs Monitoring

Posted: Fri Aug 24, 2012 8:27 pm
by stebbo
Hi Scott,

thanks for the info. The key was the allowed_hosts setting. I had added the nagios server to this line, but had followed instructions I'd read and used a space rather than a comma. I now have the following and it's working fine.
allowed_hosts=127.0.0.1,xx.xx.xx.xx
Thanks again for the help and the service.

Cheers,
Chris.

Re: Please help setting up MacOs Monitoring

Posted: Mon Aug 27, 2012 9:44 am
by scottwilkerson
Excellent.

The space is used on linux servers where you are running xinetd and adding the addresses to the only_from field.