> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# New Relic

> Run NRQL queries and inspect entities and issues via the New Relic NerdGraph API

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key from `NEW_RELIC_API_KEY` is sent as the `API-Key` header.
* **Docs**: [https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable            | Required | Description                                                                                                                                        |
| ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NEW_RELIC_API_KEY` | Yes      | New Relic user API key (starts with NRAK-), sent as the API-Key header [Docs](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/). |

## Setup

1. **Sign up for New Relic**: Free accounts at [https://newrelic.com](https://newrelic.com) include full API access. Note your account ID from the account picker or the URL - NRQL and issue tools need it.
2. **Create a user API key**: Go to [https://one.newrelic.com/api-keys](https://one.newrelic.com/api-keys) and create a key of type 'User' (it starts with NRAK-). User keys are required for NerdGraph.
3. **Set the environment variable**: Add the key to your .env as NEW\_RELIC\_API\_KEY=NRAK-...
4. **Verify access**: Run Search Entities with a query like "domain = 'APM'", or Run NRQL Query with your account ID.

* All tools are GraphQL calls to [https://api.newrelic.com/graphql](https://api.newrelic.com/graphql) with the key in the 'API-Key' header
* EU-region accounts use api.eu.newrelic.com; these tools target the US endpoint
* NRQL and issue tools take your numeric account ID as a parameter - find it under Administration → Access management → Accounts

Provider API reference: [https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/)

## Tools

| Tool            | Access | Description                                                                                   |
| --------------- | ------ | --------------------------------------------------------------------------------------------- |
| Run NRQL Query  | Read   | Run an NRQL query against a New Relic account and return the results                          |
| Search Entities | Read   | Search monitored entities (apps, hosts, services) with an entity search query                 |
| Get Entity      | Read   | Get an entity's details and tags by GUID                                                      |
| List Issues     | Read   | List alert issues from the last day in an account (queries the NrAiIssue event type via NRQL) |

## Example prompts

* Run a New Relic NRQL query for the transaction error rate in the last hour and summarize the result.
* List the open New Relic issues in my account ordered by priority.
