Nagios Installation Step by Step in Linux




In the previous article I made a Server Monitoring with Munin uses see here and on the article this time I tried to make the Monitoring Server using Nagios. Nagios network monitoring application that was created by Ethan Galstad. Keep an eye on Nagios host and service that has been established, giving a warning if things deteriorate, and notify when the situation improves.
Install Nagios

The previous download nagios here

Make sure that the following packages are already installed on your Ubuntu server.

Apache 2
PHP
GCC compiler and development libraries
GD development libraries

Run the following command to install the package package if not already.
$ sudo apt-get install apache2
$ sudo apt-get install libapache2-mod-php5
$ sudo apt-get install build-essential
$ sudo apt-get install libgd2-xpm-dev



After the packages are installed the next step is create your "Account Informations". get in on the root user and run the following command:
$ sudo -s
# /usr/sbin/useradd -m -s /bin/bash nagios
# passwd nagios

The next step is to create the Group nagcmd. run the following command:
# /usr/sbin/usermod -G nagios nagios
# /usr/sbin/groupadd nagcmd
# /usr/sbin/usermod -a -G nagcmd nagios
# /usr/sbin/usermod -a -G nagcmd www-data

Download Nagios and Nagios Plugins
The previous input "nagios-4.0.7. tar.gz" and nagios-plugins that we downloaded earlier on Ubuntu Server directory can use FTP Client Filezilla. Here's my input on the Directory Downloads. After that entry on the Directory Downloads then Extrac files "nagios-4.0.7. tar.gz" file with the command:


# tar xzf nagios-4.0.7.tar.gz

After the new file will appear Extrac i.e. nagios-4.0.7 and sign in on the nagios directory-4.0.7
# cd nagios-4.0.7

And then run the following script one by one
# ./configure --with-command-group=nagcmd
# make all
# make install
# make install-init
# make install-config
# make install-commandmode

Configurasi Web Interface
Install web config file nagios in the directory conf. d Apache.
# make install-webconf


Create an Account nagiosadmin for Login to the Web Interface of nagios and then input the password. you have to remember this password to Login to nagios.
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin


Restart Apache
# /etc/init.d/apache2 reload


Compile and Install Nagios Plugins
Next Install the nagios Plugins Nagios directory, go to plugins and then Extrac
# cd ..
# tar xzf nagios-plugins-2.0.2.tar.gz


then enter the directory of the nagios-plugins
# cd nagios-plugins-2.0.2


Compile dan install plugins
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
# make
# make install

OK when you are finished it is time start nagios, run the following command to create automatically start when the system boot
# ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

Run the following command to check the File configurasi nagios
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

If there are no errors, run Nagios
# /etc/init.d/nagios start

OK it's time we try nagios, open a browser from the Client computer and then input the url "http://ipserver/nagios" Please fill in your username and password and then Log In to kilik logged into Nagios.

 
Next
Previous
Click here for Comments

0 comments: