Admin-Ahead Community
Linux => Server Security & Hardening => Topic started by: nidhinjo on May 12, 2018, 06:00:55 pm
-
Install Nagios 4 which is an enterprise open source monitoring system.
Before proceed with Nagios installation make sure that the Apache and PHP are installed and working properly ,
1.) Install Nagios.
Also Install basic plugins to monitor nagios server itself.
# install from EPEL
[root@ ~]# yum --enablerepo=epel -y install nagios nagios-plugins-{ping,disk,users,procs,load,swap,ssh,http}
2.) Configure Nagios.
[root@~]# vi /etc/httpd/conf.d/nagios.conf
# line 24-26, change settings to set access permissionlike follows ( set for line 54-56, too )
#
Require all granted
#
Require local
Require ip 127.0.0.1 10.0.0.0/24
# add nagios admin user
[root@~]# htpasswd /etc/nagios/passwd nagiosadmin
New password: # set any password
Re-type new password:
Adding password for user nagiosadmin
[root@~]# systemctl start nagios
[root@~]# systemctl enable nagios
[root@~]# systemctl restart httpd
3.) Allow HTTP service in the server firewall.
[root@dlp ~]# firewall-cmd --add-service={http,https} --permanent
success
[root@dlp ~]# firewall-cmd --reload
success
4.) Access to the "http://(Nagios server's hostname or IP address)/nagios/" from a client which is in the network allowed by Nagios server and authenticate with the Nagios admin user "nagiosadmin" to login.
(https://www.server-world.info/en/CentOS_7/nagios/img/1.png)
5.) After successing authentication, the Nagios admin site is displayed
(https://www.server-world.info/en/CentOS_7/nagios/img/2.png)
6.) It's possible to view system status to click "Tactical Overview" and so on.
(https://www.server-world.info/en/CentOS_7/nagios/img/3.png)
(https://www.server-world.info/en/CentOS_7/nagios/img/4.png)