Nagios Wizard Mac OS X Agent problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tzidore
Posts: 12
Joined: Wed May 06, 2015 10:52 am

Nagios Wizard Mac OS X Agent problem

Post by tzidore »

Hi

I'm new to the forum and to Nagios.

Here is my situation:
I'm managing about 100 computers whereas 20-30 of them are servers of some sort.
I bought Nagios XI to make the usage easy for others and me. For example would a person with limited IT experience be able to setup a nagios agent and monitor what's going on.

I have been install the agents through the wizards under "configure" from the top menu.
It has been going well with Linux and Windows servers, but now I'm trying to install the agent on a Mac OS X 10.9.5 Server and it's not working for me.

I get this message on my Nagios XI server

Code: Select all

CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
I've install Xcode and the commandline Tools as the described in the installation instructions.

When I run "bash -x /tmp/macosx/fullinstall" I get this at the end:

Code: Select all

A-subcomponents appears to have already completed successfully.  Moving on to the next step.
+ echo 'Starting NRPE Agent'
Starting NRPE Agent
+ launchctl start org.nagios.nrpe
launchctl start error: Bad file descriptor
++ date +%s
+ log_tarball_name=logs-all-steps-1430928939.tar.gz
+ tar -czf logs-all-steps-1430928939.tar.gz log/
+ cat

##########################################################
###                                                    ###
###    Nagios Mac OSX Agent Installation Complete!     ###
###                                                    ###
##########################################################

If you experience any problems, please attach the file logs-all-steps-1430928939.tar.gz that was just created to any support requests.
Afterwards I've run this command to start the daemon "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d".

I ran this because the agent didn't launch:

Code: Select all

+ launchctl start org.nagios.nrpe
launchctl start error: Bad file descriptor
I see this as some problem with the installation script. Am I right?

My log is telling me this(/var/log/system.log):

Code: Select all

May  6 18:16:48 <Servername> nrpe[83095]: Error: Could not complete SSL handshake. 1
In my /usr/local/nagios/etc/nrpe.cfg this is added:

Code: Select all

allowed_hosts=<IP of nagios server>
When I run the command "/usr/local/nagios/libexec/check_nrpe -H <client>" from nagios server, I get:

Code: Select all

NRPE v2.15
When I run this "/usr/local/nagios/libexec/check_nrpe -H <client ip> -t 30 -c check_cpu_stats -a '-w 85 -c 90'", I get:

Code: Select all

CPU STATISTICS OK: user=0.56% system=14.60% iowait=0% idle=84.83% | user=0.0% system=14.60% iowait=0.0%;85;90 idle=84.83%
But why isn't it working then, I still get:

Code: Select all

CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios Wizard Mac OS X Agent problem

Post by jolson »

I see this as some problem with the installation script. Am I right?
Most likely - I would test this but we don't have an OSX server in-house of that version.
When I run the command "/usr/local/nagios/libexec/check_nrpe -H <client>" from nagios server, I get:
NRPE v2.15
This is a good sign, it means your server can talk to the OSX box properly.
When I run this "/usr/local/nagios/libexec/check_nrpe -H <client ip> -t 30 -c check_cpu_stats -a '-w 85 -c 90'", I get:
CPU STATISTICS OK: user=0.56% system=14.60% iowait=0% idle=84.83% | user=0.0% system=14.60% iowait=0.0%;85;90 idle=84.83%
Also a good sign - can you run the same command from your nagios box as the 'nagios' user?
From XI:

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_nrpe -H <client ip> -t 30 -c check_cpu_stats -a '-w 85 -c 90'
But why isn't it working then, I still get:
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
The question is what your host/service definition looks like - from there we can tell you why it might be failing. Open up the host/service that reports the above, and click on 'Configure -> Re-configure this service'. Please provide us with a screenshot of what is displayed - typically something like this:
2015-05-06 13_34_52-Nagios XI.png
This may give us some insight as to why the command is failing. Ultimately, since "/usr/local/nagios/libexec/check_nrpe -H <client ip> -t 30 -c check_cpu_stats -a '-w 85 -c 90'" is working properly, you'll want to replicate that service from the Nagios XI GUI - you can do that quite simply by creating a custom service definition through the Core Config Manager. (Configure -> Core Config Manager -> Services).
2015-05-06 13_37_22-Nagios XI - Nagios Core Config Manager.png
You do not have the required permissions to view the files attached to this post.
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.
tzidore
Posts: 12
Joined: Wed May 06, 2015 10:52 am

Re: Nagios Wizard Mac OS X Agent problem

Post by tzidore »

Hi again

I found a solution. I removed "-n" at the end of the command in the web GUI
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios Wizard Mac OS X Agent problem

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked