New Relic
Navi.sh receives New Relic alert policy webhook notifications. Incidents auto-resolve when New Relic sends a close event.
Endpoint: POST /api/v1/events/newrelic/{token}
Setup in New Relic
- 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:
https://api.navi.sh/api/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)
Payload fields
| Field | Type | Description |
|---|---|---|
policy_name | string | Name of the alert policy. |
condition_name | string | Name of the alert condition (used as incident title). |
details | string | Human-readable incident description. |
runbook_url | string | Runbook URL for this alert. |
severity | string | CRITICAL, WARNING, or INFO. |
timestamp | integer | Unix epoch in milliseconds. |
incident_url | string | Direct link to the incident in New Relic. |
condition_id | integer | Alert condition ID. |
condition_metric | string | Metric name that triggered the condition. |
account_id | integer | New Relic account ID. |
current_state | string | open, acknowledged, or closed. |
event_type | string | INCIDENT_OPEN or INCIDENT_CLOSE. |
incident_id | integer | Numeric incident ID. |
targets | array | Affected entities (see below). |
Target object
| Field | Type | Description |
|---|---|---|
id | string | Entity ID. |
name | string | Entity name (used as hostname). |
labels | object | Entity labels (e.g. host, env). |
link | string | Link to the entity in New Relic. |
Severity mapping
| New Relic | Navi.sh |
|---|---|
CRITICAL | critical |
WARNING | warning |
INFO | info |
Example payload
json
{
"policy_name": "Production Alerts",
"condition_name": "High Error Rate",
"details": "Error rate exceeded 5% threshold",
"runbook_url": "https://wiki.example.com/runbooks/high-error-rate",
"severity": "CRITICAL",
"timestamp": 1705312200000,
"incident_url": "https://alerts.newrelic.com/accounts/123/incidents/456",
"condition_id": 789,
"condition_metric": "error_rate",
"account_id": 123456,
"current_state": "open",
"event_type": "INCIDENT_OPEN",
"incident_id": 456,
"targets": [
{
"id": "service-api",
"name": "api-service",
"labels": {
"host": "api-01.prod",
"env": "production"
},
"link": "https://rpm.newrelic.com/accounts/123/applications/789"
}
]
}Response
202 Accepted — the payload was queued for processing.