[Nagiosplug-help] check_nrpe build sucks
Ralph.Grothe at itdz-berlin.de
Ralph.Grothe at itdz-berlin.de
Tue Jul 12 01:24:31 CEST 2005
Hello,
as I've found out I need to install an NRPE daemon on all
hosts/nodes whose e.g. filesystem space or running procs I wish
to monitor (I would say a very common requirement for any
monitoring system).
Unfortunately the Nagios documentation isn't pretty articulate on
this subject, merely these vague mentionings:
http://nagios.sourceforge.net/docs/2_0/addons.html#nrpe
To add to the confusion the anchor in this page doesn't directly
point to the URL that I would have expected, namely
http://www.nagiosexchange.org/Search_Projects.43.0.html?tx_netnag
ext_pi1%5Bphrase%5D=nrpe&tx_netnagext_pi1%5Bsearch%5D=1
So it took me a while until I stumbled over the further required
download links for nrpe.
Most of the systems I need to monitor are HPUX, Solaris, AIX
(much fewer are Linux boxes).
Need I mention that these OSes are usually only furnished with a
crippleware "compiler" that basically is only capable of linking
a new kernel (on Solaris even that isn't required thanks to high
degree of modularization).
Whenever I need to build some apps from open sources for these
boxes I can only rely on gcc.
Especially on HPUX gcc performs very poorly.
Thus I am really glad whenever I find a prebuilt package or depot
for these platforms.
Well I trust that the NRPE daemon from the HPUX-PARISC NRPE depot
will work.
I configured it to be run through inetd as outlined in the
README.
What's annoying is that I also need the whole bunch of check_*
plugin binaries on these platforms.
But for those they don't supply any prebuilt packages or depots.
I also found that although I somehow got the plugins compiled and
installed on the AIX Nagios server (i.e. manager) the check_npre
binary was missing.
Ok, I got the nrpe sources (I'm afraid no AIX package available)
and tried to compile the stuff
This was how I had the Makefiles created
# ./configure --prefix=/opt/sw/nagios --enable-ssl
--with-ssl-lib=/usr/local/lib/openssl-0.9
--with-ssl-include=/usr/local/include/openssl
--with-nagios-user=nagios --with-nagios-group=nagios
--with-nagios-port=5666
This is the AIX platform and its gcc version
# uname -srv
AIX 3 4
# gcc -v
Reading specs from
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Here is where the linker aborts
# make all
cd ./src/; make ; cd ..
gcc -g -O2 -I/usr/local/include/openssl
-I/usr/local/include -DHAVE_CONFIG_H -o nrpe nrpe.c
utils.c -L/usr/local/lib/openssl-0.9 -lssl -lcrypto -lnsl
nrpe.c: In function `main':
nrpe.c:198: warning: assignment makes pointer from integer
without a cast
nrpe.c: In function `handle_connection':
nrpe.c:755: warning: passing arg 2 of `SSL_read' from
incompatible pointer type
nrpe.c:927: warning: passing arg 2 of `SSL_write' from
incompatible pointer type
ld: 0711-317 ERROR: Undefined symbol: .get_dh512
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.
Stop.
make: 1254-004 The error code from the last command is 2.
Stop.
Ok, I understand that I don't need the NRPE daemon on this AIX
box since this is the Nagios server.
So I think it would suffice to only get the check_nrpe plugin
compiled in the plugins subdir of the source tarball.
Is that so, or would I require any other components as well on
the Nagios server?
Same nuisance, different box.
This time a HPUX node that I wish to monitor by the Nagios
server.
As I understood, here I will need the NRPE daemon, which I got
from the HPUX-PARISC depot for 11.00.
But I also need plugins such as check_procs or check_disks etc.
Here we're on
# uname -srv
HP-UX B.11.00 U
Looks like HP's make cannot cope with a rule in plugins/Makefile
# make all
No suffix list.
make all-recursive
No suffix list.
Making all in intl
: -y -d --name-prefix=__gettext --output plural.c
plural.y
rm -f plural.h
Making all in lib
make all-am
Making all in plugins
Make: Must be a separator on rules line 1011. Stop.
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
Well the indicated line No. isn't very helpful since non of the
Makefiles has that many lines
# find /usr/local/tmp/nagios-plugins-1.4 -type f -name Makefile
-exec wc -l {} \;
337 /usr/local/tmp/nagios-plugins-1.4/intl/Makefile
567 /usr/local/tmp/nagios-plugins-1.4/lib/Makefile
398 /usr/local/tmp/nagios-plugins-1.4/m4/Makefile
990 /usr/local/tmp/nagios-plugins-1.4/plugins/Makefile
520 /usr/local/tmp/nagios-plugins-1.4/plugins-scripts/Makefile
426 /usr/local/tmp/nagios-plugins-1.4/po/Makefile
729 /usr/local/tmp/nagios-plugins-1.4/Makefile
Though not being a profound connaiseur of Makefile syntax
I cannot see anything that looks wrong in that all: rule
# sed -n 484,501p plugins/Makefile
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am
$(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS)
am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu
plugins/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu plugins/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
I haven't tried yet on our Solaris boxes,
but I'm convinced that the situation thereon won't differ much.
With all this unforseen hassle I can so far conclude that Nagios
may be fine if you have to monitor mainly Linux or *BSD boxes.
But getting things working on the commercial Unices if you don't
have development systems with full featured compiler suites you
end up in the usual debugging nightmare.
Any help would be highly appreciated.
More information about the Help
mailing list