LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Custom webhook integrations
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
    • Calling internal service endpoints in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page
  • How to configure New Relic with Cortex
  • Prerequisite
  • Configure the integration in Cortex
  • Configure the integration for multiple New Relic accounts​
  • How to connect Cortex entities to New Relic
  • Import entities from New Relic
  • Editing the entity descriptor
  • Expected Results
  • Scorecards and CQL
  • Still need help?​

Was this helpful?

Export as PDF
  1. Ingesting data into Cortex
  2. Integrations

New Relic

Last updated 1 month ago

Was this helpful?

is a performance tracking and analytics tool that helps engineers gain visibility into their software. By integrating New Relic with Cortex, you'll be able to drive deeper insights into:

  • Apdex

  • Dependencies

  • Embedded dashboards

  • Error rates

  • Live entities in your environment

  • OpenTelemetry

  • SLOs

  • Throughput

How to configure New Relic with Cortex

Prerequisite

Before getting started:

  • As a full platform user in New Relic, create a .

    • New Relic user keys are linked to the account they were created from, so if this account is ever deleted, the integration with Cortex will stop working.

Configure the integration in Cortex

    1. In Cortex, click your avatar in the lower left corner, then click Settings.

    2. Under "Integrations", click New Relic.

  1. Click Add configuration.

  2. Configure the New Relic integration form:

    • Account alias: Enter a name for this account.

    • Personal key: Enter the user key you generated in New Relic.

    • Use EU region: Optionally enable this toggle to use the EU region of New Relic.

  3. Click Save.

Once you save your configuration, you'll see it listed on the integration's settings page in Cortex. If you’ve set everything up correctly, you’ll see the option to Remove Integration in Settings.

You can also use the Test all configurations button to confirm that the configuration was successful. If your configuration is valid, you’ll see a banner that says “Configuration is valid. If you see issues, please see documentation or reach out to Cortex support.”

Cross-account access

The New Relic integration has multi-account support. You can add a configuration for each additional by repeating the process above.

Each configuration requires an alias, which Cortex uses to correlate the designated with registrations for various entities. Registrations can also use a default configuration without a listed alias. You can edit aliases and default configurations from the New Relic page in your Cortex settings. Select the edit icon next to a given configuration and toggle Set as default on. If you only have one configuration, it will automatically be set as the default.

How to connect Cortex entities to New Relic

Auto discovery

If your New Relic applications don’t cleanly match the Cortex entity tag or name, you can override this in the Cortex entity descriptor.

Dependencies

Cortex automatically maps dependencies between your services and resources by scanning for resources with specific New Relic tagKeys. By default, a service will have dependencies on any resource with New Relic tag key = "service" and tag value = the service's Cortex tag.

The mappings to New Relic entities can also be defined by application IDs in the entity descriptor YAML (for APM applications).

Import entities from New Relic

Editing the entity descriptor

APM services

New Relic application metrics can be fetched for each entity using application IDs or tags.

x-cortex-apm:
  newrelic:
    applications:
    - applicationId: 1234567
      alias: Default-App
    - applicationId: 8904321
      alias: Another-App
Field
Description
Required

applications

Specifies that the APM service should be found by application ID

✓

applicationID

ID for the application that the service belongs to

✓

alias

Alias for the configuration in Cortex (only needed if you have opted into multi-account support)

x-cortex-apm:
  newrelic:
    tags:
    - tag: tagKey
      value: tagValue
      alias: Default-App
Field
Description
Required

tags

Specifies that the APM service should be found by tag

✓

tag

Tag key for the APM service(s)

✓

value

Tag value for the APM service(s)

✓

alias

Alias for the configuration in Cortex (only needed if you have opted into multi-account support)

OpenTelemetry

x-cortex-apm:
  newrelic:
    tags:
    - tag: tagKey
      value: tagValue
      alias: Default-App
Field
Description
Required

tags

Specifies that the OpenTelemetry service should be found by tag

✓

tag

