New Relic allows you use NerdGraph to create simple browser monitors. Simple browser monitors perform automated browser-based checks of your web applications, simulating real user interactions by loading pages in a full browser environment. This tutorial provides examples of how to use the NerdGraph API to automate the creation of simple browser monitors.
Create a simple browser monitor
You can create a simple browser monitor using the syntheticsCreateSimpleBrowserMonitor mutation.
Input parameters
Parameter | Data Type | Is it Required? | Description |
|---|---|---|---|
| Integer | Yes | Your New Relic account ID where the monitor will be created. |
| Array | Yes | Browser(s) that the monitor will use to execute jobs. Supported browsers: |
| Array | Yes | Devices that the monitor will use to execute jobs. Supported devices: |
| Array | Yes | Array of public location identifiers where the monitor will run checks (e.g., |
| String | Yes | The display name for your simple browser monitor. |
| Enum | Yes | How often the monitor runs. Options: |
| String | Yes | The runtime type used by your monitor. |
| String | Yes | The runtime type version used by your monitor. Use |
| String | Yes | The language used in your monitor. |
| Enum | Yes | The monitor status. Options: |
| String | Yes | The URL to monitor (e.g., |
| Object | No | Custom HTTP headers to include in the request. Each header has a |
| Boolean | No | Captures a screenshot during job execution when a failure occurs or a script is executed. |
| String | No | Text that must appear in the response for the check to pass. If specified, the monitor will fail if this text is not found in the response body. |
| Boolean | No | Whether to validate the TLS/SSL certificate. Set to |
| Float | No | The monitor's Apdex target in seconds, used to populate SLA reports. Defaults to 7.0 seconds. |
Sample request
mutation { syntheticsCreateSimpleBrowserMonitor( accountId: ACCOUNT_ID monitor: { browsers: [BROWSERS] devices: [DEVICES] locations: { public: ["LOCATION_1", "LOCATION_2"] } name: "YOUR_MONITOR_NAME" period: PERIOD runtime: { runtimeType: "RUNTIME_TYPE" runtimeTypeVersion: "RUNTIME_TYPE_VERSION" scriptLanguage: "SCRIPT_LANGUAGE" } status: STATUS uri: "MONITORED_URI" advancedOptions: { customHeaders: { name: "HEADER_NAME", value: "HEADER_VALUE" } enableScreenshotOnFailureAndScript: ENABLE_SCREENSHOT responseValidationText: "VALIDATION_TEXT" useTlsValidation: TLS_VALIDATION } apdexTarget: APDEX_TARGET } ) { errors { description type } }}Sample response
A successful response returns null for errors:
{ "data": { "syntheticsCreateSimpleBrowserMonitor": { "errors": null } }}If there are any issues creating the monitor, the errors array will contain objects with description and type fields explaining what went wrong.
Update a simple browser monitor
You can update an existing simple browser monitor using the syntheticsUpdateSimpleBrowserMonitor mutation. This allows you to modify the configuration of a simple browser monitor that has already been created.
Input parameters
Parameter | Data Type | Is it Required? | Description |
|---|---|---|---|
| String | Yes | The unique entity GUID of the monitor you want to update. |
| Array | No | Browser(s) that the monitor will use to execute jobs. Supported browsers: |
| Array | No | Devices that the monitor will use to execute jobs. Supported devices: |
| Array | No | Array of public location identifiers where the monitor will run checks (e.g., |
| String | No | The updated display name for your simple browser monitor. |
| Enum | No | How often the monitor runs. Options: |
| String | No | The runtime type used by your monitor. |
| String | No | The runtime type version used by your monitor. Use |
| String | No | The language used in your monitor. |
| Enum | No | The monitor status. Options: |
| String | No | The URL to monitor (e.g., |
| Object | No | Custom HTTP headers to include in the request. Each header has a |
| Boolean | No | Captures a screenshot during job execution when a failure occurs or a script is executed. |
| String | No | Text that must appear in the response for the check to pass. If specified, the monitor will fail if this text is not found in the response body. |
| Boolean | No | Whether to validate the TLS/SSL certificate. Set to |
| Float | No | The monitor's Apdex target in seconds, used to populate SLA reports. Defaults to 7.0 seconds. |
Sample request
mutation { syntheticsUpdateSimpleBrowserMonitor( guid: ENTITY_GUID monitor: { browsers: [BROWSERS] devices: [DEVICES] locations: { public: ["LOCATION_1", "LOCATION_2"] } name: "YOUR_MONITOR_NAME" period: PERIOD runtime: { runtimeType: "RUNTIME_TYPE" runtimeTypeVersion: "RUNTIME_TYPE_VERSION" scriptLanguage: "SCRIPT_LANGUAGE" } status: STATUS uri: "MONITORED_URI" advancedOptions: { customHeaders: { name: "HEADER_NAME", value: "HEADER_VALUE" } enableScreenshotOnFailureAndScript: ENABLE_SCREENSHOT responseValidationText: "VALIDATION_TEXT" useTlsValidation: TLS_VALIDATION } apdexTarget: APDEX_TARGET } ) { errors { description type } }}Sample response
A successful response returns null for errors:
{ "data": { "syntheticsUpdateSimpleBrowserMonitor": { "errors": null } }}If there are any issues updating the monitor, the errors array will contain objects with description and type fields explaining what went wrong.
Upgrade a simple browser monitor's runtime
You can upgrade a simple browser monitor to use the newer Chrome runtime. We recommend using the LATEST version to ensure your monitor automatically stays up-to-date with the most recent Chrome releases.
Importante
Chrome version management: New Relic is transitioning to a LATEST version model for Chrome runtimes. Specific Chrome versions (such as 134 and 140) will reach end-of-life and only LATEST will be maintained going forward. On Aug 18, 2026, monitors still on older Chrome versions will be force upgraded to the latest stable version (Chrome 147 or higher). When Chrome releases a new version, it will be available in simple browser monitors as LATEST within one week. To ensure your monitors automatically receive the latest Chrome updates and features, upgrade to runtimeTypeVersion: "LATEST" before this date.
Input parameters
Parameter | Data Type | Is it Required? | Description |
|---|---|---|---|
| String | Yes | The unique entity GUID of the monitor you want to upgrade. |
| String | Yes | The runtime type. |
| String | Yes | The runtime version. Use |
| String | Yes | The scripting language. |
Sample request
Upgrade to the LATEST Chrome version (recommended):
mutation { syntheticsUpdateSimpleBrowserMonitor( guid: "ENTITY_GUID" monitor: { runtime: { runtimeType: "CHROME_BROWSER" runtimeTypeVersion: "LATEST" scriptLanguage: "JAVASCRIPT" } } ) { errors { description type } }}Sample response
A successful response returns null for errors:
{ "data": { "syntheticsUpdateSimpleBrowserMonitor": { "errors": null } }}If there are any issues upgrading the monitor runtime, the errors array will contain objects with description and type fields explaining what went wrong.
Delete a simple browser monitor
When a simple browser monitor is no longer needed, you can permanently remove it using the syntheticsDeleteMonitor mutation.
To delete a monitor, refer to the Delete Synthetic monitor section.