Skip to content

Installing nagios on SME 7.1.x

Overview

Nagios is an application that monitors, reports and optionally can act on events on the network.

This document describes the process of installing nagious 2.8 on SME 7.1.x.

Software Requirements

  1. nagios-2.8-1.el4.rf.i386.rpm – This is the main nagios software package.
  2. nagios-plugins-1.4.5-1.el4.rf.i386.rpm – This contains the plugins required by nagios. Without the plugins nagios will not be able to monitor anything.
  3. gd-2.0.28-4.4E.1.i386.rpm – Required by nagios 2.8
  4. xorg-x11-libs-6.8.2-1.EL.13.37.i386.rpm – Required by gd
  5. fontconfig-2.2.3-7.centos4.i386.rpm – Required by xorg-x11-libs
  6. xorg-x11-Mesa-libGL-6.8.2-1.EL.13.37.i386.rpm – Required by xorg-x11-libs
  7. fping-2.4-1.b2.2.el4.rf.i386.rpm – Required by nagios-plugins
  8. perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm – Required by nagios-plugins
  9. perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm – Required by perl-Net-SNMP

Installation Procedure

  • Create an Information Bay for nagios

In server-manager create an information bay called ‘nagios’ with the following permissions:

Information bay name nagios
Description
Group
User access via file sharing or user ftp
Public access via web or anonymous ftp
Execution of dynamic content (CGI, PHP, SSI)
  • Install nagios

The « character is a line continuation character and should not be included in the command.

#wget ftp://ftp.nluug.nl/pub/os/Linux/distr/CentOS/«
4.4/os/x86_64/CentOS/RPMS/gd-2.0.28-4.4E.1.i386.rpm
#wget http://isoredirect.centos.org/centos/4/os/i386/«
CentOS/RPMS/xorg-x11-libs-6.8.2-1.EL.13.37.i386.rpm
#wget http://isoredirect.centos.org/centos/4/os/i386/«
CentOS/RPMS/fontconfig-2.2.3-7.centos4.i386.rpm
#wget http://isoredirect.centos.org/centos/4/os/i386/CentOS/«
RPMS/xorg-x11-Mesa-libGL-6.8.2-1.EL.13.37.i386.rpm
#wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/«
dag/RPMS/fping-2.4-1.b2.2.el4.rf.i386.rpm
#wget http://dag.wieers.com/rpm/packages/«
perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm
#wget http://dag.wieers.com/rpm/packages/«
perl-Crypt-DES/perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm
#rpm -ivh fontconfig-2.2.3-7.centos4.i386.rpm «
xorg-x11-Mesa-libGL-6.8.2-1.EL.13.37.i386.rpm xorg-x11-libs-6.8.2-1.EL.13.37.i386.rpm
#rpm -ivh nagios-2.8-1.el4.rf.i386.rpm
#rpm -ivh fping-2.4-1.b2.2.el4.rf.i386.rpm
#rpm -ivh perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm
#rpm -ivh nagios-plugins-1.4.5-1.el4.rf.i386.rpm

  • Configure nagios to use the ibay

I prefer to place all the nagios data in the ibay. If your requirements are not the same you can skip this step.

Edit the nagios configuration files in /etc/nagios
#vi /etc/nagios/nagios.cfg

Change the following lines:
object_cache_file=/home/e-smith/files/ibays/nagios/files/objects.cache
status_file=/home/e-smith/files/ibays/nagios/files/status.dat
command_file=/home/e-smith/files/ibays/nagios/files/rw/nagios.cmd
comment_file=/home/e-smith/files/ibays/nagios/files/comments.dat
downtime_file=/home/e-smith/files/ibays/nagios/files/downtime.dat
temp_file=/home/e-smith/files/ibays/nagios/files/nagios.tmp

#vi /etc/nagios/cgi.cfg

Change the following lines:
physical_html_path=/home/e-smith/files/ibays/nagios/html
use_authentication=0

Note: Setting use_authentication=0 disables authentication. It is sufficient for our needs. If you require authentication then use_authentication should not be changed. Setting up authentication is beyond the scope of this document

  • Edit /etc/nagios/localhost.cfg

Define all the hosts, hostgroups, services, etc. according to your requirements.

  • Copy the CGI scripts to the ibay

#cp -r /usr/lib/nagios/cgi/* /home/e-smith/files/ibays/nagios/cgi-bin/.

  • Copy the web files to the ibay

#cp -r /usr/share/nagios/* /home/e-smith/files/ibays/nagios/html/.

  • Configure nagios to start in runlevel 7

#ln -s /etc/rc.d/init.d/nagios /etc/rc7.d/S97nagios

  • Start nagios

#chmod 777 /home/e-smith/files/ibays/nagios/files
#/etc/rc.d/init.d/nagios start

This should start the nagios service. Fix any errors in the configuration files if the startup returns any errors. It is also good to have a look at the nagios log file /var/log/nagios/nagios.log. Any errors during the operation of nagios such as missing plugins, etc. will be logged in the log file

  • Connect to the nagios web

Open your browser and browse to http://your.server/nagios