Tag key for the APM service(s)

✓

value

Tag value for the APM service(s)

✓

alias

Alias for the configuration in Cortex (only needed if you have opted into multi-account support)

Cortex fetches OpenTelemetry data every 5 minutes, but the data refresh may take longer depending on how much data you have.

Embeds

Cortex can also embed dashboards from New Relic.

x-cortex-dashboards:
  embeds:
    - type: newrelic
      url: https://chart-embed.service.newrelic.com/example/1a234bc5-d6e7-890f-g123-456h7ij8901 
Field
Description
Required

type

Specifies the source of the embed; in this case, should be newrelic

✓

url

URL for the dashboard

✓

SLOs

Fetched SLO information can be found in the Operations and Integrations sections of an entity page.

x-cortex-slos:
  newrelic:
    - id: MjU5ODYxOXxFWFR8U0VSVklDRV9MRVZFTHiw0TI5ODQ
      alias: my-default-alias
    - id: MjU5ODYxOXxFWFR8U0VSVklDRV9MRVZFTHiw0TI76QB
      alias: my-other-alias
    - id: MjU5ODYxOXxFWFRAB6VSVklDRV9MRVZFTHiw0TI76QD
Field
Description
Required

id

New Relic entity guid for the SLO or the associated service; if you use the GUID for a parent service, all SLOs associated with it will be imported into Cortex

true

alias

Alias for the configuration in Cortex (only needed if you have opted into multi-account support)

If the alias is not specified, like with the third ID above, Cortex will use the default configuration.

If you use the GUID for a parent service to define the SLOs for a given entity, Cortex will import all SLOs associated with that service.

Expected Results

Entity pages

More data is available under the Monitoring page in the entity's sidebar:

  • Throughput

  • Response time

  • Error rate

  • Apdex target

  • Apdex score

  • Host count

  • Instance count

  • Concurrent instance count

In the SLOs section, you'll be able to see a list of all SLOs tied to that entity, along with the target and current SLO score. The SLO name will display in green when passing and orange when failing.

New Relic dashboards must be defined individually for each entity.

Relationship graphs

Scorecards and CQL

With the New Relic integration, you can create Scorecard rules and write CQL queries based on New Relic performance metrics.

Application summary

This expression enables you to score entities on reliability metrics:

  • Apdex score

  • Apdex target

  • Concurrent stance count

  • Error rate

  • GUID

  • Host count

  • ID

  • Instance count

  • Name

  • Response time

  • Throughput

  • Type

If there is not an application ID set in the entity descriptor, a Scorecard rule based on this expression will fail.

Definition: newrelic.applications()

Example

You can use this expression in a Scorecard rule to make sure entities' Apdex score is at least 0.9:

newrelic.applications().all(application) => application.apdexScore >= 0.9
New Relic application is set

Check if entity has a New Relic application ID set in its entity descriptor.

This can be a good companion to other rules that will fail without a defined application ID, like newrelic.applications().

Definition: newrelic (==/!=) null

Example

You can use this expression in an onboarding Scorecard to make sure that entities have a New Relic application ID set:

newrelic != null
Raw NRQL query

Definition: newrelic.rawNrql(query: Text)

Examples

You can use this expression in a Scorecard measuring performance to make sure that the 95th percentile of latency has been less than 500ms in the last 3 weeks for a given entity:

jq(newrelic.rawNrql("SELECT percentile(duration) FROM PageView WHERE = '" + newrelic.applications().firstOrNull().name + "' SINCE 3 weeks ago COMPARE WITH 1 week AGO TIMESERIES AUTO"), "[.[].\"percentile.duration\".\"95\"] | add / length") < 500

Or you can use this expression in a CQL report to read the timeseries of the process.cpu.usage metric for the last 30 minutes using NRQL and a New Relic service GUID:

newrelic.rawNrql("SELECT latest(`process.cpu.usage`) FROM Metric WHERE `entity.guid` = '"+newrelic.applications().getOrNull(0)?.guid+"' SINCE 30 MINUTES AGO TIMESERIES")
SLOs

