New Relic Integration

You can configure the New Relic webhook to post notifications to a custom integration in Moogsoft when events of interest occur.

Before You Begin

This integration was validated with New Relic One, 2020. 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 create a webhook in New Relic.

  • New Relic can make requests to external endpoints over port 443. This is the default.

Create a custom integration in Moogsoft

To create a new customer integration in Moogsoft, do the following:

  1. Log in to Moogsoft.

  2. Click Data Config > Integrations.

  3. Click Create your own integration.

  4. Click ADD NEW INTEGRATION.

  5. Enter the following:

    1. MOOGSOFT ENDPOINT: NewRelic

    2. API DESCRIPTION: Custom New Relic API

  6. Select the Events option.

  7. Click SAVE.

The custom API is now provisioned.

Note

Leave this Moogsoft browser tab open as you will use it later on in the procedure.

Configure New Relic to send data to Moogsoft

If you do not already have an alert policy and condition to use with Moogsoft configured in New Relic, create them now. Refer to the New Relic documentation if you need help with this step.

Set up a webhook in New Relic

To send data from New Relic to Moogsoft, complete the following:

  1. Return to the Moogsoft browser tab and copy the API link under MOOGSOFT ENDPOINT, displayed in the NewRelic custom API screen.

  2. In New Relic, click Alerts & AI in the top menu.

  3. In the left menu, click Notification channels.

  4. Click New notification channel.

  5. In the Select a channel type menu, click Webhook.

  6. Enter a channel name.

  7. Paste the endpoint URL you copied from Moogsoft into the BASE URL field in New Relic.

  8. Under Custom Headers,click add custom headers.

    1. Name: Content-Type

    2. Value: application/json

  9. Go to back to the Moogsoft tab and use the Copy button to copy the information under API KEY.

  10. Go back to New Relic.

  11. Under Custom Headers, click Add custom headers, add the following information:

    1. Name: apiKey

    2. Value: Paste API KEY you copied from Moogsoft

  12. Click Create Channel.

  13. Click Send a test notification as this will help you complete the mapping tasks in the next section.

  14. Click Policies located in the left side menu.

  15. Under Policy, select the policy with the associated alert conditions to use with Moogsoft.

  16. Click the Notification channels tab.

  17. Click Add notification channels.

  18. Click Webhook, select appropriate webhook, and then click Update policy.

Note

Leave the New Relic browser tab open as you will need it later on in the procedure.

Map New Relic data to Moogsoft event fields

To map New Relic data to event fields in Moogsoft, do the following:

  1. Go back to your Moogsoft tab.

    If you closed your tab, navigate to the Map your Data section of your integration:

    1. Click Data Config > Integrations.

    2. Click Create your own integration.

    3. Click the custom integration that you created in the first part of this tutorial.

  2. Click the received payload in Moogsoft to view the fields.

  3. Scroll down to Map Your Data and map the source fields from New Relic to target fields relevant in Moogsoft.

    The mappings for Source, Description, Service, Check and Severity in the following image should work for most cases, but you may prefer to map the fields according to your own business needs.

    New Relic Source Fields

    Moogsoft Target Fields

    targets[0].name

    Source

    details

    Description

    targets[0].labels

    Service

    condition_name

    Check

    current_state

    Severity

  4. After mapping the fields listed above, click Map Values.

  5. Map the following severity values:

    1. Map Closed to Clear.

    2. Map Open to Critical.

    3. Click Add Mapping and then map Acknowledged to Critical.

  6. Click Save.

  7. Complete the mappings between New Relic and Moogsoft.

    Click ADD A MAPPING to create each field mapping. Use ADD TAG to create the target when the corresponding field does not already exist in Moogsoft.

    1. Map severity to a new tag called NewRelicSeverity.

    2. Map targets[0].product to Class.

    3. Map incident_url to a new tag called NewRelicURL.

    4. Map incident_id to a new tag called NewRelicIncidentID.

    5. Map placeholder text New Relic to Manager.

  8. Create backup mappings for the Moogsoft Source and Service fields, in case the fields are blank:

    1. Map placeholder text NewRelic to Source.

    2. Map placeholder text NewRelic to Service.

    This step completes your mappings, summarized in the following table:

    New Relic Source Fields

    Moogsoft Target Fields

    targets[0].name

    Source

    details

    Description

    targets[0].labels

    Service

    condition_name

    Check

    current_state

    Severity

    severity

    NewRelicSeverity

    targets[0].product

    Class

    incident_url

    <New Relic alerts URL displays>

    incident_id

    NewRelicIncidentID

    New Relic

    Manager

    New Relic

    Source

    New Relic

    Service

  9. Scroll down to the Set Your Deduplication Key section and then click TEST DEDUPLICATION KEY.

  10. Click SAVE AND ENABLE.