> ## 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 AI Connector

> Connect Rootly AI to New Relic — entities, NRQL queries, alerts, incidents, logs, and golden metrics — with OAuth or 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.

OAuth is the recommended authentication method. A New Relic user API key (starts with `NRAK`) is available as a fallback.

***

## Before You Start

You'll need:

* **A New Relic user account** with access to every account and entity Rootly AI should investigate.
* **An Organization Manager** who can review Feature Control Manager settings.
* **New Relic MCP Server** activated in Feature Control Manager.
* **Local Clients** activated for OAuth connections.
* **API keys** activated only if you use the API-key fallback.
* **Your account's region** — US, Europe, or Japan.
* **For the API-key fallback:** a New Relic user API key created from **API Keys → Create a key → User**. The key starts with `NRAK`.

To open Feature Control Manager, select your user name in the lower-left corner of New Relic, then select **Plan Management → Feature Control**. See New Relic's [Feature control manager documentation](https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-user-management/feature-control-manager/) for access requirements and activation steps.

<Note>
  Rootly uses New Relic's hosted MCP server and exposes a curated read-only tool set. OAuth does not require you to create or paste an API key. If you use the fallback, Rootly requires a **user** API key, not an ingest key or a license key.
</Note>

***

## Connecting

Open **AI SRE → Atlas → Connectors** (**AI & Agents → Connectors** if your sidebar doesn't have an **AI SRE** item) and click **Connect** on the New Relic card. Enter a distinct **Connection name** for this account before authorizing or supplying a user API key.

<ParamField path="New Relic Region" type="US, Europe, or Japan" 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`.
  * **Japan** — for accounts on `one.jp.newrelic.com`.

  New Relic's [data center guide](https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/choose-your-data-center/) lists the same login hosts and regional availability.

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

<Steps>
  <Step title="Connect With OAuth (Recommended)">
    Click **Connect with OAuth**. Rootly opens a popup for New Relic authorization. Sign in if prompted and approve Rootly. Keep the Rootly page open while authorization completes.

    If no popup opens, allow popups for your Rootly domain and try again.
  </Step>

  <Step title="Or Use a User API Key">
    Expand **Use a user API key instead**, paste a New Relic user key that starts with `NRAK`, and click **Connect with API key**.

    ```text theme={null}
    NRAK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ```

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

  <Step title="Confirm the Connection">
    Rootly exchanges the OAuth grant or validates the API key, confirms the hosted MCP server exposes the required read tools, and then marks the card **Connected**. A failed reconnect leaves the previous working connection unchanged.
  </Step>
</Steps>

Rootly only replaces an existing New Relic connection after the new authorization and MCP tool probe both succeed.

***

## 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 to the New Relic user who authorizes OAuth or owns the fallback API key. If that user has restricted account access, Rootly AI inherits those restrictions.

## During an Incident

*"New Relic flagged a golden-metric SLO breach at 2:12pm. Here's the slowest trace in the window."*

Rootly AI pulls New Relic's entity data, NRQL query results, and alert history correlated with the incident. When a golden metric breaches or an alert fires in the incident's window, Rootly AI surfaces the exact query and trace in the investigation output.

***

## Best Practices

* **Prefer OAuth.** It avoids distributing a long-lived New Relic user key and supports token refresh through New Relic's authorization flow.
* **If you use the fallback, 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 fallback API keys 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, open the New Relic card, expand **Use a user API key instead**, paste the replacement key, and click **Connect with API key**. OAuth connections use New Relic's token refresh flow instead of manual key rotation.
* **Match the region carefully.** US, Europe, and Japan use separate hosted MCP endpoints. Authorization for one region will not connect to another.
* **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="The OAuth popup does not open" icon="arrow-up-right-from-square">
    Allow popups for your Rootly domain, then click **Connect with OAuth** again. Rootly keeps one popup active at a time; clicking again while it is open focuses the existing authorization window.
  </Accordion>

  <Accordion title="New Relic denies the OAuth connection" icon="triangle-exclamation">
    Ask a New Relic Organization Manager to confirm **New Relic MCP Server** and **Local Clients** are active in Feature Control Manager. Then reconnect and authorize Rootly again. A canceled authorization does not replace your existing connection.
  </Accordion>

  <Accordion title="Connect with API key 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="Connection fails with 'Choose the New Relic endpoint for your account region'" icon="globe">
    The region wasn't set. Check the host you use to open New Relic—`one.newrelic.com` for US, `one.eu.newrelic.com` for Europe, or `one.jp.newrelic.com` for Japan—and select the matching option.
  </Accordion>

  <Accordion title="Connection succeeds but Rootly AI can't see specific entities or accounts" icon="lock">
    Rootly AI can only see what the New Relic user who authorized OAuth or owns the fallback API key can access. If that user has restricted account visibility (common in large organizations with sub-accounts), Rootly AI inherits those restrictions. Grant broader access on the New Relic side, reconnect OAuth as a user with the required access, or create the fallback API key from that user.
  </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, reconnect with OAuth, or paste the replacement user key and click **Connect with API key**.
  </Accordion>

  <Accordion title="Region setting was wrong; how do I fix it without losing the connection?" icon="shuffle">
    Open the New Relic card, choose the correct region, and reconnect with OAuth or re-enter the API key. Rootly preserves the working connection until the replacement succeeds.
  </Accordion>
</AccordionGroup>

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I connect multiple New Relic accounts?" icon="chart-column">
    Yes. Add a separate New Relic connection for each account or region you need, and give each a distinct **Connection name** so investigations can select the right one. Each connection uses its own authorization and regional endpoint.
  </Accordion>

  <Accordion title="What's the difference between the regional endpoints?" icon="globe">
    New Relic operates separate hosted MCP endpoints for US, Europe, and Japan. Pick the region that hosts your account; the endpoints do not share account data.
  </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 records the authorized user's or API key's activity. Filter by the identity used for the Rootly connection.
  </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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.