SLOs associated with the entity via ID or tags. You can use this data to check whether an entity has SLOs associated with it and if those SLOs are passing.

SLOs

  • History

  • ID

  • Name

  • Operation

  • Remaining budget

  • SLI value

  • SLO target

  • Source

  • Thresholds

SLO datum (timeseries data for the SLI)

  • Datum

  • Ts

Named threshold (SLOs thresholds like "warning" or "error" states)

  • Name

  • Threshold

Definition: slos

Examples

You can use SLO data from New Relic to evaluate entities in Scorecards. For an onboarding Scorecard, you can make sure that entities have at least 1 SLO defined:

slos().length > 0

For a project standards Scorecard, you can also use this expression to make sure entities are passing all of their SLOs:

slos().all((slo) => slo.passing) == true

OpenTelemetry metrics

Accessing OpenTelemetry data with CQL and NRQL

Definition: newrelic.applications().getOrNull(0)?.guid

Example

You can execute raw NRQL query to collect average http.server.requests in a CQL report:

newrelic.rawNrql("SELECT average(`http.server.requests`) FROM Metric WHERE `entity.guid` = '"+newrelic.applications().getOrNull(0)?.guid+"' SINCE 7 DAYS AGO")

The following options are available to get assistance from the Cortex Customer Engineering team:

  • Chat: Available in the Resource Center

  • Slack: Users with a connected Slack channel will have a workflow added to their account. From here, you can either @CortexTechnicalSupport or add a :ticket: reaction to a question in Slack, and the team will respond directly.

Don’t have a Slack channel? Talk with your Customer Success Manager.

In Cortex, navigate to the :

Account ID: Enter the that the user key was generated with.

After setting up the integration, you will be redirected to the where you can enable the cross-account access feature. If you have an account that supports subordinate accounts, you can enable this setting to fetch issues for all the accounts that are under the configured one.

Configure the integration for multiple New Relic accounts

By default, Cortex will use the (e.g. my-entity) or its name as the "best guess" for New Relic applications. For example, if your entity tag is my-entity, then the corresponding application in New Relic should also be my-entity. The name is not case-sensitive.

You can customize the tag key names on the in Cortex.

See the for instructions on importing entities.

Instructions to find your Application ID can be found in the . You can also find the Application ID in the URL in New Relic.

You can also find information on finding and managing entity tags in the .

services can be associated with the entity only using tags. For this type of service New Relic doesn't generate application ID.

SLO can be fetched for each entity using New Relic entity GUID for respective SLO or associated service. Detailed instructions how to obtain entity GUID can be found in .

When entities are tied to New Relic, SLO and monitoring information appear under the Monitoring section on the overview of the .

If you've defined in an entity's YAML, you'll be able to view the graphs from an entity's details page. Open the Dashboard page in the entity's sidebar. All dashboards defined in the descriptor will be embedded on this page.

detected from New Relic will appear in Relationship graphs.

See more examples in the in Cortex.

Fetch high-level for a given New Relic application.

Execute an arbitrary NRQL query and capture the .

This expression is not inherently tied to a single entity and requires a custom query to pull the specific data what you need. The raw JSON can be parsed using JQ or language.

OpenTelemetry metrics available in the can be accessed or manipulated for a given entity by combining CQL and native query.

In Cortex, you can access OpenTelemetry data by incorporating a raw NRQL query into this CQL expression with the associated .

Still need help?

Email: , or open a support ticket in the in app Resource Center

New Relic
New Relic user key
New Relic settings page
ID for the account
New Relic settings page
​
New Relic settings page
New Relic docs
New Relic docs
OpenTelemetry
New Relic docs
entity details page
CQL Explorer
summary data
raw JSON back out
Open Policy Agent
New Relic Metrics Exlorer
NRQL
New Relic GUID
​
help@cortex.io
Dependencies
dashboards
Create services documentation
entity tag