Skip to main content

Send notifications to Opsgenie

Note

This procedure uses the alert webhook.

You can configure Moogsoft Cloud to forward incidents to an Opsgenie team using an outbound webhook integration.

Before you begin

Before you set up your Opsgenie outbound integration:

  • Make sure you are signed into your Moogsoft Cloud instance.

  • Make sure you are signed into Opsgenie.

Set up an inbound integration in Opsgenie

  1. Open Opsgenie. From the top menu, click Teams.

  2. Choose or create the team that will be responsible for the Moogsoft Cloud integration.

  3. From the team page, navigate to Integrations > Add integration.

  4. Click the API tile.

  5. Provide a unique name for the integration, such as "Moogsoft."

  6. Copy the API key.

  7. Verify that Create and Update Access are enabled.

  8. Save the integration.

Configure an outbound webhook in Moogsoft Cloud

  1. Within Moogsoft Cloud, navigate to Integrations > Outbound Integrations > Alert Webhook.

  2. Click Add a Webhook and complete each section according to the following:

    1. Name and Scope:

      1. Provide a unique name for the webhook.

      2. Under Type, select Incident.

      3. Within the filter section, add conditions to control which incidents or updates are forwarded to Opsgenie.

    2. CREATE Operation and HTTP Configuration:

      1. Under Request Method, select POST

      2. Under URL, copy and paste the following:

        https://api.opsgenie.com/v2/alerts
      3. Under Authorization, select No auth. This should already be the default value.

      4. Under Headers, add a new header row with the following parameters:

        • Key: Authorization

        • Value: GenieKey¬†<Opsgenie API Key>

        Replace <Opsgenie API Key> with the API key that you copied from Opsgenie.

    3. Payload Body for CREATE Operation:

      1. Replace the default payload with the following:

        {"description":"Moogsoft Issue #$id with severity $severity and description $description at $incident_url is $status", "message":"$description"}

        Leave all other settings unchanged.

      2. Click Test in the upper right-hand corner. You should see response details and a confirmation that the webhook is configured correctly.

      3. Make additional payload adjustments according to your business needs. To learn more about fine-tuning your outbound payload, see Configure the CREATE payload body for an alert webhook.

    4. UPDATE Notifications:

      1. If you want to be notified when incidents or alerts change, enable update notifications (optional).

      2. Under Triggers, select the conditions that should trigger update notifications. For example, you could choose Severity increased and Status changed.

        If you wish to be notified of all changes that occur, select all the conditions.

    5. Payload Body for UPDATE Operation:

      Note

      Only proceed if you have enabled update notifications.

      1. Replace the pre-populated JSON in the Key/Value Editor with the data payload you used for the CREATE operation and make any adjustments you choose.

        For example, you could use the following payload:

        {"description":"Updated Moogsoft Issue #$id with severity $severity and description $description is $status", "message":"$description"}

        Leave all other settings unchanged.

      2. Click Test in the upper right-hand corner to verify that the webhook is still working correctly.

  3. Save the webhook.

  4. Verify that the webhook is working as expected:

    1. Navigate to Integrations > Ingestion Services > Events API.

    2. Click the arrow button below the sample event to send an event to Moogsoft Cloud.

    3. Verify that an incident has been created in Moogsoft Cloud.

    4. Within Opsgenie, verify that an incident notification has arrived. You should also see the test notification(s) you sent earlier.

    5. If you have enabled updates and included Status changed as a trigger, close the incident in Moogsoft Cloud and verify in Opsgenie that an update notification has arrived.