New Relic
Navi.sh receives New Relic alert policy webhook notifications. Incidents auto-resolve when New Relic sends a close event.
POST
/v1/events/newrelic/{token}Setup in New Relic
- In the Navi.sh dashboard, go to Integrations → New Relic and copy your integration URL.
- In New Relic, go to Alerts → Notification channels.
- Click New notification channel and choose Webhook.
- Set:
- Channel name:
navi-sh(or any name) - Base URL: the integration URL you copied above (format:
https://api.navi.sh/v1/events/newrelic/<token>).
- Channel name:
- Leave the payload format as the New Relic default.
- Click Create channel.
- Assign the channel to your Alert policies.
Auto-resolve
Incidents auto-resolve when New Relic sends a notification with:
current_state: "closed", orevent_type: "INCIDENT_CLOSE"
Navi.sh correlates trigger and close events using (in order of preference):
incident_id—nr-incident-<id>condition_id—nr-condition-<id>(fallback)
Severity mapping
| New Relic | Navi.sh |
|---|---|
CRITICAL | critical |
WARNING | warning |
INFO | info |
POST /v1/events/newrelic/{token}
Accepts New Relic alert policy webhook notifications. Add this URL as a Webhook notification channel in your New Relic alert policy.
Incidents auto-resolve when current_state is "closed" or event_type is "INCIDENT_CLOSE". Deduplicates by issue_id, incident_id, or condition_id (in that order).
The token is generated in your navi.sh workspace under Integrations.
Payload schema
| Field | Type | Description |
|---|---|---|
account_id | integer | New Relic account ID. (example: 123456) |
condition_id | integer | Numeric ID of the alert condition. (example: 789012) |
condition_metric | string | Metric name that triggered the condition. (example: cpu_percent) |
condition_name | string | Name of the alert condition. Used as incident title. (example: High CPU Usage) |
current_state | string (open, acknowledged, closed) | Current incident state. (example: open) |
details | string | Human-readable incident description. (example: CPU utilization exceeded 90% for 5 minutes) |
event_type | string (INCIDENT_OPEN, INCIDENT_CLOSE) | Lifecycle event type. INCIDENT_CLOSE triggers auto-resolve. (example: INCIDENT_OPEN) |
incident_id | integer | Numeric incident ID. (example: 456789) |
incident_url | string | Direct link to the incident in New Relic. (example: https://alerts.newrelic.com/accounts/123/incidents/456) |
issue_id | string | New Relic issue ID used by workflow notification payloads. (example: abc123) |
policy_name | string | Name of the alert policy. (example: Production Alerts) |
runbook_url | string | Runbook URL for this alert. (example: https://wiki.example.com/runbooks/high-cpu) |
severity | string (CRITICAL, WARNING, INFO) | Severity level. (example: CRITICAL) |
targets | array of NewRelicTarget | Entities affected by this incident. |
timestamp | integer | Unix epoch timestamp in milliseconds. (example: 1.7053122e+12) |
targets fields:
| Field | Type | Description |
|---|---|---|
id | string | Entity identifier. (example: web-01) |
labels | object<string, string> | Key-value metadata labels attached to the entity. |
link | string | Direct link to the entity in New Relic. (example: https://one.newrelic.com/infra/hosts/web-01) |
name | string | Entity display name. (example: web-01.us-east-1) |
Examples
Incident Opened
json
{
"account_id": 123456,
"condition_id": 789,
"condition_name": "High Error Rate",
"current_state": "open",
"details": "Error rate exceeded 5% threshold",
"event_type": "INCIDENT_OPEN",
"incident_id": 456,
"incident_url": "https://alerts.newrelic.com/accounts/123/incidents/456",
"policy_name": "Production Alerts",
"severity": "CRITICAL",
"targets": [
{
"id": "service-api",
"labels": {
"host": "api-01.prod"
},
"name": "api-service"
}
],
"timestamp": 1705312200000
}Response codes
- 202 — Accepted — processing is asynchronous
- 400 — Invalid request body (malformed JSON or wrong content type)
- 401 — Invalid service token
- 500 — Unexpected server error