Moogsoft Docs

Configure Services to Restart

You can use Moogsoft's service management scripts to control process startup for Moogsoft AIOps.

Once you configure and activate the scripts, if Moogsoft AIOps fails or restarts, the process manager script starts after one minute and attempts to restart the processes three times. If the server does not restart in that time, the processes cannot restart.

This is useful for getting processes back up and running if Moogsoft AIOps fails or restarts . For example, you might want to ensure several LAMs remain alive so no events are missed if your system reboots.

Before you Begin

Before you can configure which services start at reboot, ensure you have met the following requirements:

  • You have downloaded the file.
  • You have set the $MOOGSOFT_HOME environment variable to ~/.bashrc .

Configure the Services to Restart

To configure which services and their associated processes you want to start up when Moogsoft AIOps reboots:

  1. Unzip the file.
  2. Edit the keep_procs_alive.conf configuration file to meet you requirements.
    Enter a '1' for services you want to start at restart and a '0' for those that you do not want to start. The following services are set to restart by default:
    • RabbitMQ
    • MySQL
    • Nginx
    • Elasticsearch
    • Apache-Tomcat
    • M oogfarmd.

  3. Save the configuration file at $MOOGSOFT_HOME/config/keep_procs_alive.conf

  4. Move the the script to $MOOGSOFT_HOME/bin/utils

  5. Make the file executabl e. For example:

    chmod +x $MOOGSOFT_HOME/bin/utils/
  6. Add the script to the cronta b. For example:

    (crontab -l; echo -e "*\t*\t*\t*\t* $MOOGSOFT_HOME/bin/utils/ 2>&1") | crontab -

After you complete these steps, the next time you restart the server or it fails, processes restart automatically according to the configuration.


If you want to temporarily stop a process manually, follow these steps:

  1. Edit the keep_procs_alive.conf configuration file and set the service to '0'. For example, if you want to temporarily stop the Trapd LAM service:

  2. Save the file. You can now stop the service manually . See Control Moogsoft AIOps Processes for details. For example:

    process_cntl trapd_lam stop
  3. If you want the service to start, edit the file again and set the service to '1'. For example: