Prerequisites
- New Relic account
- A User key (starts with
NRAK-) — not a License key. This is the most common setup mistake: License keys authenticate agents that send data to New Relic, not the NerdGraph API that OpenSRE reads from. A License key will fail verification. - Your account ID
Setup
Option 1: Interactive CLI
opensre onboard and select New Relic in the Observability group. You will be prompted for the API key, account ID, and API URL.
Option 2: Environment variables
Add to your.env:
Both
NEW_RELIC_API_KEY and NEW_RELIC_ACCOUNT_ID must be set — either one alone leaves the integration unconfigured.
For multiple New Relic accounts, use multi-instance with NEW_RELIC_INSTANCES.
Option 3: Persistent store
Creating a User key
- In New Relic, go to your user menu → API keys
- Click Create a key
- Set the key type to User key (not License key)
- Copy the key — it starts with
NRAK-
Finding your account ID
Your account ID is shown in New Relic under Administration → Account settings, and also appears in the URL when you’re viewing an account-scoped page (.../accounts/<account_id>/...).
Verify
/integrations verify new_relic or /verify new_relic.
Alerts require an existing alert condition
New Relic alert data becomes available only after at least one configured alert condition has fired. If your account has no alert policies and conditions yet, OpenSRE will correctly return zero incidents — that’s not a misconfiguration, there’s simply nothing to read yet. Set up an alert condition in New Relic first if you want alert investigations to return data.Troubleshooting
Security best practices
- This integration is read-only: OpenSRE only ever runs NerdGraph
queryoperations against your account, never amutation. - Store the User key in
.envor your secret manager — not in source control.