Skip to content

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

  1. In the Navi.sh dashboard, go to Integrations → New Relic and copy your integration URL.
  2. In New Relic, go to Alerts → Notification channels.
  3. Click New notification channel and choose Webhook.
  4. 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>).
  5. Leave the payload format as the New Relic default.
  6. Click Create channel.
  7. Assign the channel to your Alert policies.

Auto-resolve

Incidents auto-resolve when New Relic sends a notification with:

  • current_state: "closed", or
  • event_type: "INCIDENT_CLOSE"

Navi.sh correlates trigger and close events using (in order of preference):

  1. incident_idnr-incident-<id>
  2. condition_idnr-condition-<id> (fallback)

Severity mapping

New RelicNavi.sh
CRITICALcritical
WARNINGwarning
INFOinfo

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

FieldTypeDescription
account_idintegerNew Relic account ID. (example: 123456)
condition_idintegerNumeric ID of the alert condition. (example: 789012)
condition_metricstringMetric name that triggered the condition. (example: cpu_percent)
condition_namestringName of the alert condition. Used as incident title. (example: High CPU Usage)
current_statestring (open, acknowledged, closed)Current incident state. (example: open)
detailsstringHuman-readable incident description. (example: CPU utilization exceeded 90% for 5 minutes)
event_typestring (INCIDENT_OPEN, INCIDENT_CLOSE)Lifecycle event type. INCIDENT_CLOSE triggers auto-resolve. (example: INCIDENT_OPEN)
incident_idintegerNumeric incident ID. (example: 456789)
incident_urlstringDirect link to the incident in New Relic. (example: https://alerts.newrelic.com/accounts/123/incidents/456)
issue_idstringNew Relic issue ID used by workflow notification payloads. (example: abc123)
policy_namestringName of the alert policy. (example: Production Alerts)
runbook_urlstringRunbook URL for this alert. (example: https://wiki.example.com/runbooks/high-cpu)
severitystring (CRITICAL, WARNING, INFO)Severity level. (example: CRITICAL)
targetsarray of NewRelicTargetEntities affected by this incident.
timestampintegerUnix epoch timestamp in milliseconds. (example: 1.7053122e+12)

targets fields:

FieldTypeDescription
idstringEntity identifier. (example: web-01)
labelsobject<string, string>Key-value metadata labels attached to the entity.
linkstringDirect link to the entity in New Relic. (example: https://one.newrelic.com/infra/hosts/web-01)
namestringEntity 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

Built by the Navi.sh team.