New Relic Integration Guide
New Relic is an all-in-one web application performance tool that measures efficiency and offers real-user monitoring for the entire IT infrastructure. Integrate AlertOps’ alert management platform with New Relic to receive and respond to critical alerts through email, SMS, push notification, and phone alerts. AlertOps ensures that alerts received from New Relic always reach the correct, available team member by utilizing escalation policies and on-call schedules.
AlertOps Configuration
From the main menu, click on Integrations and then select Inbound Integrations from the sub menu.
Select API tab
Select the 'ADD API INTEGRATION' button.
You should now be on the API Integration Detail page. Select NewRelic from the pre-built Integration Templates.
Enter a name for the integration. Select an escalation rule to determine the integration's escalation policy. And, enter the names of recipient group(s) and recipient user(s). Click 'SAVE.' Then, click 'COPY URL' to copy the URL endpoint to be used in the New Relic configuration.
New Relic Configuration
If you dont see the 'Alerts (Classic)' options in your New Relic environment, instructions are provided (scroll down)
Step 1: Create a webhook in New Relic. Webhook can be created under 'Alerts and AI' > 'Channels' > 'New Notification Channel'
Step 2: Select 'New Notification Channel' > Select type as 'Webhook'. Add the following parameters.
Paste the following payload,
{
"account_id": "$ACCOUNT_ID",
"account_name": "$ACCOUNT_NAME",
"closed_violations_count_critical": "$CLOSED_VIOLATIONS_COUNT_CRITICAL",
"closed_violations_count_warning": "$CLOSED_VIOLATIONS_COUNT_WARNING",
"condition_description": "$DESCRIPTION",
"condition_family_id": "$CONDITION_FAMILY_ID",
"condition_name": "$CONDITION_NAME",
"current_state": "$EVENT_STATE",
"details": "$EVENT_DETAILS",
"duration": "$DURATION",
"event_type": "$EVENT_TYPE",
"incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL",
"incident_id": "$INCIDENT_ID",
"incident_url": "$INCIDENT_URL",
"metadata": "$METADATA",
"open_violations_count_critical": "$OPEN_VIOLATIONS_COUNT_CRITICAL",
"open_violations_count_warning": "$OPEN_VIOLATIONS_COUNT_WARNING",
"owner": "$EVENT_OWNER",
"policy_name": "$POLICY_NAME",
"policy_url": "$POLICY_URL",
"runbook_url": "$RUNBOOK_URL",
"severity": "$SEVERITY",
"targets": "$TARGETS",
"timestamp": "$TIMESTAMP",
"timestamp_utc_string": "$TIMESTAMP_UTC_STRING",
"violation_callback_url": "$VIOLATION_CALLBACK_URL",
"violation_chart_url": "$VIOLATION_CHART_URL"
}
Save Changes.
Step 3: You need to attach the notification channel to whatever policy that you create for the alert. Select 'Alert Policies' tab next to 'Channel Details'. Add policies there as per your requirements for alerting.
Once you add the alert condition, under 'Notification Settings', make sure the AlertOps Webhook is added and associated with the policy.
If you don't have the Alerts (Classic) menu,
Go to the 'Alerts and AI' tab. In the left menu, under 'Enrich and Notify', select 'Destinations'.
Under 'Add a destination' select 'Webhook'
Give the webhook a name, and under Endpoint URL, select the AlertOps Inbound Integration Endpoint URL. Add the Destination.
Now click on 'Workflows' in the left menu, under Enrich and Notify. Create a new workflow for your alert/trigger conditions/queries. Under Notify, select Webhook.
Select the destination which you just created. Payload can be default and the AlertOps Inbound Integration can be customized as needed.
Update message, and save the workflow.
Alert Triggering Information
AlertOps will automatically create an incident when a new alert is received from New Relic with an IncidentStatus status of “open.”
If an alert with status “open” matches an existing Open Alert, AlertOps will recognize the new alert as a duplicate and ignore the alert. The alert will be recorded in the Inbound Messages table as “Mapped Appended.”
AlertOps will automatically close the same incident when an alert with an IncidentStatus status “closed” is received.
Testing and Troubleshooting
Click here to read about Web API Testing and Troubleshooting.