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.

  • You have created an API key and have access to a copy of it.

Configure the integration in Moogsoft

To configure the integration:

  1. Click Data Config > Ingestion Services.

  2. Under Ingestion Services, click Create your own integration.

  3. Click ADD NEW INTEGRATION.

  4. In the MOOGSOFT ENDPOINT field, provide a unique integration name.

    You can give it the same name as the target application or customize the name according to your business needs.

  5. In the API DESCRIPTION field, enter a description (optional) of the purpose for the API or other information relevant to your business needs.

  6. Under DATA TYPE, select Events.

  7. Click Save.

The custom API is now provisioned.

Note

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

Note

See Create your own integration for additional help.

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 Moogsoft URL displayed in the NewRelic custom API screen.

    The endpoint displays in Moogsoft under Data Config > Ingestion Services > Create Your Own Integration > <Your Integration> > Configuration Information after you save your integration

    Example:

    https://api.dev.moogsoft.cloud/express/v1/integrations/custom/c3bd518e28e0/your_application

    final_cyoi_url.jpg
  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 your Moogsoft Enterprise API key.

  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 > Ingestion Services.

    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 Default Value text New Relic to Manager.

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

    1. Map Default Value text NewRelic to Source.

    2. Map Default Value 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

    (new tag)

    targets[0].product

    Class

    incident_url

    NewRelicURL

    (new tag)

    incident_id

    NewRelicIncidentID

    (new tag)

    New Relic

    (Default Value)

    Manager

    NewRelic

    (Default Value)

    Source

    NewRelic

    (Default Value)

    Service

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

  10. Click SAVE AND ENABLE.