User Tools

Site Tools


user:thakes3:portfolio:fall2013:nagios

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:thakes3:portfolio:fall2013:nagios [2013/10/10 19:40] thakes3user:thakes3:portfolio:fall2013:nagios [2013/10/10 20:16] (current) – [Intro] thakes3
Line 1: Line 1:
 +=======Installing & Configuring Nagios Core 4.0.0========
 +
 +====Intro====
 +This tutorial is designed to demonstrate a full installation & configuration of nagios 4.0.0 on a debian wheezy system. Nagios is (GPL) open-source industry standard monitoring software. It more or less stalks each computer for the information it wants and if it doesn't get the information it'll destroy you via notifications. 
 +
 +====Installation=====
 +
 +Please make sure you have the following packages installed:
 +<cli>
 +satan@lab46:~> sudo apt-get install build-essential apache2 php5-gd libgd2-xpm libgd2-xpm-dev libapache2-mod-php5
 +</cli>
 +
 +The next step is to get the latest nagios 4.0.0 onto the server for instalation. http://nagios.sourceforge.net/ for all of your nagios core needs.
 +
 +You will want the nagios core 4.0.0 and the plugins ( at this date version 1.5 )
 +
 +Now give nagios a user and group to run from.
 +*please note* the last command adds the user 'nagios' to group 'nagcmd'
 +
 +<cli>
 +satan@lab46:~> sudo useradd nagios
 +satan@lab46:~> sudo groupadd nagcmd
 +satan@lab46:~> usermod -a -G nagcmd nagios
 +</cli>
 +
 +Now, make a directory for nagios. It can be /home/nagios or /etc/nagios or whatever you want to pick. Since most of the tutorials i've seen has put them in /etc/nagios , I will as well. 
 +
 +<cli>
 +satan@lab46:~> sudo mkdir /etc/nagios 
 +satan@lab46:~> sudo mv nagios-4.0.0.tar.gz /etc/nagios
 +</cli>
 +
 +now extract that mofo
 +
 +<cli>
 +satan@lab46:~> sudo tar xfvz /etc/nagios/nagios-4.0.0.tar.gz
 +</cli>
 +
 +jump in that folder, and compile it good
 +
 +<cli>
 +satan@lab46:~> cd /etc/nagios/nagios/
 +satan@lab46:/etc/nagios/nagios> sudo ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/bin/sendmail
 +</cli>
 +
 +from here it'll spit out a bunch of crap, and if it doesn't error out you've set up everything right from this point up, so gz for that. 
 +
 +now? now we must make this work.
 +with make.
 +make.
 +
 +<cli>
 +satan@lab46:/etc/nagios/nagios> sudo make all
 +satan@lab46:/etc/nagios/nagios> sudo make install
 +satan@lab46:/etc/nagios/nagios> sudo make install-init
 +satan@lab46:/etc/nagios/nagios> sudo make install-config
 +satan@lab46:/etc/nagios/nagios> sudo make install-commandmode
 +satan@lab46:/etc/nagios/nagios> sudo make install-webconf
 +</cli>
 +
 +Now copy the event handlers to their location, and make sure that they are owned by the proper person / thing.
 +
 +<cli>
 +satan@lab46:/etc/nagios/nagios> sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
 +satan@lab46:/etc/nagios/nagios> sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
 +</cli>
 +
 +And now, check to make sure the default config will work. If it does, start it up.
 +
 +<cli>
 +satan@lab46:~> sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
 +satan@lab46:~> sudo /etc/init.d/nagios start
 +</cli>
 +
 +
 +got this error
 +<cli>
 +satan@lab46:~> /etc/init.d/nagios start
 +/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions
 +</cli>
 +
 +checking into it
 +