Setting up HA for a Receiving LAM

The next and final step in the HA installation is to set up HA for any LAMs being used. We will not delve into the complex process of using the Moogsoft Bridge and a local RabbitMQ clusters for a hybrid solution, but we'll show the process for setting up a single receiving LAM as an HA pair. In Enterprise v8.0, all receiving LAMs should always run in active/active mode, so that is the configuration we will use.

Overview

In this example, we'll use the REST LAM as our receiving LAM and set it up as an HA pair. The process is essentially the same for any LAM that you would like to deploy in active/active mode, and the only difference for a LAM that you would like to deploy in active/passive mode is that the group values would be the same on the primary and secondary nodes, and the duplicate_event_source property would be removed altogether or set to false.

You will fulfill the following requirements:

  • Edit the ha section of the REST LAM configuration file on your primary and secondary nodes to enable HA for this LAM in active/active mode. The correct settings will be slightly different on the primary and secondary nodes, and should look as follows:

    ha:
    {
        group            : "rest_lam_primary" (on the primary) or "rest_lam_secondary" (on the secondary),
        instance         : "rest_lam_primary" (on the primary) or "rest_lam_seconday" (on the secondary),
        duplicate_event_source : true},
  • Once you've edited the files, start/restart the REST LAM on your primary and then your secondary instance, and verify the HA status by running ha_cntl -v. You should see that the REST LAM on your primary is active, and the one on your secondary is also active.

Step-By-Step Solution

Important

If you experience issues with any of the commands that follow, try typing them in manually rather than copying and pasting them.

  1. Connect to your primary node via SSH, become root, and stop the restlamd service using the command: systemctl stop restlamd

  2. Change to the $MOOGSOFT_HOME/config directory and edit the rest_lam.conf file to uncomment and change the ha section to look as follows:

    ha:
    {
        group               : "rest_lam_primary",
        instance            : "rest_lam_primary",    
        duplicate_event_source    : true
    },

    Note

    Ensure there is a comma at some point before the "ha" section.

  3. Perform steps 1 and 2 on your secondary node, making sure to use "rest_lam_secondary" as the value of the instance and group properties.

    Note that we are setting up the REST LAM in active/active mode (each instance in a different process group). This is the correct setting for all receiving LAMs. If you wanted to set a (polling) LAM up in active/passive mode, you would need to

    • Have both instances in the same group by setting the same values for the group property in each instance

    • Remove the duplicate_event_source property, or set it to false.

  4. Start the restlamd service on your primary node using the command: systemctl start restlamd

  5. Start the restlamd service on your secondary node using the command: systemctl start restlamd

  6. Verify the HA status by running ha_cntl -v. You should see that the REST LAM instance on your primary is active, and the one on your secondary is also active.

Reflect

Congratulations! You’ve successfully completed an HA installation of Moogsoft Enterprise. You should be proud of your hard work. Take a screenshot of your ha_cntl -v output and email it to Moogsoft University to receive a proof of completion. (You'll probably need two screenshots to show the full output.)

Your boss is very pleased, and she is looking forward to having you learn more about the next implementation stages, including data ingestion, enrichment, and situation design. For now, though, take some time to enjoy your accomplishment.

This concludes the lab.