Page 1 of 3
AIX monitoring documentation.
Posted: Tue Aug 18, 2015 10:43 am
by djjosephk
I am tasked with replacing our ageing monitoring system and I'm attempting to get Nagios XI to work for us. We are mostly an AIX house with a smattering of Linux(x84 and power) and a few other misc *nix in the mix. While not a master of AIX/Linux I have been professionally employed to manage/maintain Unix systems since the late nineties. That being said I'm having a devil of a time getting what I need to get the client side portion of Nagios/NRPE to work. The prebuilt stuff I've been able to find gives me a "CHECK_NRPE: Error - Could not complete SSL handshake." issue so in my research I've come to the conclusion that I need to build my on binaries (AIX 7.1,6.1) and I'm fine with that. The problem is that most of the online documents I've been able to find are useless. This,
http://www.ehow.com/how_8791563_install-nrpe-aix.html , leads to a dead link when it comes to the source file needed to compile on my platform. A Google search leads me nowhere looking for the nrpe-nsca-plugins.tgz referenced in the document or anything that looks anything like it. The only other option I've been able to find is this,
http://nagios-plugins.org/download/nagios-plugins-*.tgz , but when uncompressed the directory structure isn't the same. Where do I get the correct nrpe-nsca-plugins.tgz file I need to compile for my platform? Also what exactly do I need to install on the client side in an AIX7.1 environment for me to be able to use NRPE to monitor? Will the correct nrpe-nsca-plugins.tgz be the only required filesets or do I need some other fileset(s)?
I really would like to suggest purchasing this product but I have to make sure it'll work before hand.
Re: AIX monitoring documentation.
Posted: Tue Aug 18, 2015 2:38 pm
by jdalrymple
djjosephk wrote:CHECK_NRPE: Error - Could not complete SSL handshake.
This means your nrpe is compiled pseudo properly - have you checked allowed_hosts in nrpe.cfg? I'm assuming you're running daemonized and not from inetd?
djjosephk wrote:A Google search leads me nowhere looking for the nrpe-nsca-plugins.tgz referenced in the document or anything that looks anything like it. The only other option I've been able to find is this,
http://nagios-plugins.org/download/nagios-plugins-*.tgz , but when uncompressed the directory structure isn't the same. Where do I get the correct nrpe-nsca-plugins.tgz file I need to compile for my platform?
Let's worry about plugins after you get NRPE working
djjosephk wrote:Also what exactly do I need to install on the client side in an AIX7.1 environment for me to be able to use NRPE to monitor?
https://github.com/NagiosEnterprises/nrpe
Code: Select all
$ cat nrpeaix-215.prereq.out
# rpm -qa
AIX-rpm-7.1.0.15-1
sudo-1.6.9p23-2noldap
zlib-1.2.7-1
zlib-devel-1.2.7-1
bash-4.2-3
gettext-0.10.40-8
info-5.2-1
gcc-4.8.3-1
gcc-c++-4.8.3-1
gcc-cpp-4.8.3-1
gcc-gfortran-4.8.3-1
gmp-6.0.0a-1
gmp-devel-6.0.0a-1
libgcc-4.8.3-1
libgomp-4.8.3-1
libmpc-1.0.2-1
libmpc-devel-1.0.2-1
libstdc++-4.8.3-1
libstdc++-devel-4.8.3-1
mpfr-3.1.2-1
mpfr-devel-3.1.2-1
openssl-1.0.1j-1
Re: AIX monitoring documentation.
Posted: Tue Aug 18, 2015 3:21 pm
by djjosephk
jdalrymple wrote:This means your nrpe is compiled pseudo properly - have you checked allowed_hosts in nrpe.cfg? I'm assuming you're running daemonized and not from inetd?
Currently I'm just executing usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -n -d from the cli as the nagios user. I plan on automating startup when I have a little more luck with the product. I did update the nrpe.cfg with the correct IP of the nagios XI server on the allowed_hosts stanza. I've also been able to get the proper response when adding the "-n" to /usr/local/nagios/libexec/check_nrpe. I've even linked /lib /usr/lib to /lib64 /usr/lib64 just in case it was looking for ssl library in the wrong place. The rest of the research lead me to believe I need to compile for my platform.
jdalrymple wrote: Let's worry about plugins after you get NRPE working
Therein lies part of the problem I do not understand what Nagios specific filesets need to be installed on the client side, plugins or otherwise. The only documentation I've been able to find that specifically refers to AIX mentions a nrpe-nsca-plugins.tgz that I have been unable to locate. The one I've been using on the system that I'm doing the testing with is an aix53_nrpe-nsca-plugins.tar that I found at some time ago.
I appreciate the prereq list though, that saves me a ton of time.
Re: AIX monitoring documentation.
Posted: Tue Aug 18, 2015 3:45 pm
by jdalrymple
djjosephk wrote:I've also been able to get the proper response when adding the "-n" to /usr/local/nagios/libexec/check_nrpe.
For obvious reasons I encourage you to recompile with SSL support, the prerequisites I shared give that ability, of course you need to specify the location of the SSL libs at compile time. This is how I configured for SSL on that same AIX 7.1 box:
Code: Select all
# ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib
djjosephk wrote:I do not understand what Nagios specific filesets need to be installed on the client side, plugins or otherwise.
Just plugins:
https://github.com/nagios-plugins/nagios-plugins
Installation instructions in the readme. Basically configure; make; make install though. Anything that you don't have the prereqs to build will just get skipped.
Re: AIX monitoring documentation.
Posted: Wed Aug 19, 2015 9:45 am
by djjosephk
I see now, I've not had to deal with the Git model in awhile.
I've got everything and installed as many prereqs as I think I'll need but I'm getting an error on the ./configure. I don't know if it is even a problem though. It doesn't like the --with-ssl --with ssl-lib options but the --with-openssl option is set to yes.
*snip*
config.status: creating po/Makefile
configure: WARNING: unrecognized options: --with-ssl, --with-ssl-lib
--with-apt-get-command:
--with-ping6-command:
--with-ping-command: /etc/ping -n -c %d %s
--with-ipv6: yes
--with-mysql: no
--with-openssl: yes
--with-gnutls: no
--enable-extra-opts: yes
--with-perl: /usr/bin/perl
--enable-perl-modules: no
--with-cgiurl: /nagios/cgi-bin
--with-trusted-path: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
--enable-libtap: no
*snip*
Re: AIX monitoring documentation.
Posted: Wed Aug 19, 2015 2:22 pm
by jdalrymple
You should be able to do standard .tar.gz downloads from git, just dig them out of the tags section.
As for the configure errors, that surprises me a bit. Those are common options. Ultimately though if it compiles with SSL support without those args that's no problem. If it were Linux it most definitely would. I just definitely suggest enabling SSL unless you truly don't care at all about people sniffing your data on the wire with ANY of your hosts in your network. Unlikely.
Re: AIX monitoring documentation.
Posted: Wed Aug 19, 2015 3:53 pm
by djjosephk
Looks like make is having some issues. I did a bit of research and found that the 'rid_t' errors could be related to the AIX headers being corrupted. It seems to happen on boxes that have been upgraded from previous OS versions. So I moved the code over to a clean AIX 7 box and I'm getting the same errors.
- In file included from /usr/include/sys/cred.h:52,
from /usr/include/sys/thread.h:42,
from /usr/include/sys/ptrace.h:28,
from /usr/include/sys/proc.h:42,
from /usr/include/sys/pri.h:43,
from /usr/include/sys/sched.h:38,
from /usr/include/sched.h:51,
from /usr/include/pthread.h:63,
from ./glthread/lock.h:90,
from glthread/lock.c:23:
/usr/include/sys/secattr.h:50: error: expected specifier-qualifier-list before 'rid_t'
/usr/include/sys/secattr.h:70: error: expected specifier-qualifier-list before 'authnum_t'
In file included from /usr/include/sys/thread.h:42,
from /usr/include/sys/ptrace.h:28,
from /usr/include/sys/proc.h:42,
from /usr/include/sys/pri.h:43,
from /usr/include/sys/sched.h:38,
from /usr/include/sched.h:51,
from /usr/include/pthread.h:63,
from ./glthread/lock.h:90,
from glthread/lock.c:23:
/usr/include/sys/cred.h:338: error: expected specifier-qualifier-list before 'rid_t'
In file included from ./glthread/lock.h:90,
from glthread/lock.c:23:
/usr/include/pthread.h:956: error: expected specifier-qualifier-list before 'eye_catch4b_t'
make: The error code from the last command is 1.
Stop.
make: The error code from the last command is 1.
Stop.
make: The error code from the last command is 2.
Stop.
make: The error code from the last command is 1.
Stop.
make: The error code from the last command is 2.
Stop.
[/tmp/nagios/nagios-plugins-master]
I also get these errors on the ./tool/setup portion of the process. Not really sure if they are that important but I thought I would include for completeness.
- Found GNU Make at /usr/bin/gmake ... good.
/opt/freeware/share/aclocal/iconv.m4:1: warning: ill-formed serial number `AM2', expecting a version string with only digits and dots
/opt/freeware/share/aclocal/codeset.m4:1: warning: ill-formed serial number `AM1', expecting a version string with only digits and dots
Re: AIX monitoring documentation.
Posted: Wed Aug 19, 2015 5:01 pm
by jdalrymple
Did NRPE compile OK? This is certainly the more key component to get spun up.
To debug the plugins problem I'll need to have the entire output of the command you ran so I have a more clear picture on where it's failing. Please wrap in code tags.
Re: AIX monitoring documentation.
Posted: Thu Aug 20, 2015 8:29 am
by djjosephk
Since openssl seems to compile by default I just went with what was noted in the README.
./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin
Both the configure and make outputs are attached. I don't see anything out of the ordinary in the configure output.
Re: AIX monitoring documentation.
Posted: Thu Aug 20, 2015 3:19 pm
by jdalrymple
This reads like a problem with gcc not liking your included header files. Admittedly I haven't compiled plugins on AIX.
https://goo.gl/c1iqJT
This returns me to whether NRPE succeeded or not, please answer that question.
Depending on what you wish to do it's possible that we can ignore plugins and grab AIX specific stuff.