Skip to content

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

  1. In New Relic, go to Alerts → Notification channels.
  2. Click New notification channel and choose Webhook.
  3. Set:
    • Channel name: navi-sh (or any name)
    • Base URL: https://api.navi.sh/api/v1/events/newrelic/<token>
  4. Leave the payload format as the New Relic default.
  5. Click Create channel.
  6. 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)

Payload fields

FieldTypeDescription
policy_namestringName of the alert policy.
condition_namestringName of the alert condition (used as incident title).
detailsstringHuman-readable incident description.
runbook_urlstringRunbook URL for this alert.
severitystringCRITICAL, WARNING, or INFO.
timestampintegerUnix epoch in milliseconds.
incident_urlstringDirect link to the incident in New Relic.
condition_idintegerAlert condition ID.
condition_metricstringMetric name that triggered the condition.
account_idintegerNew Relic account ID.
current_statestringopen, acknowledged, or closed.
event_typestringINCIDENT_OPEN or INCIDENT_CLOSE.
incident_idintegerNumeric incident ID.
targetsarrayAffected entities (see below).

Target object

FieldTypeDescription
idstringEntity ID.
namestringEntity name (used as hostname).
labelsobjectEntity labels (e.g. host, env).
linkstringLink to the entity in New Relic.

Severity mapping

New RelicNavi.sh
CRITICALcritical
WARNINGwarning
INFOinfo

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.

Built by the Navi.sh team.