GNU/Linux >> Tutoriales Linux >  >> Cent OS

Cómo configurar Icinga Web 2 en CentOS 7 / RHEL 7

Esta publicación cubre la instalación de Icinga web 2, una interfaz web para Icinga 2 en la que supervisa toda su infraestructura en un solo lugar.

Serie de artículos

1 :Cómo instalar Icinga 2 en CentOS 7/RHEL 7

2 :Cómo configurar Icinga Web 2 en CentOS 7/RHEL 7

3 :Cómo agregar máquinas Linux remotas a la herramienta de monitoreo Icinga 2

Esta guía le explica cómo configurar Icinga 2 con Icinga web 2. Podemos instalar Icinga web 2 usando un repositorio oficial o desde la fuente, según el sistema operativo.

Requisitos

  1. Un servidor web, por ejemplo, Apache o Nginx
  2. PHP 5.6.0 y superior con compatibilidad con cURL, gettext, intl, mbstring, OpenSSL y XML.
  3. Biblioteca PHP LDAP cuando se utiliza la autenticación LDAP o Active Directory.
  4. Bibliotecas PHP para MySQL o PostgreSQL

Instalar PHP y Extensiones de PHP

Como se dijo en los requisitos, Icinga Web 2 requiere la versión de PHP 5.6 y superior. La versión de PHP que necesita para Icinga web 2 es superior a la que está disponible en los repositorios base de CentOS/Redhat. Por lo tanto, deberá habilitar el repositorio SCL y el repositorio rhel-server-rhscl-7-rpms en CentOS y RHEL respectivamente.

### CentOS 7 ###

yum install -y centos-release-scl

### RHEL 7 ###

subscription-manager repos --enable rhel-7-server-optional-rpms
subscription-manager repos --enable rhel-server-rhscl-7-rpms

Instale el paquete PHP y las extensiones para Icinga Web 2.

### CentOS 7  ###

yum -y install rh-php71-php-json rh-php71-php-pgsql rh-php71-php-xml rh-php71-php-intl rh-php71-php-common rh-php71-php-pdo rh-php71-php-mysqlnd rh-php71-php-cli rh-php71-php-mbstring rh-php71-php-fpm rh-php71-php-gd rh-php71-php-zip rh-php71-php-ldap rh-php71-php-imagick

### RHEL 7 ###

yum -y install rh-php71-php-json rh-php71-php-pgsql rh-php71-php-xml rh-php71-php-intl rh-php71-php-common rh-php71-php-pdo rh-php71-php-mysqlnd rh-php71-php-cli rh-php71-php-mbstring rh-php71-php-fpm rh-php71-php-gd rh-php71-php-zip rh-php71-php-ldap

Configure la zona horaria en el archivo php.ini.

vi /etc/opt/rh/rh-php71/php.ini

Busque la siguiente línea y actualícela con su zona horaria.

date.timezone = US/Central

Reinicie el servicio PHP-FPM.

systemctl restart rh-php71-php-fpm

Habilite el servicio PHP-FPM para que se inicie automáticamente al arrancar el sistema.

systemctl enable rh-php71-php-fpm

Añadir repositorio Icinga 2

Agregue el repositorio Icinga 2 en su sistema en caso de que aún no lo haya configurado.

rpm --import https://packages.icinga.com/icinga.key
yum install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm

Instalar Icinga Web 2

Utilice el comando yum en CentOS/RHEL para instalar el paquete Icinga Web 2 junto con Icinga CLI y el servidor web Apache.

yum -y install icingaweb2 icingacli httpd

Habilite el servicio de Apache para que se inicie automáticamente al iniciar el sistema.

systemctl enable httpd

SELinux

Si está ejecutando Icinga Web 2 con SELinux habilitado, considere instalar el siguiente paquete para establecer la política para Icinga Web 2.

yum -y install icingaweb2-selinux

Cortafuegos

Ejecute los siguientes comandos para permitir que el tráfico HTTP acceda a Icinga Web 2 desde máquinas externas.

firewall-cmd --permanent --add-service=http
firewall-cmd --reload

Preparación de la configuración de Icinga Web 2

Icinga CLI se utiliza para realizar tareas de administración en la línea de comandos. Tanto Icinga Web 2 como CLI deben tener acceso a registros y configuraciones. Agregue el usuario del servidor web (Apache al grupo del sistema (icingaweb2)

groupadd -r icingaweb2
usermod -a -G icingaweb2 apache

Cree el directorio de configuración de Icinga Web 2.

icingacli setup config directory --group icingaweb2

Reinicie los servicios Apache y PHP-FPM.

systemctl restart httpd
systemctl restart rh-php71-php-fpm

Asistente de configuración de Icinga Web 2

Cuando visite Icinga Web 2 por primera vez, el asistente de configuración web de Icinga lo guiará a través de todos los pasos para una instalación exitosa de Icinga Web 2.

http://su.ip.addr.ess/icingaweb2/setup

Por motivos de seguridad, deberá generar el token para la instalación de Icinga Web 2.

Genere el token usando el siguiente comando.

icingacli setup token create

Salida:

The newly generated setup token is: 04fa4ea1baf4f0b9

Copie y pegue el token generado en la página de configuración y haga clic en Siguiente .

Páginas:1 2 3 4
Cent OS
  1. Cómo instalar Icinga 2 en CentOS 8 / RHEL 8

  2. Configurar la herramienta de monitoreo Icinga en CentOS 7 / RHEL 7

  3. Cómo configurar el servidor SysLog en CentOS 7 / RHEL 7

  4. Cómo configurar el servidor NFS en CentOS 7 / RHEL 7

  5. Cómo configurar mutt en CentOS/RHEL

Cómo configurar Icinga Web 2 en CentOS 8 / RHEL 8

Cómo instalar el servidor web Jetty en CentOS 7 / RHEL 7

Cómo configurar un Chef 12 en CentOS 7 / RHEL 7

Cómo configurar el servidor SysLog centralizado en CentOS 8 / RHEL 8

Cómo configurar Icinga Web 2 en Ubuntu 18.04 / Ubuntu 16.04 / Debian 9

Cómo configurar la replicación de MySQL en RHEL/Centos