New Relic
Receive New Relic issue notifications in Plural
A New Relic webhook delivers issue notifications from a New Relic workflow into Plural. Each notification is one alert, keyed by the New Relic issue ID, so later notifications for the same issue update it.
An alert does not start a job by itself. A job starts only when a webhook trigger on a workbench matches the alert, and only when the issue starts firing: the first activated notification for an issue, or one that follows a resolved notification. Later notifications for an issue that is still active do not start another job, and an issue starts at most one job per workbench per hour.
What Plural reads from the payload
Plural reads the fields of the workflow's default webhook payload:
{
"id": "d1b1f3fd-995a-4066-88ab-8ce4f6960654",
"issueUrl": "https://radar-api.service.newrelic.com/accounts/1/issues/0ea2df1c-...",
"title": "Memory Used % > 90 for at least 2 minutes on 'checkout'",
"priority": "CRITICAL",
"state": "ACTIVATED",
"alertConditionNames": ["Memory high"],
"plural": "plrl_project: payments, plrl_cluster: prod-us-east, plrl_service: checkout"
}ididentifies the alert. Keep the issue ID here: notifications without anidall update one shared alert.statesets the state.ACTIVATEDis firing andRESOLVEDis resolved. Plural does not store a notification with any other state, including New Relic'sCREATEDandCLOSED. See Send closed issues as resolved.titlebecomes the alert title, andissueUrlthe link back to New Relic.prioritysets the severity:CRITICALis critical, and every other priority is medium.titleandalertConditionNamesbecome the alert summary. Without condition names, Plural usesmessage.
Associate alerts with Plural resources
Plural keeps an alert only when it belongs to a Plural project, cluster, or service, or when a workbench trigger matches it. Otherwise the notification is acknowledged and ignored.
Plural searches the whole payload for plrl_project: <name>, plrl_cluster: <handle>, and plrl_service: <name>. The service is looked up on that cluster. Each value ends at the next comma or whitespace, so put all three in one string field, such as the plural field above, in that order with a comma after each value but the last. A value right before a closing quote, other than plrl_service, includes the quote and does not match.
If nothing resolves, Plural looks for markers in the title and summary: Plural Project: <name>, Plural Cluster: <handle>, and Plural Service: <name>, or the forms plrl-project-<name>, plrl-cluster-<handle>, and plrl-service-<name>. A service marker also needs the cluster.
A workbench trigger matches against the alert title and summary, not the raw payload. When several triggers on the webhook match, the one with the highest priority wins.
Authentication
Plural checks the HTTP Basic auth password against the webhook secret. The username can be any value. A bearer token or a custom header carrying the secret is not accepted, and requests without the right Basic auth password are rejected with 403.
Limitations
- Closed issues are dropped unless you map them. New Relic sends
CLOSEDwhen an issue closes, and Plural only resolves onRESOLVED. Without the mapping below, the alert stays firing in Plural. - Two severities. Only
CRITICALis kept as critical.HIGH,MEDIUM, andLOWall become medium. - Basic auth only. Choose Basic Authentication on the destination.
Set up the webhook
Create the webhook in Plural
- In the Plural Console, open Settings → Webhooks settings and click Create webhook. You can also create one while adding a webhook trigger to a workbench.
- Set Type of webhook to
Observabilityand Provider type toNew Relic. - Enter a Name and enter or generate a Secret. Names are unique: creating a webhook with the name of an existing observability webhook updates that webhook.
- Optionally grant users or groups Read permissions and Write permissions on the webhook.
- Click Create and copy the Webhook URL.
Create a webhook destination in New Relic
- In New Relic, open Alerts → Destinations and select Webhook.
- Enter a Webhook name and set Endpoint URL to the Plural webhook URL.
- Under Use authorization, choose Basic Authentication, with any non-empty user name and the Plural secret as the password.
- Save the destination.
Send notifications from a workflow
- Open Alerts → Workflows and edit a workflow, or add a new one. Filter it to the issues Plural should see, for example by policy or tag.
- Add a Webhook notification that uses the destination you created.
- Edit the payload as described below.
- Notify on at least Activated and Closed.
- Send a test notification, then save the workflow.
Send closed issues as resolved
In the workflow's webhook payload, replace the state line so a closed issue arrives as RESOLVED, and add the association field:
"state": {{#eq state "CLOSED"}}"RESOLVED"{{else}}{{json state}}{{/eq}},
"plural": "plrl_project: payments, plrl_cluster: prod-us-east, plrl_service: checkout",Check the Preview to confirm the rendered payload is valid JSON.
Troubleshooting
- 403 Forbidden: the destination does not use Basic Authentication, or the password does not match the Plural secret.
{"ignored": true}: the issue has no project, cluster, or service association and no trigger matched it, orstateis neitherACTIVATEDnorRESOLVED.- Alert never resolves: the payload still sends
CLOSED. Map it toRESOLVED. - Cluster or project not associated: a
plrl_*value ran into a closing quote. Add a comma after it, or move it beforeplrl_service.