# New Relic Workflow Integration

With [New Relic](https://newrelic.com/)’s integration in ilert, alerts from application or infrastructure monitoring – like error rates, transaction slowdowns, or deployment impacts – are sent to on-call teams via ilert. Automated routes and escalation policies help teams detect issues and respond before they affect service quality.

## In ilert: Create a New Relic alert source

1. Go to **Alert sources** --> **Alert sources** and click on **Create new alert source**

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FjX0cS4q7woTXKajZmc1W%2FScreenshot%202023-08-28%20at%2010.21.10.png?alt=media&#x26;token=8ef3666b-84eb-4b51-abee-f07303313941" alt=""><figcaption></figcaption></figure>
2. Search for **New Relic** in the search field, click on the New Relic tile and click on **Next**.&#x20;

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FlXzQlJpaTFSR49AZk0xA%2FScreenshot%202023-08-28%20at%2010.24.23.png?alt=media&#x26;token=cffeacb4-57b9-47d4-827d-b0f6b1afd914" alt=""><figcaption></figcaption></figure>
3. Give your alert source a name, optionally assign teams and click **Next**.
4. Select an **escalation policy** by creating a new one or assigning an existing one.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FNnuZqONaIhbOf6fn4OkZ%2FScreenshot%202023-08-28%20at%2011.37.47.png?alt=media&#x26;token=8a74f7b5-5bd2-4eea-97fa-1c1dbb041333" alt=""><figcaption></figcaption></figure>
5. Select you [Alert grouping](https://docs.ilert.com/alerting/configure-alerting/alert-sources#alert-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.&#x20;

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FueugN4JgHn1c90ggFA6u%2FScreenshot%202023-08-28%20at%2011.38.24.png?alt=media&#x26;token=b8009daf-3ca8-4264-a6fa-e42ef7333205" alt=""><figcaption></figcaption></figure>
6. The next page show additional settings such as customer alert templates or notification prioritiy. Click on **Finish setup** for now.
7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fi3TIOBvNYBQfDtNpmm0A%2FScreenshot%202023-08-28%20at%2011.47.34.png?alt=media&#x26;token=6cae965a-e448-4443-8c20-37cf501c43b2" alt=""><figcaption></figcaption></figure>

## In New Relic: Add ilert as a Destination

1. In the sidebar, go to **Alerts & AI** -> **Destinations** -> **Webhook**

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FrzuV6NlHYnSjojumUZ39%2FNR-1.png?alt=media&#x26;token=b7c7f613-e89b-47d7-8162-77941454ca19" alt=""><figcaption></figcaption></figure>

2. Enter a **Webhook name** and in the field **Endpoint URL** insert the Webhook URL generated in ilert.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F9Y4loRHUWzYarnANzkpB%2FNR-2-1.png?alt=media&#x26;token=6778c72f-0679-43d0-a8d4-e4858868c6a8" alt=""><figcaption></figcaption></figure>

3. On the sidebar go to **Alert conditions (Policies)**

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F5FS6QmGEDpaKcWmcEkqP%2FNR-4-1.png?alt=media&#x26;token=dcdd9178-484f-49b5-a864-9fcfc4a82a97" alt=""><figcaption></figcaption></figure>

4. Click on the **New alert policy** button.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FN8P1w2qp7noS6TbmpbLd%2FNR-5.png?alt=media&#x26;token=ed32f887-8c75-4bbb-9dfd-c30dfc3c3add" alt=""><figcaption></figcaption></figure>

5. Enter an **Alert policy name** and click on the **Set up notifications** button

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F2X34ekLAdEyR1pBHscLm%2FNR-6.png?alt=media&#x26;token=a4374707-5d1f-4636-b3ca-158be8efaba7" alt=""><figcaption></figcaption></figure>

6. On the next step click on **Webhook**

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FuoIlXZheOkbniUFOriLa%2FNR-7.png?alt=media&#x26;token=ec1e9960-2dee-4af2-9892-de0ccd9e5c3a" alt=""><figcaption></figcaption></figure>

7. Enter a channel name and choose the previous created destination in the **Destination** field.&#x20;

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FhCh2NHjanOTARgFTWmsF%2FNR-13.png?alt=media&#x26;token=f3044cbb-fd42-4acc-ac56-c10f48e46f51" alt=""><figcaption></figcaption></figure>

8. To test this channel, we need to change the values of both keys: `state` and `trigger` to "ACTIVATED" and "STATE\_CHANGED". This prevents the testing of an already closed alert. Click on **Send test notification**. After testing, click on **Revert changes** and save the message.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FvnQJ3uWHpGLd5lLzALy7%2FNR-14.png?alt=media&#x26;token=5e45f67f-806f-4953-aa99-55a330ea85c2" alt=""><figcaption></figcaption></figure>

9. On the next page click on **Activate workflow**, to save and activate the workflow.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fga52KOV7dmDUuUxvOsWw%2FNR-15.png?alt=media&#x26;token=7183f6f1-a78c-40fd-9671-361aba96df33" alt=""><figcaption></figcaption></figure>

## FAQ

**Will alerts in ilert be resolved automatically?**

Yes, as soon as an issue has been closed in New Relic, the associated alert in ilert will be resolved automatically.

**Will alerts in ilert be accepted automatically?**

Yes, as soon as an issue has been acknowledged, the associated alert in ilert will be accepted automatically.

**Can I use customised tags for my alerts?**

Yes, customised tags will appear in the alert details tab.
