HA History Plugin
A plugin for managing HA (High Availability) historical database environments.
Introduction
The pandora_history_ha plugin allows the management of connectivity to historical databases configured in HA environments within Pandora FMS installations.
Installation
To install the service, download the installation package from the Marketplace.
Transfer the package to the host from which the service will be managed (normally the Pandora FMS server), extract it, and run the installation script included inside:
./pandora_history_ha_installer --install
By default, the installation will be performed in /opt/pandorafms/pandora_history_ha, but a custom directory can be specified using the --destdir parameter:
./pandora_history_ha_installer --install --destdir /opt/cutom_pandora_history_ha/
Configuration
Para gestionar el HA de la base de datos de histórico es necesario indicar las siguientes opciones de configuración en el fichero /opt/pandorafms/pandora_history_ha/pandora_history_ha.conf
| Parámetro | Descripción |
| dbname | Name of the historical database to connect to. |
| dbport | Connection port for the historical database. |
| dbuser | Historical database connection user. Requires the"`REPLICATION CLIENT" and "SUPER" (or "REPLICATION_SLAVE_ADMIN") privileges. |
| dbpass | Password for the previous user. |
| repl_dbuser | Historical database replication user. Requires the "REPLICATION SLAVE" privilege. |
| repl_dbpass | Password for the previous user. |
| ha_hosts | List of IP addresses or FQDNs of all hosts participating in the historical database HA cluster (comma-separated). |
| ha_interval | Interval, in seconds, between HA status checks. |
| ha_connect_retries | Number of retry attempts when connecting to the historical database HA cluster. |
| ha_connect_delay | Delay, in seconds, between connection retry attempts. |
| splitbrain_autofix | Enables (1) or disables (0) automatic HA recovery in the event of a split-brain situation. |
| verbose | Enables (1) or disables (0) detailed logging. |
| log_file | Path to the service log file. |
| pid_file | Path to the service PID file. |
| main_dbhost | IP address or FQDN of the main Pandora FMS database. |
| main_dbport | Connection port for the main Pandora FMS database. |
| main_dbname | Name of the main Pandora FMS database. |
| main_dbuser | Connection user for the main Pandora FMS database. |
| main_dbpass | Password for the previous user. |
Service
The pandora_history_ha plugin installs a SystemD service responsible for running the application.
Using the configuration defined in its configuration file, this service connects to the hosts that form the historical database HA cluster and to the main database in order to update the Pandora FMS configuration so that historical database connections are directed to the active HA primary node.
The service can be managed using the following command:
systemctl <action> pandora_history_ha