Newrelic Integration - EasyAlert

New Relic
Receive alerts from New Relic observability platform
Overview
Easyalert automatically detects and processes webhooks from New Relic Workflows.
ℹ️ Info: New Relic Workflows is the recommended method for new integrations. Classic Alerts is deprecated but still supported.
Requirements
- New Relic account (One platform)
- Easyalert account and active tenant
- Access to Alerts & AI → Workflows in New Relic
Setup Instructions
Step 1: Create Integration in Easyalert
- Go to Integrations page from left menu
- Click Add Integration button
- Select New Relic as Source Type
- Enter a name (e.g.,
New Relic Production) - Click Create to save
- Copy the generated Webhook URL
Example:
https://api.easyalert.io/api/v1/webhooks/ingest/wh_abc123...
Step 2: Create Workflow in New Relic
Go to Alerts & AI → Workflows → Add a workflow
Step 3: Create Webhook Destination
- In Notify section, select Webhook
- Click Create new destination
- Paste Easyalert Webhook URL as Endpoint URL
Step 4: Configure Payload Template
Use this recommended payload:
{
"id": {{ json issueId }},
"issueUrl": {{ json issuePageUrl }},
"title": {{ json annotations.title.[0] }},
"priority": {{ json priority }},
"impactedEntities": {{ json entitiesData.names }},
"totalIncidents": {{ json totalIncidents }},
"state": {{ json state }},
"trigger": {{ json triggerEvent }},
"sources": {{ json accumulations.source }},
"alertPolicyNames": {{ json accumulations.policyName }},
"alertConditionNames": {{ json accumulations.conditionName }},
"workflowName": {{ json workflowName }},
"description": {{ json annotations.description.[0] }},
"customer": "YOUR_CUSTOMER_NAME",
"team": "YOUR_TEAM_NAME",
"environment": "production"
}
NOTE: Handlebars syntax uses
{{ }}. The{{ json ... }}helper produces JSON-safe output.
Step 5: Test the Integration
Use the Send test notification feature in New Relic.
Handlebars Variables
New Relic Workflows use Handlebars syntax:
| Variable | Description |
|---|---|
{{ json issueId }} | Issue ID |
{{ json issuePageUrl }} | New Relic UI link |
{{ json annotations.title.[0] }} | Issue title |
{{ json annotations.description.[0] }} | Issue description |
{{ json state }} | ACTIVATED, CLOSED, CREATED, ACKNOWLEDGED |
{{ json priority }} | CRITICAL, HIGH, MEDIUM, LOW |
{{ json triggerEvent }} | STATE_CHANGE, INCIDENT_ADDED, etc. |
{{ json entitiesData.names }} | Impacted entities |
{{ json totalIncidents }} | Number of incidents |
{{ json accumulations.policyName }} | Policy names |
{{ json accumulations.conditionName }} | Condition names |
{{ json accumulations.source }} | Alert sources |
{{ json workflowName }} | Workflow name |
Field Mapping
| New Relic Field | Easyalert Field |
|---|---|
issueId / id | Event ID |
annotations.title[0] / title | Title |
annotations.description[0] / description | Description |
priority | Severity |
state | Status |
entitiesData.names / impactedEntities | Host/Service |
issuePageUrl / issueUrl | URL |
State and Severity Mapping
Status Mapping
| New Relic State | Easyalert Status |
|---|---|
ACTIVATED | Problem |
CREATED | Problem |
ACKNOWLEDGED | Problem (acknowledged) |
CLOSED | OK |
DEACTIVATED | OK |
Severity Mapping
| New Relic Priority | Easyalert Severity |
|---|---|
CRITICAL | Critical |
HIGH | Critical |
MEDIUM | Warning |
LOW | Info |
Trigger Events
| Trigger Event | Description |
|---|---|
STATE_CHANGE | Issue state changed |
INCIDENT_ADDED | New incident added to issue |
INCIDENT_CLOSED | Incident closed |
PRIORITY_CHANGED | Priority updated |
ACKNOWLEDGED | Issue acknowledged |
Custom Field → Tag Conversion
All custom fields you add to the template are automatically captured as tags.
Example
Template:
{
"id": "{{ json issueId }}",
"state": "{{ json state }}",
"customer": "AcmeCorp",
"datacenter": "EU-West"
}
In Easyalert:
tags.policy = "Production Policy"
tags.condition = "High CPU"
tags.customer = "AcmeCorp"
tags.datacenter = "EU-West"
Routing Examples
Escalation Routing:
tags.customer equals "AcmeCorp" → Acme Corp Policy
tags.environment equals "production" → Production Policy
tags.alertPolicyNames contains "Critical" → Critical Policy
Notification Rules:
tags.priority equals "CRITICAL" → call + sms + email
tags.sources contains "Infrastructure" → Infra Team channel
Workflow Filter Examples
Critical Issues Only
priority = 'CRITICAL'
Specific Policies
accumulations.policyName LIKE '%Production%'
Specific Entity Types
entitiesData.types = 'HOST'
Test
curl -X POST "YOUR_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{
"id": "NR1-123",
"title": "High CPU Usage",
"state": "ACTIVATED",
"trigger": "STATE_CHANGE",
"priority": "CRITICAL",
"impactedEntities": ["web-server-01"],
"alertPolicyNames": ["Production Policy"],
"alertConditionNames": ["High CPU"],
"createdAt": 1733234400000,
"customer": "TestCustomer"
}'
Recovery Test
curl -X POST "YOUR_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{
"id": "NR1-123",
"state": "CLOSED",
"trigger": "STATE_CHANGE"
}'
Classic Alerts Setup (Legacy)
For legacy New Relic alerts:
Create Notification Channel
- Go to Alerts → Notification channels
- Click New notification channel
- Select Webhook
Configure Webhook
- Channel name: Easyalert
- Base URL: Your Easyalert webhook URL
Add to Policies
- Go to your alert policy
- Add the webhook channel to notification settings
Classic Alerts Field Mapping
| New Relic Field | Easyalert Field |
|---|---|
incident_id | Event ID |
condition_name | Title |
details | Description |
severity | Severity |
current_state | Status |
targets[0].name | Host |
incident_url | URL |
Troubleshooting
Webhooks not being received
- Test destination from New Relic UI
- Verify workflow filter matches your issues
- Check workflow is enabled
- Verify destination URL is correct
Custom fields not becoming tags
- Verify field is added to webhook payload template
- Check field name spelling
- View webhook samples in Easyalert
Invalid JSON error
- Use
{{ json ... }}helper for proper formatting - Verify Handlebars template syntax
- Check field names match New Relic schema
- Test with simplified payload first
Issues not auto-resolving
- Verify CLOSED state triggers workflow
- Check
issueIdmatches between states - Ensure workflow sends on all state changes
Wrong priority mapping
- Check priority field in payload
- Configure custom severity mapping
- Verify priority is set on alert conditions
Best Practices
Use Workflows: Migrate to Workflows for better control and flexibility over Classic Alerts.
Include Entity Data: Add entitiesData.names to identify affected infrastructure or services.
Set Proper Priorities: Configure priority on your alert conditions for accurate severity mapping.
Add Custom Fields for Routing: Include customer, team, environment in payload for escalation routing.
Include Runbook URLs: Add runbook links in alert conditions for quick remediation access.
Use Tags: Leverage accumulations.tag.* for routing and filtering in Easyalert.