---
title: New Relic
slug: new-relic
docTags: 
createdAt: 2022-07-01T05:23:49.000Z
---

# Purpose

Echoes can connect to your New Relic account and monitor your incidents lifecycle in order to produce some metrics such as the [Mean time to recovery](docId\:lGfIZtDECxM2tQ2KurlIp).

# Installation

New Relic integration is done through the [integrations settings](https://app.echoeshq.com/admin/integrations). The installation will guide you into generating a [User API key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#user-key).&#x20;

Make sure to select the appropriate region.

::Image[]{src="https://api.archbee.com/api/optimize/cnN9HGi_h1eJLSFAvJkF4/9dSK-y1ileVjmwIGBC3K6_screenshot-2022-12-10-at-183111.png" size="60" width="1202" height="1204" caption="New Relic connection" position="center" showCaption="true"}

Once the connection is made you will be invited to select the New Relic Account on which to install Echoes

::Image[]{src="https://api.archbee.com/api/optimize/cnN9HGi_h1eJLSFAvJkF4/6xh5AYyWnE8CdmwnXRogr_screenshot-2022-12-10-at-162638.png" size="60" width="1372" height="602" caption="New Relic account selection " position="center" showCaption="true"}

Echoes will then install a [Destination](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/destinations/) (Webhook) on the selected New Relic account.

# Setting up your New Relic Workflow

The next step is to setup a [New Relic Workflow](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/learn-alerts/alerts-concepts-workflow/) in order to send incidents' events to Echoes through the Destination previously set during the installation.

The destination to be selected is `Echoes webhook`&#x20;

![](https://api.archbee.com/api/optimize/cnN9HGi_h1eJLSFAvJkF4/hdLRxuxHrLa2459RSZx9s_workflow.png "New Relic Workflow configuration")

# Requirements on the message template

The only requirement expected from Echoes is that the [message template](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/message-templates/) includes the `issueId` i.e

```json
{
    "id": {{ json issueId }}
}
```

## Reference an Echoes team as owner of a Service

A service may represent an application, a component, to open incidents against.

In order to associate a Service suffering an incident to a team in Echoes, the property `serviceOwnerTeamId` is to be set in the notification payload.

```json
{
    "id": {{ json issueId }},
    "serviceOwnerTeamId": "cbdf76fc-3015-4c66-a5f8-143a48734e48"
}
```

The team ID value itself could be held by a specific tag. When setting up the New Relic Workflow this tag could then be referenced in the template to be loaded dynamically when constructing the notification payload.

### How to get the correct team ID from Echoes?

The team IDs can be found by using our [Teams API](https://echoeshq.stoplight.io/docs/public-api/y2guczxftfojc-teams).

