New Relic Integrations

Prev Next

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

  1. Download the Cloud SDK installer.
  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.
  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 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.

  1. Open Google Cloud SDK Shell and navigate to the directory where the NodeJS scripts were extracted.
    cd <path to extracted directory/Integrations.NewRelic/>
  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
  4. Deploy Subscribe function
    $ gcloud functions deploy catchpointNewRelicSubscribe --trigger-topic catchpoint-webhook --timeout=180 --runtime nodejs10 --allow-unauthenticated
    cloud_sdk_subscribe.png

Catchpoint Setup:

Add the copied URL to Catchpoint.

  1. In catchpoint, from Settings go to API page.
  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 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 and 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
    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 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
Fig: New Relic Dashboard 2

NewRelicWebhook.zip