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

# New Relic

> Connect Rootly AI to New Relic — entities, NRQL queries, alerts, incidents, logs, and golden metrics — with a user API key.

## Overview

Connecting **New Relic** lets Rootly AI analyze New Relic data during investigations. Once connected, Rootly AI can look up entities, run NRQL queries, inspect alerts and incidents, tail logs, and read golden signals.

Authentication is a **user API key** (starts with `NRAK`).

***

## Before You Start

You'll need:

* **A New Relic user account** with permission to create user API keys.
* **A New Relic user API key** — create one at **API Keys → Create a key → User** in your New Relic account. The key starts with `NRAK`.
* **Your account's region** — US or EU. If you're not sure which one, check your login URL: `one.newrelic.com` = US, `one.eu.newrelic.com` = EU.

<Note>
  Rootly requires a **user** API key, not an ingest key or a license key. Ingest keys don't have the account-read permissions Rootly AI needs; only user keys do.
</Note>

***

## Connecting

Open **Configuration → AI → Connectors** and click **Connect** on the New Relic card.

<ParamField path="New Relic Region" type="US or EU" required>
  Match your New Relic account's hosting region:

  * **US / North America** — for accounts on `one.newrelic.com`.
  * **Europe** — for accounts on `one.eu.newrelic.com`.

  Selecting the wrong region will cause the connection to fail even with a valid API key.
</ParamField>

<ParamField path="User API Key" type="string" required>
  A New Relic user API key. Must start with `NRAK`.

  ```
  NRAK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  ```

  Create it from **API Keys → Create a key → User type** in your New Relic account.
</ParamField>

Click **Save**. Rootly verifies the key against the selected region. If it works, the card flips to **Connected**.

***

## What Rootly AI Can Read

Once connected, Rootly AI can query New Relic for:

* **Entities** — services, hosts, applications, and other New Relic entity types in your account.
* **NRQL queries** — Rootly AI can compose and run NRQL against your data (metrics, events, logs, spans).
* **Alerts and alert policies** — including current firing state and recent alert history.
* **Incidents** in New Relic — Rootly AI can correlate its own incident context with any incidents you have open in New Relic.
* **Logs** — search and inspect log lines matching a query.
* **Golden signals and performance metrics** — throughput, latency, error rate, saturation across your instrumented services.

Access is scoped by whatever the user API key can see. If your New Relic user has restricted account access, Rootly AI inherits those restrictions.

***

## Best Practices

* **Use a dedicated user API key for Rootly AI.** Don't reuse a personal key that's already in use elsewhere — it makes rotation, audit, and revocation harder. Name it something obvious like `rootly-ai` so it's easy to find in New Relic's API keys settings.
* **Consider a service user for the API key.** If your New Relic account supports service users, create one specifically for Rootly AI and issue the API key from that user. This decouples Rootly AI's access from any individual staff member's account.
* **Rotate on a cadence.** New Relic user API keys are long-lived by default. Rotate quarterly (or align with your team's existing rotation cadence). After rotating, paste the new key into Rootly's Configure screen and save.
* **Match the region carefully.** US and EU are separate New Relic environments — a US-region key won't authenticate against the EU endpoint and vice versa. Getting this wrong is the most common connection failure at setup time.
* **Test with `/rootly test`.** After connecting, declare a test incident and verify Rootly AI can query New Relic during the investigation.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Save fails with 'Enter a New Relic user API key to connect'" icon="key">
    The API key field is empty or the key you pasted doesn't start with `NRAK`. Only user API keys (prefix `NRAK`) are accepted — ingest keys (`NRII`) and license keys (`NRAL`) don't work. Create a new key of the User type from your New Relic account and retry.
  </Accordion>

  <Accordion title="Save fails with 'Choose the New Relic endpoint for your account region'" icon="globe">
    The region dropdown wasn't set. Confirm your New Relic account region by checking your login URL — `one.newrelic.com` (US) or `one.eu.newrelic.com` (EU) — and select the matching option.
  </Accordion>

  <Accordion title="Connection succeeds but Rootly AI can't see specific entities or accounts" icon="lock">
    New Relic account access permissions. The API key can only see what the underlying New Relic user has access to. If your user has restricted account visibility (common in large orgs with sub-accounts), Rootly AI inherits those restrictions. Grant broader access on the New Relic side, or create the API key from a user with the account-level access you need.
  </Accordion>

  <Accordion title="NRQL queries return errors from Rootly AI" icon="triangle-exclamation">
    Rootly AI composes NRQL based on the investigation context; occasionally the composed query has syntax issues or references data your account doesn't have. Check the specific error in the AI output — New Relic usually returns a helpful message. If the same query works when you run it manually in New Relic's query builder, contact support.
  </Accordion>

  <Accordion title="After rotating the API key, queries started failing" icon="rotate-right">
    The stored key is stale. Open the New Relic card's Configure screen, paste the new key, click Save.
  </Accordion>

  <Accordion title="Region setting was wrong; how do I fix it without losing the connection?" icon="shuffle">
    Open Configure on the New Relic card, change the region, re-paste the API key, and save.
  </Accordion>
</AccordionGroup>

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I connect multiple New Relic accounts?" icon="chart-column">
    One New Relic integration per Rootly team currently. If your New Relic setup uses sub-accounts, connect from a user with cross-account access rather than connecting each sub-account separately. Multi-account support is on the roadmap.
  </Accordion>

  <Accordion title="What's the difference between US and EU endpoints?" icon="globe">
    New Relic operates two separate environments for its two hosting regions. US-region accounts route to the US endpoint; EU-region accounts route to the EU endpoint. They share no data — pick the one that matches your account's hosting.
  </Accordion>

  <Accordion title="Does Rootly cache New Relic data?" icon="floppy-disk">
    No. Every query reads from New Relic fresh. NRQL results, entity lookups, alert state — all read at query time.
  </Accordion>

  <Accordion title="Can I audit what Rootly AI has queried in New Relic?" icon="file-lines">
    Yes. New Relic's audit logging tracks API activity per key. Filter by the API key ID (visible in New Relic's API Keys settings) to see the full call history.
  </Accordion>

  <Accordion title="Does the integration count against New Relic query quotas?" icon="gauge-high">
    Yes. Rootly AI's calls count as normal API activity against your New Relic account's plan quotas. Investigation-driven volume is typically low.
  </Accordion>
</AccordionGroup>

***

## Related Pages

<CardGroup cols={3}>
  <Card title="Connectors Overview" icon="sparkles" href="/ai/connectors/overview">
    The full list of Connectors and how they fit together.
  </Card>

  <Card title="Data Privacy for Rootly AI" icon="shield" href="/ai/data-privacy-for-rootly-ai">
    What Rootly AI sees, retention, and model-training controls.
  </Card>

  <Card title="New Relic docs" icon="up-right-from-square" href="https://docs.newrelic.com/">
    New Relic's own documentation for API key management and account access.
  </Card>
</CardGroup>
