Nagios: howto become a happy network and system monitoring engineer

Nagios: howto become a happy network and system monitoring engineer

Nagios: howto become a happy network and system monitoring engineer 150 150 Roderick Derks

 

Installing Nagios on FC6

I decided to go for the 3.0a1 beta version which I had to compile first. I used the Nagios install manual on the web. I created my own install manual ’cause I had to get some packages I’d never heard of. So that I will not forget.

The OS I used is a minimun install Fedora Core 6 (FC6). After doing the install of FC6 I added yum and some other packages like dclient.

Packages I had installed before I started and are needed by Nagios or their plugins: perl, gcc, make, sendmail, mailx, curl, ntp.

Install the webserver
# yum -y install httpd

Download nagios files
# wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.6.tar.gz
# wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.6.tar.gz

Install needed packages fot snmp
# yum -y install net-snmp net-snmp-perl net-snmp-utils perl-Net-SNMP net-snmp-libs

Install needed packeges to create a status map in Nagios
# yum install gd gd-devel libpng libpng-devel libjpg libjpg-devel

Prepeare for installing Nagios
# useradd nagios
# passwd nagios
# groupadd nagcmd
# usermod -G nagcmd nagios
# usermod -G nagcmd apache

Install Nagios
# tar xvzf nagios-3.0a1.tar.gz
# cd nagios-3.0a1

If you did a prevoius install of the same version and the source files are still there
# make devclean

# ./configure –with-gd-lib=/usr/lib –with-gd-inc=/usr/include –with-command-group=nagcmd
# make all
# make install
# make install-init
# make install-config
# make install-commandmode

Change the email address of the nagios user to your own in the example file
# vi /usr/local/nagios/etc/localhost.cfg

Set the rights
# cp sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Add an extra user: loose the -c option, because this creates a new config file
# htpasswd /usr/local/nagios/etc/htpasswd.users roderick

If you added an extra user, adjust the rights in the cgi.cfg file
# vi /usr/local/nagios/etc/cgi.cfg

Install the Nagios plugins

# tar xzf nagios-plugins-1.4.6.tar.gz
# cd nagios-plugins-1.4.6
# ./configure
# make
# make install
# chown nagios /usr/local/nagios/libexec/*
# chown root.nagios /usr/local/nagios/libexec/check_dhcp
# chown root.nagios /usr/local/nagios/libexec/check_icmp
# chmod 4550 /usr/local/nagios/libexec/check_dhcp
# chmod 4550 /usr/local/nagios/libexec/check_icmp
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
# service nagios start
# service httpd start
# chkconfig –level 3 httpd on
# chkconfig –level 3 nagios on

Let’s role!

 

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message