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:
Click Data Config > Integrations.
Under INBOUND INTEGRATIONS, click Create your own integration.
Click ADD NEW INTEGRATION.
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.
In the API DESCRIPTION field, enter a description (optional) of the purpose for the API or other information relevant to your business needs.
Under DATA TYPE, select Events.
Click Save.
The custom API is now provisioned.
Note
Leave this 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:
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 > Integrations > 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
In New Relic, click Alerts & AI in the top menu.
In the left menu, click Notification channels.
Click New notification channel.
In the Select a channel type menu, click Webhook.
Enter a channel name.
Paste the endpoint URL you copied from Moogsoft into the BASE URL field in New Relic.
Under Custom Headers,click add custom headers.
Name: Content-Type
Value: application/json
Go to back to the Moogsoft tab and use the Copy button to copy the information under API KEY.
Go back to New Relic.
Under Custom Headers, click Add custom headers, add the following information:
Name: apiKey
Value: Paste your Moogsoft Enterprise API key.
Click Create Channel.
Click Send a test notification as this will help you complete the mapping tasks in the next section.
Click Policies located in the left side menu.
Under Policy, select the policy with the associated alert conditions to use with Moogsoft.
Click the Notification channels tab.
Click Add notification channels.
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:
Go back to your Moogsoft tab.
If you closed your tab, navigate to the Map your Data section of your integration:
Click Data Config > Integrations.
Click Create your own integration.
Click the custom integration that you created in the first part of this tutorial.
Click the received payload in Moogsoft to view the fields.
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
After mapping the fields listed above, click Map Values.
Map the following severity values:
Map Closed to Clear.
Map Open to Critical.
Click Add Mapping and then map Acknowledged to Critical.
Click Save.
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.
Map severity to a new tag called NewRelicSeverity.
Map targets[0].product to Class.
Map incident_url to a new tag called NewRelicURL.
Map incident_id to a new tag called NewRelicIncidentID.
Map placeholder text New Relic to Manager.
Create backup mappings for the Moogsoft Source and Service fields, in case the fields are blank:
Map placeholder text NewRelic to Source.
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
(new tag)
targets[0].product
Class
incident_url
NewRelicURL
(new tag)
incident_id
NewRelicIncidentID
(new tag)
New Relic
(placeholder)
Manager
NewRelic
(placeholder)
Source
NewRelic
(placeholder)
Service
Scroll down to the Set Your Deduplication Key section and then click TEST DEDUPLICATION KEY.
Click SAVE AND ENABLE.