Skip to main content

processAyehuAutomationResponse

A Workflow Engine function that processes the automation results response sent by Ayehu using a workflow inform. The workflow inform request must send int the associated alert id or Situation id as part of the results payload.

This function is available as a feature of the Add-ons v2.3 download and later.

This function is available for alert and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function processAyehuAutomationResponse has no arguments.

The payload sent with the workflow inform request from Ayehu must contain the following body format where the alert_id (or sitn_id for Situations) refers to the alert (or Situation) that initiated the automation. The target and instance refer to the Moogsoft Ayehu Integration config and, again, are passed to Ayehu with the automation request.

Set the workflow_name and engine_name as shown below when using the standard response workflow. If you create a new workflow in the respective inform engine, override the workflow_name with your workflow name.

{
        "workflow_name" : "Ayehu Automation Response",
        "engine_name" : "Alert Inform Engine",
        "alert_id" : 167,
        "context" : {
               "passedTarget" : "Ayehu",
               "passedInstance" : "Ayehu1",
               "passedStatus" : "Completed",
               "passedSummary" : "RC=0, NFS server restarted",
               "passedResultsURL" : "https://ayehu-server-linkToResults"
        }
}

Example

The following example demonstrates typical use of Workflow Engine function processAyehuAutomationResponse.

In this case, the workflow processes the response from Ayehu and updates the alert custom_info with the status (return code) and results link. A post is made to any related Situations with the summary results and link. If the alert is not a member of any Situations, then the summary results (max 100 chars, truncated as required) are set in the alert custom_info.

Sample Workflow - Ayehu Automation Response (Alert Inform Engine WFE)

Action

Description

Entry filter

Empty

DELAY

0 seconds (set as needed)

Process response

(processAyehuAutomationResponse)

Process the Ayehu automation response