AIX monitoring documentation.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: AIX monitoring documentation.

Post by djjosephk »

OK, I went back over the prereqs and noticed some level differences so I updated all to the levels that are listed in your earlier post. I've gotten a much better output but I'm now getting the below error on the make.

Code: Select all

Target "all-am" is up to date.
Making all in tests
Target "all" is up to date.
Target "all" is up to date.
Making all in plugins
"Makefile", line 2144: make: Dependency line needs colon or double colon operator.
make: Fatal errors encountered -- cannot continue.
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 2.


Stop.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: AIX monitoring documentation.

Post by jdalrymple »

2 things:

1) PLEASE PLEASE... is this NRPE or Plugins? Did NRPE compile OK? Without NRPE you are absolutely wasting your time. Please do not reply to this thread without including this information.

2) what does line 2144 of Makefile look like. Makefiles are specific to compilation occurrences and yours certainly won't look like mine.
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: AIX monitoring documentation.

Post by djjosephk »

I'm assuming this is NRPE. I just grabbed a zip file from the github link you sent earlier. I've unzipped it, ran ./tools/setup, /configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin
and make.
https://github.com/NagiosEnterprises/nrpe


I'm looking at the Makefile but there doesn't seem to be that many lines. I must be doing something wrong.

Code: Select all

# cat Makefile|wc -l
    1885
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: AIX monitoring documentation.

Post by jdalrymple »

Sorry if I'm stating the obvious and you already know this, but I just want to make sure you're where you need to be.

Nagios Plugins is a collection of commonly used plugins to gather data about the system. Things like disk usage, cpu usage, whether services are running, etc. These only gather data, they do nothing else. They have no method of transmitting that data to Nagios - that's what NRPE is for.

NRPE - Nagios Remote Plugin Executor - this is an absolute must-have. This is the "agent" that communicates from you AIX box to Nagios. This piece of software can run any arbitrary code (such as plugins) to get data and pass it back to Nagios.

Going back to your issue:
djjosephk wrote:

Code: Select all

Target "all-am" is up to date.
Making all in tests
Target "all" is up to date.
Target "all" is up to date.
Making all in plugins
That makes it sound like you're working on plugins not nrpe. If you are indeed for sure in the nrpe build tree, maybe it's a good time to just scratch the whole thing and start fresh?
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: AIX monitoring documentation.

Post by djjosephk »

As suggested I started from scratch. I grabbed a new zip file from the Github https://github.com/NagiosEnterprises/nrpe and unpacked it. Ran a compile

Code: Select all

 ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib 
*snip*
 config.status: creating src/Makefile
config.status: creating package/solaris/Makefile
config.status: creating init-script
config.status: creating init-script.debian
config.status: creating init-script.suse
config.status: creating nrpe.spec
config.status: creating sample-config/nrpe.cfg
config.status: creating sample-config/nrpe.xinetd
config.status: creating include/config.h
config.status: include/config.h is unchanged


*** Configuration summary for nrpe 2.15 09-06-2013 ***:

 General Options:
 -------------------------
 NRPE port:    5666
 NRPE user:    nagios
 NRPE group:   nagios
 Nagios user:  nagios
 Nagios group: nagios


Review the options above for accuracy.  If they look okay,
type 'make all' to compile the NRPE daemon and client.
and a make.

Code: Select all

 # make all
        cd ./src/; make ; cd ..
Target "all" is up to date.

*** Compile finished ***
At that point I copied the nrpe binary from src to /usr/local/nagios/bin/ and the check_nrpe to /usr/local/nagios/libexec/

Code: Select all

 /usr/local/nagios/bin/nrpe 

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Code: Select all

$ /usr/local/nagios/libexec/check_nrpe
Incorrect command line arguments supplied

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
and started it up as the nagios user with

Code: Select all

$ /usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -n -d
but I'm still getting the "CHECK_NRPE: Error - Could not complete SSL handshake." error.

I've verified that the IP of the nagios server is in the nrpe.cfg allowed_hosts stanza on the client.


Thoughts, observations, admonishments?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: AIX monitoring documentation.

Post by jdalrymple »

Let's try this instead:

Code: Select all

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d -s
Explanation:

Code: Select all

Usage: nrpe [-n] -c <config_file> [-4|-6] <mode>

Options:
 -n            = Do not use SSL
 <config_file> = Name of config file to use
 -4            = use ipv4 only
 -6            = use ipv6 only
 <mode>        = One of the following operating modes:
   -i          =    Run as a service under inetd or xinetd
   -d          =    Run as a standalone daemon
   -d -s       =    Run as a subsystem under AIX
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: AIX monitoring documentation.

Post by djjosephk »

Even if it list it as and option it doesn't seem to like it.

Code: Select all

# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg  -d -s
/usr/local/nagios/bin/nrpe: illegal option -- s
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: AIX monitoring documentation.

Post by djjosephk »

I've been able to get it up with just the -d option and now I get.

Code: Select all

NRPE: Unable to read output
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: AIX monitoring documentation.

Post by jdalrymple »

Code: Select all

NRPE: Unable to read output
So is this from the nagios server? Do you get the same thing if you run

Code: Select all

check_nrpe -H 127.0.0.1
check_nrpe should have landed in that same src directory after compiling.
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: AIX monitoring documentation.

Post by djjosephk »

nagios ss2.jpeg
This is a screen shot from the Nagios XI web console. I also want to reiterate that this is when I start up the nrpe daemon with only the -d option.

Code: Select all

# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg  -d
If I try to use the -d and -s option it errors out and will not run.

Code: Select all

# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg  -d -s
/usr/local/nagios/bin/nrpe: illegal option -- s
I copied the check_nrpe to /usr/local/nagios/libexec/ after the compile. If I execute the requested command on the AIX server I'm attempting to configure I get.qh

Code: Select all

$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v2.15
If I try it on the assigned IP I get

Code: Select all

$ /usr/local/nagios/libexec/check_nrpe -H 111.222.333.444
CHECK_NRPE: Error - Could not complete SSL handshake.
You do not have the required permissions to view the files attached to this post.
Locked