Introduction
Catchpoint's Test Data Webhook 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. 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
- Download the Cloud SDK installer.
- 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.
- 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. **
- Go to the project selector page
- Make sure that billing is enabled for your Google Cloud project.
- Enable the Cloud Functions and Cloud Pub/Sub APIs.
- Install and initialize the Cloud SDK.
- Update gcloud components:
$ gcloud components update
Clone the Repository to your local machine
- The attachment has all the required NodeJS scripts to deploy webhooks. Download the zip file from the attachment.
- Navigate to the directory where the files were copied locally and update newRelicApiKey under .env file
- To Find or register anInsert API keyfor your New Relic account:
Go to**one.newrelic.com>account dropdown> Account settings > API keys**, and selectInsights API keys.
Deploying cloud functions.
Index.js has two functions called catchpointPublish and catchpointSubscribe.
- Open Google Cloud SDK Shell and navigate to the directory where the NodeJS scripts were extracted.
cd <path to extracted directory/Integrations.NewRelic/> - Deploy publish function:
$ gcloud functions deploy catchpointNewRelicPublish --trigger-http --runtime nodejs10 --timeout=180 --trigger-http --allow-unauthenticated - Copy the URL once the deployment is successful. This will be a webhook URL that will be added to the Catchpoint portal.

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

Catchpoint Setup:
Add the copied URL to Catchpoint.
- In catchpoint, from Settings go to API page.
- Under Test Data Webhook add the copied URL.
- 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 and click on Dashboards on the top navigation menu.
- Select the Create a dashboard button located at the top-right corner of the dashboards index.
- Name your dashboard. Select the account the dashboard belongs to. Choose carefully because this action cannot be modified.
- Press Create to continue.
- From the data explorer and query builder features. Use the + Add to your dashboard button and select the Add a chart option.
- In the Add widget window, select Data Type as Metrics.
- Input catchpoint in the View a chart with text box.

All the Catchpoint specific metrics will have identifiers in the following format:catchpoint_Connectcatchpoint_Dnscatchpoint_Load
Alternatively, we can use NRQL to draw charts by adding multiple metrics.
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

