Introduction
Google Cloud Monitoring provides visibility into the performance, uptime, and overall health of applications. It collects metrics, events, and metadata from Google Cloud, Amazon Web Services, hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch, and many others. Operations ingests that data and generates insights via dashboards, charts, and alerts. Cloud Monitoring alerting helps you collaborate by integrating with Slack, PagerDuty, and more. In this documentation, we will be ingesting data from Catchpoint into Cloud Monitoring. Learn more about Google Cloud Monitoring here.
This integration allows sending data from the following test types, and supported metrics are listed as well.
- Web Test: Timing metrics such as Total, Connect, Dns, ContentLoad, Document complete.
- Transaction Test: Timing metrics such as Total, Connect, Dns, ContentLoad, Document complete.
- API Test: Timing metrics such as Total, Connect, Dns, ContentLoad.
- Trace route Test: Packet loss, Round trip time, number of hops.
- Ping Test: Packet Loss, Round Trip Time.
- DNS Test: Response times.
Prerequisites
- Google Cloud Project
Installation & Configuration
Google cloud Setup: Enabling the Monitoring API
- Create GCP Project (or use existing)
- Enable the following APIs
- Cloud Run
- Cloud Build
- Cloud Logging
- Cloud Monitoring
- Install and initialize gcloud CLI:
gcloud init
Install cloud SDK on your local machine
- Clone the attached code locally
- Build & push container:
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/catchpoint-cloudrun - Deploy to Cloud Run:
gcloud run deploy catchpoint-endpoint \
--image gcr.io/YOUR_PROJECT_ID/catchpoint-cloudrun \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--set-env-vars GCP_PROJECT_ID=YOUR_PROJECT_ID
OR for secure access:
--no-allow-unauthenticated - Note the URL (e.g.
https://catchpoint-endpoint-XYZ.run.app) -> whatever is generated
Optional: Secure the Endpoint
Option A: IAM-based Access
- Remove
--allow-unauthenticated - Grant invoker role:
gcloud run services add-iam-policy-binding catchpoint-endpoint \
--member="serviceAccount:YOUR_SVC@customer-project.iam.gserviceaccount.com" \
--role="roles/run.invoker"
Option B: Header Token Auth (custom logic)
- Add header check in code:
const token = req.headers['x-catchpoint-token'];
if (token !== process.env.AUTH_TOKEN) return res.status(403).send('Forbidden'); - In Catchpoint, add:
"x-catchpoint-token": "YOUR_SECRET"
Catchpoint Setup:
- In Integrations, Add URL > Test Data Webhook, use default JSON, and mention the Service URL which was generated for ingestion.
- In Product Properties:
- Enable Test Data Webhook and select the Integration that was added above.
- In the inheriting Test Properties:
- Enable Test Data Webhook.
Results
Metrics Collected
- custom/catchpoint_dns
- custom/catchpoint_connect
- custom/catchpoint_wait
- custom/catchpoint_load
- custom/catchpoint_ssl
- custom/catchpoint_test_time
- custom/catchpoint_fcp, lcp, cls, speed_index
- custom/catchpoint_error_count, failures
- custom/catchpoint_bytes
Labels Included
- test_name, test_id, city, node, asn, isp, test_type
- If applicable: step_name, step_number
Visualize in Metrics Explorer
- Go to Cloud Monitoring →** Metrics Explorer**
- Filter by** custom.googleapis.com/catchpoint_***
- Group by any label: step_name, test_name, etc.
{height="" width=""}
