# New Relic

## Overview

New Relic is a cloud-based observability platform built to help you create more perfect software. It includes three core components: **Full-Stack Observability, Applied Intelligence & Telemetry Data.**

&#x20;**Full-Stack Observability** lets you easily visualize, analyze, and troubleshoot your entire software stack in one connected experience. With rich analytics and a curated user experience, Full-Stack Observability surfaces the context your teams need to pinpoint and resolve problems within your infrastructure, applications, and end-user experience faster.

This integration is built for users who would like to interact with the data from New Relic's Full-Stack Observability component in their automation workflows.

## Use Cases

The integration between Fylamynt and New Relic lets you:

* Trigger a workflow in Fylamynt, when a specific New Relic Alert condition goes into the state of ALERT.
* Run New Relic NRQL Query to gather data from curated monitoring that span your entire estate, from applications and infrastructure to logs and serverless apps.

## Configure New Relic in Fylamynt

* Navigate to **Settings** > **Integrations** > **New Relic**
* Configure a new integration instance

Details needed to set up **New Relic instance** in **Fylamynt**:

<table data-header-hidden><thead><tr><th>Parameters</th><th width="365.3333333333333">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>Parameters</strong></td><td><strong>Description</strong></td><td><strong>Required</strong></td></tr><tr><td>New Relic Account Id</td><td>New Relic API key id</td><td>True</td></tr><tr><td>New Relic API Key</td><td>New Relic API key value</td><td>True</td></tr></tbody></table>

Follow the steps listed below in your **New Relic Account** and get the desired parameters to enter in **Fylamynt**

* Log in to your **New Relic** portal
* Navigate to settings
  * In the header top right corner, select the button ![](/files/LVDBSapNibzAJnvd5QNe)
  * ![](/files/1vyyLxF3txv6Ddirsszb)
* Click on **API keys**
* Click **Create a key**
  * Select your account
  * Leave User as the default Key type
  * Provide a name for the new API key
  * Optionally, add a note
  * ![](/files/Q0DA3x6omxAAIL7MN64Q)
  * Click **Create a key**
  * ![](/files/Oy9zInOIluA1ALSXgJPs)
* The newly created API Key should be listed on the API keys page
* Copy the `Account number` of your New Relic environment and paste it into the **New Relic Account ID** field in the Authorize Fylamynt card on the integration settings page.
* Click three dots next to the newly created API key
  * ![](/files/egkplvxD8v9JT9dfNCDP)
* Select **Copy Key** and paste it into the **New Relic API Key** field in the Authorize Fylamynt card on the integration settings page
* In the Authorize Fylamynt card on the integration settings page, select one of the **Webhook API Key Name** from the dropdown, and the corresponding **Webhook API Key Value** will be made visible.
  * If no options are available for the Webhook API Key Name, first go to **Settings --> Resources --> API Keys** to create a New API Key.
* To automatically trigger workflows, a new notification channel needs to be created
  * Navigate to **Alerts & AI ->ALERTS -> Channels**
  * Click **+ New notification channel**
  * Select **Webhook** as the Channel type
  * Enter Channel name
  * Copy the **New Relic Webhook URL** from Authorize Fylamynt card and paste it into **Base Url**
  * Click **+ custom headers**
  * Enter **x-api-key** as the custom header **name**
  * Copy the **Webhook API Key Value** from Authorize Fylamynt card on the integration settings page and paste as the custom header **value**
  * Click **Create Channel**
  * The notification channel can now be assigned to any Datadog alert policy to automatically trigger a workflow.
* Click `Authorize`

## Integration Actions <a href="#integration-actions" id="integration-actions"></a>

You can add these actions in the Fylamynt workflow builder, as part of your workflow.

1. [New Relic Alert Trigger](#new-relic-alert-trigger)
2. [New Relic NRQL Query](#new-relic-nrql-query)

### **New Relic** Alert Trigger

The integration node triggers the automatic execution of a workflow from a selected **New Relic Policy**.

When creating a workflow, you are presented with a wizard to select the trigger type to use.

* On the workflow page, select **New Workflow**
* Enter the name of the Workflow.
* Select the **New Relic** trigger type.
* Click **Create Workflow'**
* ![](/files/kZvRThKTQdzwbwPKwbom)

#### Configure the automatic execution of a workflow <a href="#fylamynt-task-management" id="fylamynt-task-management"></a>

To automatically run workflows with the New Relic Alert trigger, the incident type and assignment need to be configured. Follow the step-by-step instructions provided on the[ Incident Management - Automatic workflow execution](https://docs.fylamynt.com/getting-started-1/7.-incident-management-automatic-workflow-execution) page.

### **New Relic NRQL Query**

Use the action to run New Relic NRQL Query and retrieve data in Fylamynt

**Input**

| **Parameter Name** | **Description**                                       | **Required** |
| ------------------ | ----------------------------------------------------- | ------------ |
| alias              | AWS assume role alias                                 | False        |
| NRQL Query         | NRQL query to be run on the given 'New Relic' account | True         |
| s3\_bucket         | S3 bucket name where query and result would be stored | False        |

**Output**

| **Parameter Name**    | **Type** | **Description**                                               |
| --------------------- | -------- | ------------------------------------------------------------- |
| execution\_status     | String   | Status of run (ie: S\_OK / E\_FAIL)                           |
| result                | String   | Query result                                                  |
| is\_result\_truncated | Boolean  | Boolean value which denotes if the result is truncated or not |
| result\_bucket\_key   | String   | Name of the file where result is written                      |
| s3\_bucket            | String   | Name of the bucket                                            |

**Note:**

* AWS SSM automation has a restriction on the size of the response object (\~100 KB), so if the query has a result greater than this value then truncated result would be returned and if **S3 Bucket Name** is provided then the whole result would be written to the bucket and

**Action Example**

* Drag and drop the New Relic NRQL Query Action node onto the Workflow Editor Canvas
* Select the Action node&#x20;
* Enter the NRQL Query
* Optionally, select the AWS Target Account Alias and S3 bucket name for the query output.

![](/files/-Mkv1fMzLdeyOPC-jPx-)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fylamynt.com/integrations/new_relic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
