Moogsoft Docs

Workflow Engine Moolets

The Workflow Engine Moolets perform tasks on events, alerts, and Situations as specified in a user-defined workflow. See Workflow Engine for more information.

The following files define the actions that are available when you define a workflow in the Moogsoft AIOps UI:

  • A Workflow Engine Moobot specifies a set of actions that are available when you define a workflow in the Moogsoft AIOps UI.

  • The $MOOGSOFT_HOME/config/moolets/ folder has one default config file for each workflow engine:

    • event_workflows.conf: Event workflows process event data after data ingestion from a LAM and before the Alert Builder.

    • enrichment_workflows.conf: Enrichment workflows process alert data after the Alert Builder but before the Maintenance Window Manager.

    • alert_workflows.conf: Alert workflows process alert data after the Maintenance Window Manager and before they pass to a clustering algorithm.

    • situation_workflows.conf: Situation workflows process Situation data after the Teams Manager. For example, you can use a Situation workflow when you want to integrate with a ticketing system.

  • Each configuration file has a moobot field that specifies the set of supported Moobots. The default Moobot for all four Moolet types is $MOOGSOFT_HOME/bots/moobots/WorkflowEngine.js. Do NOT modify the Moogsoft supplied WorkflowEngine.js.

You can add and update Workflow Engine functionality. See Update the Workflow Engine for more information.

Workflow Engine properties

The Workflow Engine Moolets include the following properties:

run_on_startup

If set to true, the Moolet runs automatically on startup.

Type

Boolean

Default

true

moobot

Set of Moobots to load into the Moolet.

Type

String for one Moobot. Array for multiple Moobots.

For example: ["WorkflowEngine.js", "CustomWorkflowEngine.js"]

Default

"WorkflowEngine.js"

process_output_of

Specifies the source for the objects to route through the Workflow Engine as a Moolet. Defines the engine's location in the the data processing flow.

Type

String

Default

  • Enrichment workflows: AlertBuilder

  • Alert workflows: MaintenanceWindowManager

  • Situation workflows: SituationMgr

event_handlers

Configure the engine to receive the specified event types from any Moolet. See Constants for information on event types.

Type

Array

Default

  • Event workflows: ["Event"]

  • Situation workflows: ["Sig", "SigUpdate", "SigStatus", "SigClose", "ArchivedSig"]

message_type

Defines the type of object to process in the workflow.

Type

String

Default

  • Event workflows: event

  • Enrichment workflows: alert

  • Alert workflows: alert

  • Situation workflows: situation

Update the Workflow Engine

Moogsoft periodically provides updates to the Workflow Engine for Moogsoft AIOps. This topic tells you how to replace the core workflow engine files and any supporting files.

Before you begin

Before you update the Workflow Engine:

  • Verify you have SSH access to to your Moogsoft AIOps machines. For distributed or Highly Available installations, update the Workflow Engine on all core role machines where you run Moogfarmd. See Server Roles.

  • Download the latest WorkflowEngine bundle and transfer them to the machines where you are performing the update. For information on the latest Workflow Engine, see Updates for Moogsoft AIOps v7.3.0.

  • Verify you know the operating system user that runs Moogfarmd and perform all steps as that same user.

Install a Workflow Engine update

To install an update for the Workflow Engine, you replace the Workflow Engine Moobot and add or replace any supporting files for the Moobot to all machines running Moogfarmd.

  1. Download and untar the Workflow Engine bundle. Visit this link in a browser to download the package. Provide 'speedy' credentials when requested.

    https://speedy.moogsoft.com/safe/wfe/WorkflowBundle-v1.0.tar.gz 

    Copy the file to the server where moog_farmd will be running, then untar it:

    tar -xf WorkflowBundle-v1.0.tar.gz
  2. Create a backup of the original Workflow Engine Moobot on the instance. For example:

    cp $MOOGSOFT_HOME/bots/moobots/WorkflowEngine.js \
       $MOOGSOFT_HOME/bots/moobots/WorkflowEngine.ORIG.js
  3. Copy the new WorkflowEngine.js file to $MOOGSOFT_HOME/bots/moobots. For example from the directory where you extracted the bundle:

    cp bots/moobots/WorkflowEngine.73.js \    
       $MOOGSOFT_HOME/bots/moobots/WorkflowEngine.js
  4. For bundles with updates in the config directory, make a backup of $MOOGSOFT_HOME/config. For example (change to tar check init):

    cp -r $MOOGSOFT_HOME/config $MOOGSOFT_HOME/config.backup 
  5. Copy the files from the bundle config directory to $MOOGSOFT_HOME/config. For example from the directory where you extracted the bundle:

    cp -r config $MOOGSOFT_HOME/config
  6. For bundles with updates in the contrib directory, make a backup of $MOOGSOFT_HOME/contrib. (do same as config tar) For example:

    cp -r $MOOGSOFT_HOME/contrib $MOOGSOFT_HOME/contrib.backup 
  7. Copy the files from the bundle contrib directory to the $MOOGSOFT_HOME/contrib directory. For example from the directory where you extracted the bundle:

    cp -r contrib $MOOGSOFT_HOME/contrib
  8. Restart Moogfarmd.