What Is Nagios Core:-
Nagios Core is an Open Source system and network monitoring application. It watches hosts and services that you specify, alerting you when things go bad and when they get better.
2- HTTPd, PHP with gd and CGI.
System Requirments:-
1- Linux machine (In my case I am using Centos 6.7)2- HTTPd, PHP with gd and CGI.
Nagios Installation:-
Step 1-
Add repository first to install Nagios
[root@odoo ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm warning: /var/tmp/rpm-tmp.2nIBRS: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:epel-release ########################################### [100%] [root@odoo ~]#
[root@odoo ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
warning: /var/tmp/rpm-tmp.f5McIF: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing... ########################################### [100%]
1:remi-release ########################################### [100%]
Step 2- Complete installation & configuration part:
Run yum update
[root@odoo ~]# yum update
Install HTTPd server
[root@odoo ~]# yum install httpd
Install PHP
[root@odoo ~]# yum install php php-cli php-gh php-common
Install Nagios
[root@odoo ~]# yum install nagios nagios-plugins-all nagios-plugins-nrpe nrpe
Check Nagios version
[root@odoo ~]# nagios -v
Enable httpd and Nagios service to start auto during system boot or restart
[root@odoo ~]# chkconfig httpd on && chkconfig nagios on
Start httpd & Nagios service
[root@odoo ~]# service httpd start && service nagios start
Open Port 80 through iptables
[root@odoo ~]# vi /etc/sysconfig/iptables
Modify config file like below
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Save and exit from file & restart iptables service
[root@odoo ~]# service iptables restart
Step 3- Setup Nagios login details
Set Nagios user name and password
[root@odoo ~]# htpasswd -c /etc/nagios/passwd nagiosadmin
New password: *******
Re-type new password: ******
Adding password for user nagiosadmin
Step 4- Validate authentication & installation.
Check Nagios login using URL below
After successful authentication, you will get the window like below.
No comments:
Post a Comment