Issues installing Nagios OS X Agent on OS X 10.10.6

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
NobodyNew
Posts: 7
Joined: Sat Sep 24, 2016 10:07 pm

Issues installing Nagios OS X Agent on OS X 10.10.6

Post by NobodyNew »

Hi,

Our company is evaluating Nagios XI as a monitoring solution. Well, trying to evaluate right now. Having a difficult time just installing the agent, which seems like it should be the simple part. I've searched the Internet as well as here and haven't come up with the solution yet, so here is the deal:
  • What version of Nagios XI are you using? :: Nagios XI 5.2.9
    Linux Distribution and version? :: Nagios XI VM - CentOS centos-release-6-8.el6.centos.12.3.x86_64
    32 or 64bit? :: 64bit
    VMware Image or Manual Install of XI? :: VMware image
    Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL? :: Out-of-box VM from official link
Nagios XI seems to be working fine. Ping tests work to hosts including the one below, etc.

When I try to install the agent on a Mac Mini running OS X 10.10.6, I get the below error about SSL headers:

Code: Select all

checking for initgroups... yes
checking for closesocket... no
checking for socklen_t... yes
checking for type of socket size... size_t
checking for SSL headers... configure: error: Cannot find ssl headers
Subcomponents installation failed - exiting
A-subcomponents appears to have already completed successfully.  Moving on to the next step.
Starting NRPE Agent
When I try to add the host via the Mac OS X wizard, all sensors except for ping give an error:

Code: Select all

(Return code of 255 is out of bounds)
Tried using SSL sensors and non-SSL sensors, same report in the Nagios XI GUI.

Also, how does one uninstall the agent?

Thanks for your help.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by rkennedy »

I had a remote with a customer that ran into a similar issue, and he resolved it by installing NRPE through Homebrew. Just throwing this out there.

Could you attempt to check against the machine over the CLI of Nagios? This should give us more of a description for what the error is. Also, when you're running the check over the CLI take a look at the /var/log/syslog on the OSX machine as NRPE will debug here.
Former Nagios Employee
NobodyNew
Posts: 7
Joined: Sat Sep 24, 2016 10:07 pm

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by NobodyNew »

rkennedy wrote:I had a remote with a customer that ran into a similar issue, and he resolved it by installing NRPE through Homebrew. Just throwing this out there.

Could you attempt to check against the machine over the CLI of Nagios? This should give us more of a description for what the error is. Also, when you're running the check over the CLI take a look at the /var/log/syslog on the OSX machine as NRPE will debug here.
Thanks for your reply.

RE Homebrew: I'd rather not install something just to install something, unless there is a known issue with the Nagios XI OS X installer not working?

