Installing Nagios Core on Amazon Linux Instance

                                                                           

I already have an running Amazon Linux Instance on my AWS infrastucture ,so i am not going to give any details on “How to spin up an Amazon Linux instance” :) . Port 22 and 80 is opend in my
Amazon Linux Instance gateway. Currently i had connected to my instance using ssh (Port :22). Please go through the below link to spinup an instance
https://aws.amazon.com/amazon-linux-ami/

Before we start installing Nagios Core we need following package to be installed .Please follow below Step :


sudo yum install httpd php
sudo yum install gcc glibc glibc-common
sudo yum install gd gd-devel

After all dependancie packages had installed we need to setup Nagios User in Instance

sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios
sudo usermod -a -G nagcmd apache

Now we can download the Nagios Core package and Plugins.Let store the download files in Download folder in home directory for temporarly still installation is over.

cd ~
cd Downloads/
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz

Once donload is over we extract the files

tar -xvzf http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz
tar -xvzf http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz

You can find the latest file in Nagios Official Website : http://www.nagios.org/download//

Now we can compile and Install nagios ,firtst move to extracted nagios folder and compile the file

cd nagios-4.0.8
./configure –with-command-group=nagcmd
sudo make all
sudo make install-init
sudo make install-config
sudo make install-commandmode

Now we had completed the Nagios Core installation ,to compile and install Nagios plugin please follow below steps

cd nagios-plugins-2.0.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
sudo make
sudo make install

Now we have completed nagios plugin installation,to start nagios service during sytem restart automatically follow below steps

chkconfig –add nagios
chkconfig –level nagios on
chkconfig –add httpd
chkconfig –level httpd on

Now we can move to the final step configuring Nagios Web Interface.

cd nagios-4.0.8
sudo make install-webconf

Creat a admin account to loggin in Nagios Web Interface

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users admin

Restart apache and Nagios service
That all Cheers :)

sudo service httpd restart
sudo service nagios start


You can access now Nagios Web Interface from link http://localhost/nagios” 




Comments

Popular posts from this blog

Datastax Error : Cannot start node if snitch's data center (dc1) differs from previous data center (dc2)

Datastax Error : Cassandra - Saved cluster name Test Cluster != configured name

Configure Nagios plugin " check_logfiles " for scanning log file

Popular posts from this blog

Datastax Error : Cannot start node if snitch's data center (dc1) differs from previous data center (dc2)

Datastax Error : Cassandra - Saved cluster name Test Cluster != configured name

Configure Nagios plugin " check_logfiles " for scanning log file