1. Home
  2. Tutorials and How Tos
  3. How to Add a Slack Webhook Action to an Action Group

How to Add a Slack Webhook Action to an Action Group

Integrating the Slack instant messaging service into your OmniCenter monitoring workflow is fairly straightforward. Simply follow the steps below to create an action group that will alert your Slack account with a custom message of your choice that can then be assigned to the alarm configuration of any OmniCenter check.

First, you’ll have to complete some steps in Slack.

  1. Log in to your account at the Slack website.
  2. Create an Incoming Webhook Integration.
  3. In the “Post to Channel” section, either create a new channel or select an existing one.
  4. Click “Add Incoming WebHook Integration.”
  5. Copy the supplied URL.

Now you can configure OmniCenter. Navigate to the Actions Administration page (Administration → Alerts → Actions).

Create a new action group.
Click the Add A Group button at the top of the page. Or, if there is an existing group to which you would like to add a new action, click the add action button in that group’s header and skip to the next section.

  1. In the Add Group dialog:
    1. In the “GROUP NAME” field, enter a name for this action group (for example, “SlackAlert”).
      • No spaces are allowed in action group names.
    2. In the “MANUAL ALERT ACCESS LEVEL” field, select a user access level for this group.
      • This setting allows users of the selected access level and higher to manually run this action group from within an incident.
    3. Click Add Group to add this action group to OmniCenter.
      • Action groups are selected when configuring alarms for OmniCenter checks.

Create a new action to add to your action group.
If you just created a new action group, the wizard will automatically direct you to the Add Action dialog. Otherwise, click the add action button in an existing action group’s header to open the Add Action dialog.

  1. In the Add Action dialog:
    1. In the “ACTION NAME” field, enter a name for this action (for example, “Slack Action”).
      • Spaces are allowed in action names.
    2. Click Add Action to add this action to your action group.

Create a new method to add to your action.
If you just created a new action, the wizard will automatically direct you to the Add Method dialog. Otherwise, click the add method button in an existing action’s header to open the Add Method dialog.

  1. In the Add Method dialog:
    1. In the “ACTION METHOD TYPE” field, select “Webhook” from the drop-down.
    2. In the “URL” field, enter the URL supplied by Slack.
      • Remove the https:// from the beginning of the address.
    3. In the “PAYLOAD” field, enter:
      [header]
      {

      “Content-Type”  : “application/json”,
      }
      [header]
      { “text”: “{EXAMPLE_MACRO1 EXAMPLE_MACRO2}” }
      • Text contained in curly braces (EXAMPLE_MACRO1 and EXAMPLE_MACRO2 in the example above) represents a series of OmniCenter macros, and will be translated into readable text before the payload is sent. Replace the example macros above with the macros you would like to use. Multiple macros may be included in the same field by separating them with a blank space. See the list of available macros in the Alert Template Administration page entry.
    4. Click Add Method to add this method to your action.
The Add Method dialog showing the appropriate details for creating a Slack webhook alert.

Select this action group in the alarm configuration of an OmniCenter check. When that check opens an incident, Slack will be alerted according to the OmniCenter incident state change rules.

Updated on April 23, 2020

Was this article helpful?

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Reply