Mostrando entradas con la etiqueta Nagios Core. Mostrar todas las entradas
Mostrando entradas con la etiqueta Nagios Core. Mostrar todas las entradas

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!

30 nov 2018

PART 1. What is Nagios?



Esto es una traducción y adaptación a inglés de mi proyecto final del grado superior de Administración de Sistemas Informáticos en Red, cursado en el instituto de Cuatrovientos entre 2014 y 2016. Me servirá para recordar este interesantísimo mundo de la monitorización del entorno TI y también para practicar el inglés. Espero que también sirva a alguien cara a empezar en el mundillo de Nagios.

This is the traduction and adaptation to English language of my final grade project, which is an introduction to mysteries of Nagios monitorization software and its functionality as well.

1. What is Nagios?

Nagios is a powerful monitorization tool, widely used in the enterprise area. It lets you supervise workstations, servers and other networking devices with their main services, as well as hardware values (CPU, RAM usage, CPU load, storage load, lets you know whether a port on your machine is opened) and services hosted by any particular machine: HTTP, SMTP, POP3, IMAP, FTP, etc.

When a host starts to behave in an abnormal way, Nagios is capable to notify this information to the responsible contact via different ways: E-mail, SMS message, instant messaging.

We can differ between Nagios Core, which is opesource and free and Nagios XI, which is not free, however is based on Nagios Core, superposing additional layers over the original application, extending its functionality, configuration and support of the software. One of its strong points is, with no doubt, the capability of configuration via web interface, whereas Nagios Core needs a manual config.

2. Which are the main functionalities of Nagios XI?

- Detect and respond in the fastest way when an IT failure occurs.
- Via advances statistics, anticipate the need of updating infrastructure before the systems start to fail.
- Coordinate the responses of the tech team.
- Being able to comply the SLA agreement.
- Monitorize efficiently and in a centralized way all of the enterprise infrastructure and assure the continuity of the business.
- Control complex infrastructures using distributed monitoring.

3. Nagios Core / Nagios XI comparison



4. First steps. Lab environment and Nagios installation

I'm going to create a small lab environment which is going to grow as we move along this "tutorial". I'm using VMware Workstation 14.1.2, build-8497320 if anyone's asking. You can use Oracle Virtualbox as an alternative. My virtual lab will consist of 2 virtual machines for now:

-CentOS 7 x64 VM, which is the recommended OS for Nagios Core installation.
-Windows 10 x64 VM, which is going to be a monitored host.

Both hosts are being configured in bridged mode, which means they will be able to access the internet, as well as my physical machine.

First we are going to complete CentOS 7 installation, which image can be downloaded on its official web page. I hope my readers already know how to complete that task.


Once operating systems are installed, we are going to perform Nagios Core installation on CentOS 7 VM.

Why Nagios Core and not XI if it's better?

I choose Nagios Core and not XI version, because along with the manual configuration, you are going to understand better how it works internally. It can be compared with learning Linux using GUI instead of learning to work with the Command line/Terminal.

When the installation is finished we are going to login with the root user. If the root password is not defined then you need to login with your regular user and define it manually.

Initially we don't have internet connection in our CentOS machine, as the interface configuration is no definded. We can see it performing a ping to a Google public DNS (8.8.8.8):


Let's see available network interfaces:


We are going to define static config on ens33 interface:



Once we've saved the config file, we are going to restart the network service in order to apply the changes:


And as we can see, we already configured successfully a static IP address on our Nagios machine, with Internet connection:


Now, from the Windows 10 VM we are going to see if there's any problem connecting with the Nagios server:


Now from the server to Windows 10 host:


If you're issuing any problems, make sure the network is bridged correctly (to a physical interface which has Internet connection). If you can't ping Windows machine try to disable the firewall on the VM or define the rule.

In the next chapter we are going to download, install Nagios Core and finally perform our very first check on our Win10 Workstation.

See you and hope you enjoyed the article!