Nagios: Difference between revisions

From CSLLabWiki
Jump to navigation Jump to search
Line 23: Line 23:
cd nagios-3.2.0
cd nagios-3.2.0


yum install gd mailx net-snmp-utils mysql
yum install gd mailx


groupadd nagios -g 812
groupadd nagios -g 812

Revision as of 12:37, 26 August 2009

Nagios is a very flexible, open-source, network/host monitoring application. Not only does it do reporting on host uptime and services, it can be configured to send emails and text alerts when a system or service goes down or otherwise changes. I've used this within the corporate realm and it fits well - especially among a heterogeneous network like ours.

Nagios' Website

Installation

  • NOTE: These installation notes were made during the install to Babbage on August 26th, 2009 by Chris Moore.
mkdir /usr/local/nagios
mkdir /usr/local/nagios-src
cd /usr/local/nagios-src

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz

Nagios Core

tar -xvzf nagios-3.2.0.tar.gz

cd nagios-3.2.0

yum install gd mailx

groupadd nagios -g 812
useradd nagios -u 812 -g 812 -d /usr/local/nagios -s /bin/bash
*!!!!!!!!! DISABLE LOGIN

./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-user=root \
            --with-command-group=root --with-mail=/bin/mailx --with-httpd-conf=/etc/httpd/conf.d --with-init-dir=/etc/init.d \
            --with-gd-lib=/usr/lib --with-gd-inc=/usr/include --enable-statusmap

make all -j 3

make install 
make install-init 
make install-commandmode 
make install-webconf
make install-config #For sample config files

htpasswd -c /usr/local/nagios/etc/htpasswd.users root
# Rinse and repeat as needed

Nagios Plugins

tar -xvzf nagios-plugins-1.4.13.tar.gz
cd nagios-plugins-1.4.13

yum install net-snmp-utils mysql mysql-devel 

./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios \
            --with-mysql=/usr --with-openssl=/usr --with-smbclient-command=/usr/bin/smbclient \
            --with-ps-command=/bin/ps --with-ping-command=/bin/ping \
            --with-nslookup-command=/usr/bin/nslookup --with-uptime-command=/usr/bin/uptime \
            --with-snmpget-command=/usr/bin/snmpget --with-snmpgetnext-command=/usr/bin/snmpgetnext \
            --with-dig-command=/usr/bin/dig --enable-extra-opts   

Nagios Addons (NRPE)

Start It Up

/etc/init.d/httpd restart
/etc/init.d/nagios start

Configuration