New Relic
Flow Designer has a New Relic Incidents trigger and built-in New Relic steps to help you integrate New Relic into your alert management and incident response flows.
New Relic Steps
The following steps are available:
-
Acknowledge or Close Incident: automatically acknowledge or close an existing incident in New Relic.
In the example above, the flow creates an alert and initiates an xMatters incident when a signal from New Relic comes into xMatters. When a user acknowledges the notification, the New Relic incident is updated, and when the incident's status to changed to Resolved in xMatters, the New Relic incident is closed.
To add a New Relic step to your flow:
- Go to the Apps tab of the palette, expand New Relic section, and drag the Acknowledge or Close Incident step onto the canvas.
- For instructions on using the New Relic trigger, see New Relic Incidents trigger.
- Connect the step to the previous step in the flow. This gives you access to the alert properties and outputs of previous steps when you configure this step's inputs.
- Double-click the step to edit it, and use the Setup tab to configure the inputs. You can use plain text and input variables (or both). See the following section for detailed information on the inputs, including which are required.
- On the Endpoint tab, configure the step to point to your New Relic instance.
- You can select a pre-existing endpoint or create a new endpoint.
- To set up an endpoint with an Authentication Type of None, add one of the following URLs in the Base URL field:
- New Relic North America data region: https://api.newrelic.com/v2
- New Relic EU data region: https://api.eu.newrelic.com/v2
Using the Acknowledge or Close Incident step does not resolve the incident in New Relic; you may continue to receive notifications until the incident is resolved.
Acknowledge or Close Incident
Use the Acknowledge or Close Incident step to automatically acknowledge or close an existing incident in New Relic. Map outputs from previous steps to the inputs to complete the incident details. The updated New Relic payload contains incident IDs in the incidentId array, and you'll need to extract a single value from the array to identify the New Relic Incident ID you want to update. Alternatively, you can enter the incident ID using text or a different variable that contains a single ID.
Inputs
Inputs with an asterisk* are required.
Label |
Description |
---|---|
API Key* |
New Relic user key to authenticate the request. This user is also recorded as acknowledging or closing the incident. |
New Relic Incident ID* | ID of the New Relic incident to update. |
Action* |
The action to perform on the New Relic incident. Available values are:
|
Outputs
This step has no outputs.
New Relic Incidents trigger
Flow Designer includes a built-in New Relic Incidents trigger that initiates a flow when it receives a signal from a New Relic webhook. You can configure the webhook to send the request when your configured conditions are met.
This version of the New Relic trigger lets you access additional New Relic functionality. If you want to take advantage of the new functionality but have the previous version of the trigger in your flows, you'll need to modify some steps in your flow. See Update the workflow for a list of changes and the steps you'll need to update.
Add the trigger to the canvas
- Go to the Triggers tab in the palette, expand the App Triggers section, and drag the New Relic Incidents trigger onto the canvas.
- Double-click the trigger (or click the pencil icon).
- Set the authenticating user, and then copy the URL and Configuration Payload — you'll use these to set up the webhook in New Relic. Alternatively, you can create an integration user to use as the authenticating user.
- Click the Flood Control tab to edit the trigger's default flood control settings. For more information about these settings, see Trigger Flood Control.
- Click Done.
- On the flow canvas, connect the steps you want to run when xMatters receives a request to that URL.
You're now ready to configure New Relic to target the trigger.
Configure New Relic to send requests to the trigger URL
To have New Relic send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL.
- In New Relic, go to Alerts and AI > Workflows and click Add a workflow.
- On the Configure your workflow page, fill in the following fields:
- Name: Give the workflow a unique name.
- Filter data: Set at least one filter parameter using the Tag, Policy, and Priority drop-down menus.
- In the Notify section, select Webhook.
- On the Edit notification message screen go to the Destination drop-down menu. Select an existing destination or create a new one.
- If you select an existing destination, skip to Step 7.
- If you need to create a new destination go to Step 5.
- To create a new destination, fill in the following fields on the Add a destination screen:
- Webhook name: Give the webhook a unique name.
- Endpoint URL: Paste the URL you copied from the xMatters trigger. Add the target names of any recipients you want to notify when the alert fires to the end of the URL.
- For URL authentication, use an ampersand to attach recipients. For example, if you want to notify Emma Pearson and the on-call members in the group responsible for the Antares service, you'd add &recipients=epearson,antares to the URL.
- For other authentication types, use a question mark to attach recipients. For example, if you want to notify Barry Gull and the on-call members in the group responsible for the Cassiopeia service, you'd add ?recipients=bgull,cassiopeia to the URL.
- You must URL-encode any special characters or spaces in the target names.
- Click Save destination.
- On the Edit notification message screen, go to Payload. In the Template section, enter the payload you copied from the trigger in xMatters.
- Optional: Click Send test notification to send a test alert and confirm the configuration is correct.
- Click Save message.
You're ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
Outputs
The trigger has the following outputs you can use as inputs to steps further along the flow.
Label |
Description |
---|---|
Recipients |
List of targeted recipients. Recipients are set by adding a recipients query parameter to the trigger URL when you configure the webhook in New Relic. See the instructions for configuring the webhook for details. |
Signal Mode | Determines the path the flow will take, based on the value of Current State parameter. |
Signal ID | Key or identifier used to terminate or correlate signals. |
Account ID | Unique ID of the New Relic account. |
Condition Name | Name of the conditions that triggered the alert policy in New Relic. |
Created At | Timestamp of when the New Relic alert was created. |
Current State |
Current state of the alert in New Relic. Valid values are:
|
Correlation |
Whether the alert correlates to other New Relic alerts. Valid values are:
|
Duration | How long the issue has been active. |
Impaced Entity | Entity or entities impacted by the alert. |
Incident ID | Unique ID of the incident in New Relic. |
Issue URL | Direct link to the issue that triggered the alert. |
Policy Name | Name of the policies that triggered the alert. |
Policy URL | Direct link to the policies that triggered the alert. |
Severity | Priority of the alert in New Relic. |
Source | Source of the alert in New Relic. |
Title | Title of the alert as provided by New Relic. |
Trigger | Type of notification that triggered the New Relic alert. |
Updated At | Timestamp of when the alert was last updated in New Relic. |
Workflow Name | Name of the New Relic workflow that triggered the alert. |
Raw Request | JSON representation of the request. You can parse the raw request if you need additional details beyond the standard outputs. |