3 ene 2019

PART 2. Installing Nagios Core on CentOS 7 Minimal



In this article we are going to prepare our CentOS 7 VM for Nagios Core installation and perform the installation itself. Then we're going to try a simple check.

NAGIOS AND PLUGINS INSTALLATION

1. First of all, we will need to disable Selinux module:



2. Install all the needed dependencies, including web server, php libaries, ssl libraries, etc:



3. Once done, we are going to add nagios user and group, then we assign nagios group to nagios and apache user:


4. Download Nagios Core and Nagios Plugins package and uncompress them:





5. Once uncompressed, we're compiling Nagios Core and correspondant plugins:




6. Afterwards we are going to create a password in order to being able to acces web interface:


7. After compiling Nagios plugins we're starting the web server and nagios daemon itself:


8. If we cannot access the web server on this stage, we will need to open port 80 on the Nagios machine using the next command:


9. The web page is going to request the password defined in previous steps:



10. Now, if we go to "Tactical overview" we can see the Nagios server itself wich is defined as "localhost". From there we can also see the status of its different services:





DEFINING A NEW HOST

In this step we are going to define a new host which is going to be our Windows 10 machine.

1. Uncomment the "servers" directory line in nagios.cfg file:


2. Create host configuration file in /usr/local/nagios/etc/objects/servers directory:


3. Configure static IP@ on monitord machine:



 4. Define monitored host like in the next example and restart nagios service:


The most important parameters are the address, which is the IP@ of our machine, check_command and the other ones which detailed description you can find on official nagios core web site.


5. Now we are able to see the new host in "tactical overview" tab in our web interface, however pending for now:


6. Configure NTP server in order to show time/date correctly:

Update repositories, install NTP package, set the timezone and check the date:




7. Finally enable http, nagios and ntpd service to launch automatically on startup:


That's it for now. Hope you enjoyed this article and see you soon! :) Happy New Nerdy Year!

No hay comentarios:

Publicar un comentario