---
title: "New Relic Integrations"
slug: "new-relic-integrations"
updated: 2024-01-12T22:06:06Z
published: 2024-01-12T22:06:06Z
canonical: "docs.catchpoint.com/new-relic-integrations"
---

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

# New Relic Integrations

## **Introduction**

Catchpoint's Test Data [Webhook](https://docs.catchpoint.com/docs/) feature allows Catchpoint to easily integrate with other tools with its push mechanism. This feature pushes test performance metrics on every run if it's enabled.

This Integration uses Catchpoint Test Data Webhook to send data to the New Relic Platform, this is accomplished by using New Relic's Metrics [API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api). To complete this integration, we will rely on a third-party Google Cloud function to accept the data from Catchpoint API, process it in the desired format, and then push it to New Relic. With this integration, we are enabling the DevOps team to visualize Catchpoint's digital experience data with New Relic's Application Performance Monitoring (APM) data together.

#### **Supported Tests with Respective Metrics:**

**Web Test**: Timing metrics like Total, Connect, DNS, ContentLoad, Document complete.

**Transaction Test**: Timing metrics like Total, Connect, DNS, ContentLoad, Document complete.

**API Test**: Timing metrics like Total, Connect, DNS, ContentLoad.

**Traceroute Test**: Packet loss, Round trip time, number of hops.

**Ping Test**: Packet Loss, Round Trip Time.

**DNS Test**: Response times.

## **Prerequisites**

- Google Cloud project
- New Relic Account

## **Installation Configuration**

### Google cloud Setup:

#### **Install cloud SDK on your local machine**

1. Download the [Cloud SDK installer.](https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe)
2. Launch the installer and follow the prompts. The installer is signed     by Google LLC. Cloud SDK requires Python. Supported versions are 3.5 to 3.7, and 2.7.9 or higher. The installer will install all  necessary dependencies, including the needed Python version.
3. After the installation has completed, accept the following options:
  - Start Cloud SDK Shell
  - Run **gcloud init**

**Note -** The installer starts a terminal window and runs the **gcloud init** command.

#### **Enabling cloud functions. **

1. Go to the project selector page
2. Make sure that billing is enabled for your Google Cloud project.
3. Enable the [Cloud Functions and Cloud Pub/Sub APIs](https://console.cloud.google.com/flows/enableapi?apiid=cloudfunctions,cloudbuild.googleapis.com&amp;redirect=https://cloud.google.com/functions/quickstart&amp;_ga=2.149915382.1340593021.1604309030-1239070748.1603877604).
4. Install and initialize the Cloud SDK.
5. Update gcloud components:  

$ gcloud components update

#### **Clone the Repository to your local machine**

1. The attachment has all the required NodeJS scripts to deploy webhooks. Download the zip file from the attachment.
2. Navigate to the directory where the files were copied locally and     update newRelicApiKey under .env file
3. To Find or register an[Insert API key](https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/send-custom-events-event-api#register)for your New Relic account:  

Go to**[one.newrelic.com](https://one.newrelic.com/)>[account dropdown](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/get-started/glossary#account-dropdown)>     Account settings > API keys**, and select**Insights API keys**.

#### **Deploying cloud functions.**

Index.js has two functions called `catchpointPublish` and `catchpointSubscribe`.

1. Open Google Cloud SDK Shell and navigate to the directory where the NodeJS scripts were extracted.  

`cd &lt;path to extracted directory/Integrations.NewRelic/&gt;`
2. Deploy publish function:  

`$ gcloud functions deploy catchpointNewRelicPublish --trigger-http --runtime nodejs10 --timeout=180 --trigger-http --allow-unauthenticated`
3. Copy the URL once the deployment is successful. This will be a webhook URL that will be added to the Catchpoint portal.  

![cloud_sdk_publish.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360075050292-cloud_sdk_publish.png)
4. Deploy Subscribe function  

`$ gcloud functions deploy catchpointNewRelicSubscribe --trigger-topic catchpoint-webhook --timeout=180 --runtime nodejs10 --allow-unauthenticated`  

![cloud_sdk_subscribe.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360075279411-cloud_sdk_subscribe.png)

#### **Catchpoint Setup:**

Add the copied URL to Catchpoint.

1. In catchpoint, from **Settings** go to [API page.](https://portal.catchpoint.com/ui/Content/Administration/ApiDetail.aspx)
2. Under Test Data Webhook add the copied URL.
3. Select default **JSON** for Test-data webhook and save the changes.

**Note:** Test data webhook should be enabled under the test properties page.

## **Results**

To create dashboards, go to [one.newrelic.com](https://one.newrelic.com/) and click on Dashboards on the top navigation menu.

1. Select the **Create a dashboard** button located at the top-right     corner of the dashboards index.
2. Name your dashboard. Select the account the dashboard belongs to.     Choose carefully because **this action cannot be modified.**
3. Press **Create** to continue.
4. From the [data explorer](https://docs.newrelic.com/docs/query-your-data/explore-query-data/data-explorer/introduction-data-explorer) and [query builder](https://docs.newrelic.com/docs/query-your-data/explore-query-data/query-builder/introduction-query-builder) features. Use the     **+ Add to your dashboard** button and select the Add a chart     option.
5. In the Add widget window, select **Data Type** as **Metrics**.
6. Input **catchpoint** in the **View a chart with** text box.  

![metrics_explorer.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360075050412-metrics_explorer.png)  

All the Catchpoint specific metrics will have identifiers in the following format:       `catchpoint_Connect`       `catchpoint_Dns`       `catchpoint_Load`

Alternatively, we can use NRQL to draw charts by adding multiple metrics. ![nrql.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360075049932-nrql.png) For example, below is a simple NRQL example:

```
SELECT latest(catchpoint_Client),latest(catchpoint_Connect),latest(catchpoint_ContentLoad),latest(catchpoint_Dns),latest(catchpoint_DocumentComplete) FROM Metric WHERE testId= 1216003 TIMESERIES FACET `testId` LIMIT 10 SINCE 1800 seconds ago

SELECT latest(catchpoint_RoundTripTimeAvg), latest(catchpoint_PacketLossPct), latest(catchpoint_TotalHops) FROM Metric
```

![Fig: New Relic Dashboard 1](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360075278931-dashbaord1.png) ![Fig: New Relic Dashboard 2](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360075278951-dashbaord2.png)

[NewRelicWebhook.zip](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/NewRelicWebhook.zip)
