Set Up LAMs for HA
To configure a new backend LAM integration for HA on LAM 1 and LAM 2:
Make a copy of the corresponding LAM configuration file and rename it accordingly.
Make a copy of the corresponding LAMbot LAM file and rename it accordingly.
If applicable, amend the LAM configuration file to point to the LAMBot file (under the
Presend
section).Create the service script pointing to the configuration file.
Configure the
ha
section of the configuration file according to the type of LAM and its corresponding HA setup.
Configure a Polling LAM for HA
To configure a polling LAM for HA, you must set the LAMs as active / passive, and therefore in the same Moogsoft Onprem process group. If the system detects an issue with the active LAM, the passive instance will automatically take over.
To enable automatic failover:
On LAM 1 and LAM 2, edit the
$MOOGSOFT_HOME/config/system.conf
file and set theautomatic_failover
property totrue
:# Allow a passive process to automatically become active if # no other active processes are detected in the same process group "automatic_failover" : true,
Restart the polling LAMs to finish enabling automatic failover.
Configure a Receiving LAM for HA
For a HA configuration, the receiving LAMs must always run as active / active, meaning a load balancer (of your choice) places them in different Moogsoft Onprem process groups. Receiving LAMs run as active / active by default.
There are two methods you can use to implement your load balancer: chained failover or multiplexing (which sends to both active receiving LAMs.
If you choose to implement using multiplexing, ensure the following:
The
duplicate_source
parameter in the LAM config is set totrue
. The parameter lets Moogfarmd know to silently drop any event duplicates arriving within a configurable period.The configuration files for both active Receiving LAMs, running as an HA pair, are identical, apart from their
ha
sections. This ensures that Moogfarmd is able to detect the event duplicates correctly.
The following example cURL command is a call from the command line to check on the status of the LAM instance:
[root@server1 moogsoft]# curl -X GET "http://server9:8888" {"success":true,"message":"Instance is active","statusCode":0}