Moogsoft Docs

New Relic Webhook

To integrate with New Relic, set up a webhook notification channel in New Relic.

See the New Relic documentation for details on New Relic components.

Before You Begin

The New Relic integration has been validated with New Relic 2016. Before you start to set up your integration, ensure you have met the following requirements:

  • You have an active New Relic account.
  • You have the necessary permissions to configure notification channels in New Relic.
  • New Relic can make requests to external endpoints over port 443. This is the default.

Configure the New Relic Integration

Configure the New Relic integration in Moogsoft AIOps as follows:

  1. Navigate to the Integrations tab.
  2. Click New Relic in the Monitoring section.
  3. Follow the instructions to create an integration name.

See the New Relic Webhook Integration Reference for advanced configuration information.

Configure New Relic

You can create a notification channel to send data to your system and update alert policies using either of the following methods. When New Relic detects events matching the alert policy, it automatically notifies Moogsoft AIOps over the webhook notification channel.

Create Channel using the REST API

You can create notification channels and update New Relic alert policies using REST API calls. See the New Relic documentation for more information about REST API calls for alerts.

You can use the following REST call to create a notification channel to send event data to your system:

curl -X POST '' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
  "base_url": "",
  "auth_username": "moogsoft_username",
  "auth_password": "moogsoft_password",
  "payload_type": "application/json",
  "payload": {"account_id": 1, "account_name": "my_moogsoft_com" },
  "headers": {"header1": "test", "header2": "test"}

You can use the following REST call to update a New Relic alert policy with one or more notification channels:

curl -X PUT '' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -G -d 'policy_id=policy_id&channel_ids=channel_id' 

Create Channel in the User Interface

Log in to New Relic to configure a notification channel to send event data to your system. For more help, see the New Relic Documentation .

  1. Create a new notification channel in New Relic with the following properties:



    Channel Type Webhook
    Channel Name Send to Moogsoft AIOps
    Base URL

    <your New Relic integration URL>

    For example:

  2. Enable Basic Authentication and enter the following credentials:

    Field Value
    User Name Username generated in the Moogsoft AIOps UI
    Password Password generated in the Moogsoft AIOps UI
  3. Add the following custom JSON payload:

       "account_id": "$ACCOUNT_ID",
       "account_name": "$ACCOUNT_NAME",
       "condition_id": "$CONDITION_ID",
       "condition_name": "$CONDITION_NAME",
       "current_state": "$EVENT_STATE",
       "details": "$EVENT_DETAILS",
       "event_type": "$EVENT TYPE",
       "incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL",
       "incident_id": "$INCIDENT_ID",
       "incident_url": "$INCIDENT_URL",
       "owner": "$EVENT_OWNER",
       "policy_name": "$POLICY_NAME",
       "policy_url": "$POLICY_URL",
       "runbook_url": "$RUNBOOK_URL",
       "severity": "$SEVERITY",
       "targets": "$TARGETS",
       "timestamp": "$TIMESTAMP"
  4. You can send a test notification to verify your system can receive a test event from New Relic if you wish.

  5. Assign the notification channel to one or more alert policies in New Relic. You can create a new alert policy or add the notification to an existing alert policy.