Synthetic monitors help you proactively check your applications, services, and endpoints to ensure they're working properly. You can automate the management of your synthetic monitors, private locations, secure credentials, and monitor downtimes using NerdGraph.
With the appropriate permissions and access, you can programmatically manage your entire synthetic monitoring setup through queries and mutations in NerdGraph. Alternatively, you can perform these operations via the New Relic UI.
Important
As of August 26, 2024, you can no longer create new monitors using legacy runtimes on public or private locations. On October 22, 2024, we will end of life the containerized private minion (CPM) and legacy synthetics runtime versions.
- For public locations, use the runtime upgrade UI to update your monitors to the newest runtimes.
- For private locations, please review our recommended migration steps to avoid monitor degradation.
Requirements
Requirements include:
- A New Relic account. You'll need your API user key from this account to authenticate mutations and queries.
- General NerdGraph requirements.
- Relevant user permissions: You need the same synthetic monitoring permissions for NerdGraph as you do for the synthetics UI.
Get started
To start using the NerdGraph API for synthetic monitoring:
- Go to the NerdGraph GraphQL Explorer
- Obtain your API user key for authentication
- Choose your monitor type or operation from the guides below
- Use the provided GraphQL mutations and queries to manage your synthetic monitoring infrastructure
Monitor types
New Relic provides several monitor types to suit different testing needs. Each monitor type has specific capabilities and use cases:
Browser-based monitors
Monitor Type | Description | Use Cases |
|---|---|---|
Simple availability checks that verify an endpoint is accessible | Basic uptime monitoring, health checks, API availability | |
Browser-based page load test without custom scripting | Website availability, page load performance, basic user experience | |
Custom JavaScript to simulate complex user interactions in a real browser | Login flows, multi-step user journeys, complex web application testing | |
Codeless, multi-step browser testing using predefined actions | Common workflows without scripting, click-through testing, form submissions |
API and certificate monitors
Monitor Type | Description | Use Cases |
|---|---|---|
Custom JavaScript to test APIs without a browser | REST API testing, GraphQL endpoints, backend service monitoring | |
Monitors SSL/TLS certificate validity and expiration | SSL certificate expiration alerts, security compliance | |
Crawls a website to identify broken links | Website health checks, SEO maintenance, link validation |
Supporting entities
In addition to monitors, you can manage supporting infrastructure and configuration:
- Private locations - Create monitoring locations behind your firewall for internal applications
- Secure credentials - Store sensitive information like passwords and API keys securely
- Monitor downtimes - Schedule maintenance windows when monitors should pause
Query operations
Use query operations to retrieve information about your synthetic monitoring setup:
- Query all monitors in your account
- Retrieve private location configurations
- List secure credentials (metadata only)
- View scheduled monitor downtimes
- Get monitor scripts and step configurations
- Map monitor IDs to entity GUIDs
- Check runtime upgrade status for legacy monitors
Related resources
- NerdGraph introduction - Learn about New Relic's GraphQL API
- NerdGraph Explorer - Interactive tool to build and test queries
- Synthetic monitoring documentation - Comprehensive guide to synthetic monitoring
- NerdGraph entities API - Additional query capabilities for synthetic entities