NAGIOS
Nagios is an open software that can used for networkl monitoring and infrastructure monitoring.
Nagios wil monitoring servers, switches, applications, and services. it alerts the system administrator when something went wrong and also alert back when the issues has been rectified.
with the help of Nagios you can do the following things:
1. Detect security braches.
2. Know immediately when problem arise.
3. Identify problems before they occur.
4. Share availability data with stackholders, hypothetical question.
5. Reduce downtime and business losses.
6. Plan and budget for IT upgrades.
7. And most important that Monitor your entire IT infrastructure.
Installation of Nagios Server in RHEL:
Before installing Nagios make sure that you have a properly installed and configured LAMP stack in your server.
Run the following command as root user for installing required package:
#yum install gd gd-devel gcc glibc-common
Nagios will not be found in yum repositories, so let us add the EPEL repository to install Nagios.
Install Nagios with all plugins and nagios agents (nrpe-agent) using command:
#yum install nagios
If you got any error relating SELinux or IP tables then:
Add the following line in /etc/sysconfig/iptables
#vim /etc/sysconfig/iptables
-A INPUT -m state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#service iptables restart
Configuration of Nagios:
Add the Admin mail Address in the nagios contact file to receive alerts from nagios server. To do that edit file:
#vim /etc/nagios/objects/contacts.cfg
email server.nagios@example.com
Save it.
#vim /etc/httpd/conf.d/nagios.conf
comment lines 15,16 and uncomment and change lines 17,18,19 :
#order allow,deny
#Allow for all
order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 (network address)
Save it.
Set Nagios admin Password:
Run the following command to set the password of nagios administrator:
#htpasswd /etc/nagios/passwd nagiosadmin
New Password:
Re-Type new Password:
updating password for user nagiosadmin.
start nagios and httpd services:
#service nagios restart
#chkconfig nagios on
#service httpd restart
#chkconfig httpd on
Nagios will not be found in yum repositories, so let us add the EPEL repository to install Nagios.
Install Nagios with all plugins and nagios agents (nrpe-agent) using command:
#yum install nagios
If you got any error relating SELinux or IP tables then:
Add the following line in /etc/sysconfig/iptables
#vim /etc/sysconfig/iptables
-A INPUT -m state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#service iptables restart
Configuration of Nagios:
Add the Admin mail Address in the nagios contact file to receive alerts from nagios server. To do that edit file:
#vim /etc/nagios/objects/contacts.cfg
email server.nagios@example.com
Save it.
#vim /etc/httpd/conf.d/nagios.conf
comment lines 15,16 and uncomment and change lines 17,18,19 :
#order allow,deny
#Allow for all
order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 (network address)
Save it.
Set Nagios admin Password:
Run the following command to set the password of nagios administrator:
#htpasswd /etc/nagios/passwd nagiosadmin
New Password:
Re-Type new Password:
updating password for user nagiosadmin.
start nagios and httpd services:
#service nagios restart
#chkconfig nagios on
#service httpd restart
#chkconfig httpd on
How to access Nagios Admin Console:
Open Nagios admin console with server ip.
If server ip is 192.168.0.220 then open browser and go to:
http://192.168.0.220/nagios
and enter the username and password as administrator.
Open Nagios admin console with server ip.
If server ip is 192.168.0.220 then open browser and go to:
http://192.168.0.220/nagios
and enter the username and password as administrator.
No comments:
Post a Comment