Not quite sure how to run the check command [remember, I'm _very_ new at Nagios :D ]
I connected to the Nagios server via SSH and ran the following:

Code: Select all

[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H 10.10.150.106 -t 30 -c check_disk -a '-w 20% -c 10% -p /' -n
connect to address 10.10.150.106 port 5666: Connection refused
connect to host 10.10.150.106 port 5666: Connection refused
I looked for:

Code: Select all

/var/log/syslog
but didn't see it. I ran a sudo tail -f /var/log/system.log instead just before running the check command, please let me know the location of syslog on a Mac if this wasn't correct.
No messages at all appeared in the tail. I even ran the check command a few times.
Maybe NRPE isn't installed at all? How can we check?

Thanks.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by lmiltchev »

Can you run the following commands on the OS X box, and show the output?

Code: Select all

ps -ef | grep nrpe.cfg | grep -v grep
find / -name nrpe
ls -laR /usr/local/nagios
netstat -an | grep 5666
Be sure to check out our Knowledgebase for helpful articles and solutions!
NobodyNew
Posts: 7
Joined: Sat Sep 24, 2016 10:07 pm

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by NobodyNew »

I really appreciate the support so far. Here is the output:

Code: Select all

MacMini$ sudo ps -ef | grep nrpe.cfg | grep -v grep
MacMini$ sudo find / -name nrpe
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/private/tmp/macosx/subcomponents/nrpe
/private/tmp/macosx/subcomponents/nrpe/mods/cfg/nrpe
/private/tmp/macosx/subcomponents/nrpe/nrpe-2.15/package/solaris/pkg/nrpe
/Users/admin/Downloads/macosx/subcomponents/nrpe
/Users/admin/Downloads/macosx/subcomponents/nrpe/mods/cfg/nrpe
/Users/admin/Downloads/macosx/subcomponents/nrpe/nrpe-2.15/package/solaris/pkg/nrpe
MacMini$ sudo ls -laR /usr/local/nagios
total 0
drwxr-xr-x   7 nagios  nagios  238 Sep 23 18:02 .
drwxr-xr-x   3 root    wheel   102 Sep 23 17:56 ..
drwxr-xr-x   2 nagios  nagios   68 Sep 23 17:56 bin
drwxr-xr-x   2 nagios  nagios   68 Sep 23 17:56 etc
drwxr-xr-x   2 nagios  nagios   68 Sep 23 18:02 include
drwxr-xr-x  15 nagios  nagios  510 Sep 23 17:56 libexec
drwxr-xr-x   2 nagios  nagios   68 Sep 23 17:56 var

/usr/local/nagios/bin:
total 0
drwxr-xr-x  2 nagios  nagios   68 Sep 23 17:56 .
drwxr-xr-x  7 nagios  nagios  238 Sep 23 18:02 ..

/usr/local/nagios/etc:
total 0
drwxr-xr-x  2 nagios  nagios   68 Sep 23 17:56 .
drwxr-xr-x  7 nagios  nagios  238 Sep 23 18:02 ..

/usr/local/nagios/include:
total 0
drwxr-xr-x  2 nagios  nagios   68 Sep 23 18:02 .
drwxr-xr-x  7 nagios  nagios  238 Sep 23 18:02 ..

/usr/local/nagios/libexec:
total 192
drwxr-xr-x  15 nagios  nagios    510 Sep 23 17:56 .
drwxr-xr-x   7 nagios  nagios    238 Sep 23 18:02 ..
-rwxr-xr-x@  1 nagios  nagios   6897 Sep 25 14:22 check_asterisk.pl
-rwxr-xr-x@  1 nagios  nagios   1978 Sep 25 14:22 check_asterisk_sip_peers.sh
-rwxr-xr-x@  1 nagios  nagios   5734 Sep 25 14:22 check_cpu_stats.sh
-rwsr-xr-x@  1 root    nagios    769 Sep 25 14:22 check_init_service_osx
-rwxr-xr-x@  1 nagios  nagios  25602 Sep 25 14:22 check_netstat.pl
-rwxr-xr-x@  1 nagios  nagios   3259 Sep 25 14:22 check_open_files.pl
-rwxr-xr-x@  1 nagios  nagios   5466 Sep 25 14:22 check_osx_mem.sh
-rwxr-xr-x@  1 nagios  nagios   2174 Sep 25 14:22 check_services
-rwxr-xr-x@  1 nagios  nagios   7599 Sep 25 14:22 check_sip
-rwxr-xr-x@  1 nagios  nagios    710 Sep 25 14:22 check_yum
-rwxr-xr-x@  1 nagios  nagios   3060 Sep 25 14:22 custom_check_mem
-rwxr-xr-x@  1 nagios  nagios    915 Sep 25 14:22 custom_check_procs
-rw-r--r--@  1 nagios  nagios   4176 Sep 25 14:22 nagisk.pl

/usr/local/nagios/var:
total 0
drwxr-xr-x  2 nagios  nagios   68 Sep 23 17:56 .
drwxr-xr-x  7 nagios  nagios  238 Sep 23 18:02 ..
MacMini$ sudo netstat -an | grep 5666
MacMini$ 
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by lmiltchev »

I don't see the NRPE binary in the "/usr/local/nagios/bin" or the "nrpe.cfg" in "/usr/local/nagios/etc"...

Let's try to reinstall NRPE. Run the following commands as root and show the output in case you run into some errors:

Code: Select all

cd /tmp/macosx/subcomponents/nrpe
./install
Be sure to check out our Knowledgebase for helpful articles and solutions!
NobodyNew
Posts: 7
Joined: Sat Sep 24, 2016 10:07 pm

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by NobodyNew »

lmiltchev wrote:I don't see the NRPE binary in the "/usr/local/nagios/bin" or the "nrpe.cfg" in "/usr/local/nagios/etc"...

Let's try to reinstall NRPE. Run the following commands as root and show the output in case you run into some errors:

Code: Select all

cd /tmp/macosx/subcomponents/nrpe
./install
Here it is:

Code: Select all

Mac-Mini:~ admin$ cd /tmp/macosx/subcomponents/nrpe/
Mac-Mini:nrpe admin$ sudo su
Password:
sh-3.2# pwd
/private/tmp/macosx/subcomponents/nrpe
sh-3.2# ./install 
NRPE
./install: line 14: [: -if: unary operator expected
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i386-apple-darwin15.6.0
checking host system type... i386-apple-darwin15.6.0
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdint.h... (cached) yes
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... rm: conftest.dSYM: is a directory
yes
checking type of array argument to getgroups... gid_t
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 8
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for va_copy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... yes
checking for vasprintf... yes
checking for C99 vsnprintf... yes
checking for getopt_long... yes
checking for main in -lnsl... no
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for closesocket... no
checking for socklen_t... yes
checking for type of socket size... size_t
checking for SSL headers... configure: error: Cannot find ssl headers
sh-3.2# 
Thanks.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by Box293 »

I created this documentation guide:

https://support.nagios.com/kb/article.php?id=515

I was helped by the developer and I was told that we need to use Homebrew to install their implementation of openssl, hence why you are getting the ssl headers error.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
NobodyNew
Posts: 7
Joined: Sat Sep 24, 2016 10:07 pm

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by NobodyNew »

Box293 wrote:I created this documentation guide:

https://support.nagios.com/kb/article.php?id=515

I was helped by the developer and I was told that we need to use Homebrew to install their implementation of openssl, hence why you are getting the ssl headers error.
Hmmm, openssl isn't even listed as a prerequisite in the official installation guide:
https://assets.nagios.com/downloads/nag ... _Agent.pdf

The above is where the Nagios XI GUI directed me for installation instructions.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Issues installing Nagios OS X Agent on OS X 10.10.6

Post by Box293 »

OK so the short version is that openssl is no longer included with xcode.

http://lists.apple.com/archives/macnetw ... 00025.html

The PDF you are pointing to was created in the past when it was included.

The version of NRPE that installs using that PDF is 2.15. It also automates the install of the plugins etc which makes things easier. However right now it's broken and I don't have a quick fix, we need it to go back to the developers to investigate and resolve.

At this point your best bet is to install NRPE v3 as per the other link I provided.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked