For the execution of more than one Pandora FMS agent in the same server there are the following configuration options;
Integrated in Pandora FMS’ agent you can enable as many broker agents as you want. To activate a broker agent, we should only add to the main agent configuration file the line
broker_agent adding to it the name of the agent that we want to configure.
Once added and restarted the Software Agent, a new agent configuration file will be created in the directory where is the agent configuration, with the broker name configured and with a copy of all the modules of the main configuration file. A configuration file will be added for each one of the broker agents added to the main agent. The execution of these agents is in series and in case there is a big number of modules it could suffer delays in the monitoring.
Execution of more than one agent process
If you take a look at
/etc/init.d/pandora_agent_daemon), in the first 20 lines of this script you will have a set of variables that you will need to rewrite in case you duplicate this startup script for each one of the agents that you want to launch in the server:
PANDORA_PATH=/etc/pandora #PATH where the agent configuration files are stored
DAEMON=/usr/bin/pandora_agent #Path of the agent binary, you don't need to have several binaries, with the same binary you can launch several processes.
PIDFILE=/var/run/pandora_agent.pid #PID of the agent, must be different in each process
LOGFILE=/var/log/pandora_agent.log #Logs of the agent, it is advisable to have them separated.
You only have to create a directory
/etc/pandora2 AND copy your
/etc/init.d/pandora_agent2_daemon with the lines that appear before being modified so as not to interfere with the first agent, something like:
/etc/pandora2 and modify it to your liking with the configuration you want to indicate in this agent. You can repeat the process for each one of the agents you want to create.
To start or stop this agent you only have to execute