Example: Using the HTTP Action Type PowerPack

Download this manual as a PDF file

This section describes how to use the contents of the HTTP Action Type PowerPack to send an HTTP request to Microsoft Teams or Slack.

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all of the menu options, click the Advanced menu icon ().

Using the HTTP Action Type PowerPack to Send an HTTP Request

The HTTP Action Type PowerPack includes an automation action template. In order to send an HTTP request from SL1 to Microsoft Teams or Slack, you must create a new automation action using that template and align an automation policy. Once you have completed the steps below, your Microsoft Teams or Slack channel should populate with messages based on the configured criteria.

NOTE: The steps in this section use Microsoft Teams as an example, but the process for configuring SL1 to use the contents of the HTTP Action TypePowerPack to send an HTTP request are the same for both Microsoft Teams and Slack.

Creating a Webhook in Microsoft Teams or Slack

Before you can send an HTTP request to Microsoft Teams or Slack using the automation action template included in the HTTP Action Type PowerPack, you must create an incoming webhook for the Microsoft Teams or Slack channel that you want to display your SL1 Event messages.

NOTE: For information on creating an incoming webhook in Microsoft Teams, see https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook. For information on creating an incoming webhook in Slack, see https://slack.com/help/articles/115005265063-Incoming-webhooks-for-Slack

Customizing an Automation Action

Once you have generated and saved an incoming webhook from Microsoft Teams, you can customize the automation action template included in the HTTP Action Type PowerPack

To edit the "HTTP Action Template" automation action template to create a new automation action without a credential:

  1. Go to the Action Policy Manager page (Registry > Run Book > Actions).

  1. Locate the "HTTP Action Template" automation action, and then click its wrench icon (). The Editing Action page appears.

  1. Enter values in the following fields:
  • Action Name. Type a new name for your automation action.
  • Action State. Select Enabled.
  • Description. Type a description for your automation action.
  1. In the Input Parameters field, change the values of the following parameters:
  • url_override. The URL of the webhook you created in Microsoft Teams.
  • command_label. Type a label for your automation action that appears in the Event Actions Log.
  • NOTE: You can change the value in the "payload" parameter to customize the message that appears in Microsoft Teams. You can substitute this field with any Run Book Variables. For more information on Run Book Variables, see Run Book Variables.

  1. Click Save As.

Creating an Automation Policy

Once you have created a new automation action using the template included in the HTTP Action Type PowerPack, you must create an automation policy for the automation action to submit the HTTP request.

To create an automation policy for your newly created automation action:

  1. Go to the Automation Policy Manager page (Registry > Run Book > Automation).

  1. Click Create. The Automation Policy Editor page appears.

  1. Complete the following required fields:
    • Policy Name. Enter a name for the automation policy.
    • Policy Type. Select whether the automation policy will match events that are active, match when events are cleared, or run on a scheduled basis. Typically, you would select Active Events in this field.
    • Policy State. Specifies whether the policy will be evaluated against the events in the system. If you want this policy to begin matching events immediately, select Enabled.
    • Policy Priority. Specifies whether the policy is high-priority or default priority. These options determine how the policy is queued.
    • Organization. Select one or more organizations to associate with the automation policy. The automation policy will execute only for devices in the selected organizations (that also match the other criteria in the policy). To configure a policy to execute for all organizations , select System without specifying individual devices to align to.

    • Aligned Actions. This field includes the new action you created above. To add an action to the Aligned Actions field, select the action in the Available Actions field and click the right arrow (>>). To re-order the actions in the Aligned Actions field, select an action and use the up arrow or down arrow buttons to change that action's position in the sequence.

  2. Optionally, supply values in the other fields on this page to refine when the automation will trigger.
  3. Click Save.