En nuestro artículo anterior, hemos cubierto la instalación del servidor Icinga 2 y la instalación de Icinga Web 2 . En esta guía, veremos cómo agregar máquinas Linux remotas en servidor Icinga 2 .
Serie de artículos
Glaseado 2
1 :Cómo instalar Icinga 2 en CentOS 7/RHEL 7
2 :Cómo instalar Icinga 2 en Ubuntu 18.04/16.04/Debian 9
Icinga Web 2
1 :Cómo configurar Icinga Web 2 en CentOS 7/RHEL 7
2 :Cómo configurar Icinga Web 2 en Ubuntu 18.04/16.04/Debian 9
Cliente Icinga
1 :Cómo agregar máquinas Linux remotas a la herramienta de monitoreo Icinga 2
Para mejorar la seguridad, Icinga2 utiliza certificados SSL para la comunicación entre el cliente y el servidor.
Las comunicaciones entre el servidor y el cliente se realizan en el puerto TCP 5665. Por lo tanto, asegúrese de haber configurado el firewall para permitir el tráfico en ambos sentidos.
Arquitectura
El siguiente diagrama muestra la ilustración de la arquitectura servidor-cliente Icinga 2 distribuida.
Nodo maestro – Este es el nodo superior en estructura, donde generalmente instala Icinga 2 e Icinga Web 2. Combina las comprobaciones ejecutadas de los nodos secundarios en notificaciones.
Nodo Satélite – Este nodo puede recibir configuraciones para hosts o servicios, etc. del nodo maestro. Puede ejecutar las comprobaciones por sí mismo o delegar las comprobaciones a los nodos del cliente, y puede ejecutarse incluso si el nodo maestro no está disponible.
Nodo de cliente – Este nodo recibe la ejecución de un comando remoto desde el nodo principal (maestro o satélite) o ejecuta sus propias comprobaciones configuradas.
Aquí, configuraremos la comunicación de los nodos Maestro y Cliente y eliminaremos el nodo Satélite.
Nuestro diagrama de configuración se verá a continuación.
Medio ambiente
Nombre de host | Dirección IP | SO | Propósito |
servidor.itzgeek.local | 192.168.1.10 | CentOS 7/Ubuntu 18.04/Debian 9 | Nodo maestro |
centos.itzgeek.local | 192.168.1.20 | CentOS 7 | Nodo de cliente 1 |
ubuntu.itzgeek.local | 192.168.1.30 | Ubuntu 18.04 | Nodo de cliente 2 |
Configurar maestro Icinga2
El comando del asistente del nodo Icinga2 lo ayudará a configurar el maestro Icinga 2. El asistente debe ejecutarse como root.
icinga2 node wizard
Salida:
Welcome to the Icinga 2 Setup Wizard!
We will guide you through all required configuration details.
Please specify if this is a satellite/client setup ('n' installs a master setup) [Y/n]: n << Setup Master
Starting the Master setup routine...
Please specify the common name (CN) [server.itzgeek.local]: << Press Enter
Reconfiguring Icinga...
Checking for existing certificates for common name 'server.itzgeek.local'...
Certificate '/var/lib/icinga2/certs//server.itzgeek.local.crt' for CN 'server.itzgeek.local' already existing. Skipping certificate generation.
Generating master configuration for Icinga 2.
'api' feature already enabled.
Master zone name [master]: << Press Enter
Default global zones: global-templates director-global
Do you want to specify additional global zones? [y/N]: N << Press N and Enter
Please specify the API bind host/port (optional):
Bind Host []: << Press Enter
Bind Port []: << Press Enter
Do you want to disable the inclusion of the conf.d directory [Y/n]: Y << Press Y and Enter
Disabling the inclusion of the conf.d directory...
Checking if the api-users.conf file exists...
Done.
Now restart your Icinga 2 daemon to finish the installation!
Icinga2 Node Wizard hace lo siguiente:
- Habilita la función API, si aún no está habilitada.
- Crea la nueva autoridad de certificación para firmar las solicitudes de firma.
- Genera la nueva solicitud de firma de certificado (CSR), fírmela con su propia CA
- Descargar elementos de configuración (zonas y terminales) a /etc/icinga2/zones.conf
- Actualización de /etc/icinga2/constants.conf archivo con NodeName y TicketSalt.
Verifique los archivos de configuración.
cat /etc/icinga2/constants.conf | egrep -i "ZoneName|TicketSalt"
Asegúrese de que las configuraciones de su nodo principal sean como las siguientes.
const ZoneName = "server.itzgeek.local"
const TicketSalt = "16ad49e3cf16628ba1be0f021414805f"
Asegúrese de que /etc/icinga2/zones.conf El archivo tiene los detalles del nodo principal.
cat /etc/icinga2/zones.conf
Salida:
/*
* Generated by Icinga 2 node setup commands
* on 2018-09-23 10:47:55 +0530
*/
object Endpoint "server.itzgeek.local" {
}
object Zone "master" {
endpoints = [ "server.itzgeek.local" ]
}
Reinicie el servicio Icinga2 para que tenga efecto de configuración maestra.
### For Systemd Systems ###
systemctl restart icinga2
### For SysVinit Systems ###
service icinga2 restart
Páginas:1 2 3