Nagios Core 3.2.1 “Insta-Install”


I think I already posted something here about Nagios… but maybe not as I was doing a test install last week following a DEMO of ScienceLogic EM7 appliances and I couldn’t find any easy steps… so this one may have slipped through the cracks… I have added the script I just made below…  This does nothing more than make Nagios usable, you will need to do all of the customization on your own…  I also made a nice vm but since I am a ‘cheapo’ on here it is too big to host it… I will try to find a free host and put the link up here as that would save even more time if you plan to use it as a vm guest 🙂

#!/bin/bash
cd /home
mkdir software
cd  software/
mkdir nagios
cd nagios/
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz
mkdir plugins
cd plugins
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz
cd ..
mkdir addons
cd addons
for i in nrpe-2.12.tar.gz nsca-2.7.2.tar.gz ndoutils-1.4b9.tar.gz; do wget http://prdownloads.sourceforge.net/sourceforge/nagios/$i; done
cd ..
yum install -y gcc glibc glibc-common httpd php gd gd-devel
/usr/sbin/useradd -m nagios
passwd nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache
tar xzf nagios-3.2.1.tar.gz
cd nagios-3.2.1
./configure –with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
sed -i ‘s/nagios@localhost/networksupport@proserve-solutions.com/’ /usr/local/nagios/etc/objects/contacts.cfg
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
cd ../plugins
tar xzf nagios-plugins-1.4.14.tar.gz
cd nagios-plugins-1.4.14
./configure –with-nagios-user=nagios –with-nagios-group=nagios
make
make install
chkconfig –add nagios
chkconfig nagios on
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios start
getenforce # just checks your selinux status
# EOF

Advertisements

, , , , , , , ,

  1. #1 by Fabian DuVall on July 17, 2010 - 7:53 pm

    Will be roll Nagios out in our network starting next week. Creating a plan to monitor our entire network.

  1. Tweets that mention Nagios Core 3.2.1 “Insta-Install” « A Technological Farce -- Topsy.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: