Install Nagios 3 and Plugins
Quickstart
I decided to install in RedHat 5.2. Maybe it is easier in Ubuntu (Nagios 3 already listed in the repository, but I haven’t tried it). As pointed out by the quickstart (it is meant for Fedora by the way), requirements are:
- php, httpd
- gcc, glibc, glibc-common
- gd, gd-devel
After getting those, the configure-make-install
procedure runs well, except that I don’t check the warnings. It turns out that only some of Nagios core components are installed. It can be seen from the content of /usr/local/nagios/libexec
directory. There is no check_snmp
etc. Error also appears in statusmap page of Nagios.
Compile More Nagios Core Components
I run through ./configure
once more, check out all warnings, and begin to evaluate requirements (found this text inside nagios-plugins-1.4.14
tarball)
MySQL
For check_mysql
functionality, mysql
(MySQL client for linux) must be installed. ./configure
also test this client, by default config, to the local MySQL socket, hence mysql-server
must also exist.
Radius Client
Client from freeradius package doesn’t meet Nagios requirements. It must be the ones from original radiusclient, I found RPMs for radiusclient-0.3.2-0.2.el5.rf.i386.rpm
and radiusclient-devel-0.3.2-0.2.el5.rf.i386.rpm
.
GD
It is quite tricky to get statusmap.c
to be compiled for the .cgi
of Nagios status map. Compilation needs gd
library from http://www.libgd.org/. gd
requires zlib
, libjpeg
, and libpng
. On first attempt, I installed from RPMs. This appeared to be not working as I could still see warnings about gd2
during ./configure
.
So, I choose to compile from the source gd-2.0.33.tar.bz2
. This tarball was found in the older section of current gd2
web. I chose this version because the RPM used was gd-2.0.33-9.4.el5_1.1.rpm
. I removed this RPM first which made me to remove also libmwf
and ImageMagick
.
After straightforward configure-make-install
the library will be installed under /usr/local/lib
i.e libgd.so.2.0.0
. Header files will also be available in /usr/local/include
i.e gd.h
. These are different from the situation when I installed from RPM where libgd.so.2.0.0
is under /usr/lib/
and no gd.h
found under /usr/include
.
So, I make devclean
and rerun
./configure --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include --with-command-group=nagcmd
I configure the /usr/local/nagios/etc/cgi.conf but status map page is still empty. Next workaround is to install back gd-2.0.33-9.4.el5_1.1.rpm
. (which also bring back libmwf
and ImageMagick
) and point the gd
library to the ones created from RPM. I make devclean
and rerun:
./configure --with-gd-lib=/usr/lib --with-gd-inc=/usr/local/include --with-command-group=nagcmd
At this point I regret not to have Ubuntu implementation in the first place. Just a small regret.
Other library needed for check_smtp
, check_http
, etc. don’t seem to trouble me much, I need openssl
, openldap
, etc. and simply get them from RPMs.
About
+Arif Kusbandono
Recently
Et Cetera
© logIt. Powered by WordPress using the DePo Skinny Tweaked Theme.