NAGIOS: It's a monitoring tool used widely in server administration. When we have large no. of system like in data centers then we need some technology to monitor our data base servers, application servers, routers, other machines etc.
Nagios provides a complete solution for this. Nagios provides graphical reports and monitoring of our network & servers. In order to setup nagios successfully, we need to install nagios on one server and different machines, servers will be configred in it. To communicate with configured hosts (servers), we need to install NRPE agents on servers, which need to be monitored.
Here are the steps to install nagios server:
- Get Nagios and user creation- Install required Utilities
 yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp
- Get Nagios & plugin on the server
 wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.5.0.tar.gz
 wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
- Create User: nagios
 useradd nagios
 groupadd nagcmd
 usermod –a –G nagcmd nagios
 
- Install required Utilities
- Nagios Installation- Unzip the files
 tar zxvf nagios-3.5.0.tar.gz
 tar zxvf nagios-plugins-1.4.16.tar.gz
- Change directory & configure
 cd nagios
 ./configure --with-command-group=nagcmd
- Compile the files
 make all
 make install
 make install-init
 make install-config
 make install-commandmode
 make install-webconf
 cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
 chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
 /etc/init.d/nagios start
 /etc/init.d/httpd start
- Create user for Nagios
 htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
 
- Unzip the files
- Nagios Plugin Installation
cd /tmp/nagios-plugins-1.4.16
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
- Nagios Service Setup
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
chkconfig --level 35 httpd on
- Run Nagios
vi /etc/httpd/conf.d/nagios.conf
Add DirectoryIndex? parameter in conf file:
DirectoryIndex? index.php
And type url in browser example: http://172.29.16.95/nagios
- Restart the services
service nagios restart
service httpd restart
 
 
 
No comments:
Post a Comment