Tuesday 9 May 2023

How to Install Nagios Server 4.4.9 on CentOS 8



Nagios Core is free and open source widely used monitoring tool which can be used for monitoring Linux servers, Windows servers, Network devices and other applications. Nagios provides alerting services (SMS, Email etc.) for abnormal utilization and issues for Attributes CPU load, Memory usage, Disk usage, Logged in users, Running processes etc. and Services HTTP, FTP, SSH, SMTP, POP3, SNMP etc. Nagios Core packages are not available in CentOS 8 base repository and it can be installed using EPEL repository.

This article describes How to Install Nagios Server 4.4.9 on CentOS 8

Step 1. Setup EPEL Repository: Follow the article “How to configure EPEL repository on CentOS 8” using yum command on CentOS 8.
 
Step 2. Nagios Packages: Run the following yum command to install Nagios packages and its dependencies:
 
[root@linuxcnf ~]# dnf install nagios
…….………………
Installed:
…………………….
  httpd-2.4.37-43.module_el8.5.0+1022+b541f3b1.x86_64
  nagios-4.4.9-1.el8.x86_64
…………………….
 
Complete!
[root@linuxcnf ~]#
 
Step 3. Start Services: Start Nagios and httpd service and enable on system boot up:
 
[root@linuxcnf ~]# systemctl start nagios httpd
[root@linuxcnf ~]# systemctl enable nagios httpd
Created symlink /etc/systemd/system/multi-user.target.wants/nagios.service /usr/lib/systemd/system/nagios.service.
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service /usr/lib/systemd/system/httpd.service.
[root@linuxcnf ~]#
 
Step 4. Firewall Configuration: Configure firewall to allow clients to access NFS Share:
 
[root@linuxcnf ~]# firewall-cmd --permanent --zone=public --add-port=80/tcp
success
[root@linuxcnf ~]# firewall-cmd --reload
success
[root@linuxcnf ~]#
 
Step 5. Reset Password: Reset Nagios authentication using below command in case facing issue in Login on Nagios Dashboard:
 
[root@linuxcnf ~]# htpasswd -m /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Updating password for user nagiosadmin
[root@linuxcnf ~]#
 
Step 6. Validation: Now access Nagios dashboard from any browser using <Server IP address>/nagios or <hostname>/nagios and you will get Nagios dashboard as shown below:
 

Done!!! Nagios Server 4.4.9 has been installed successfully on CentOS 8.

No comments:

Post a Comment