Nagios – Install and configure on Centos 7

monitoring-logo

Nagios is an awesome Open Source monitoring tool, its provides you more comprehensive monitoring environment to always keep an eye on your all machines / networks whether you are in a your data center or just your small labs.

With Nagios, you can monitor your remote hosts and their services remotely on a single window. It shows warnings and indicates if something goes wrong in your servers which eventually helps us to detect some problems before they occur. It helps us to reduce downtime and business losses.

Prerequisite :

  • Install and configure Apache httpd – (Click here for reference)
  • Install and configure PHP – (Click here for reference)

Scenario :

Server 1 – http://www.server.world (192.168.0.101) (Nagios installed on this server)

Server 2 – dlp.server.world (192.168.0.100) ( Need to monitor using Nagios )

Server 3 – exm.server.world (192.168.0.110) ( Need to monitor using Nagios )

Server 4 – mail.server.world (192.168.0.103) ( Need to monitor using Nagios )

Server 5 – dell.server.world (192.168.0.104) ( Need to monitor using Nagios )

Configuration :

Step 1 : Install Nagios and basic Nagios plugins to monitor Nagios server itself.

[#] yum -y install nagios nagios-plugins{ping,disk,users,procs,load,swap,ssh,http}

1.PNG

Step 2 : Now Configure Nagios

[#] vi /etc/httpd/conf.d/nagios.conf

1

Now make changes in line 24-26, change settings to set access permission like follows ( set for line 54-56, too )

1.PNG

1

Step 3 :  Add nagios admin password

[#] htpasswd  /etc/nagios/passwd  nagiosadmin

1.PNG

Step 4 : Now start Nagios and web server services

[#] systemctl start nagios

[#] systemctl enable nagios

[#] systemctl restart httpd

1.PNG

Step 5 : 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.

1 (1).png

After successful login , the Nagios admin site is will look like below

Win xp ( Linux Client)-2017-03-29-15-08-33.png

To view the system status we can click on the “Tactical Overview” option in the left sidebar panel of the nagios admin website.

1.PNG

1.PNG

4.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s