• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Manage simple browser monitors

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

accountId

Integer

Yes

Your New Relic account ID where the monitor will be created.

monitor.browsers

Array

Yes

Browser(s) that the monitor will use to execute jobs. Supported browsers: CHROME, EDGE, FIREFOX.

monitor.devices

Array

Yes

Devices that the monitor will use to execute jobs. Supported devices: DESKTOP, MOBILE_LANDSCAPE, MOBILE_PORTRAIT, TABLET_LANDSCAPE, TABLET_PORTRAIT.

monitor.locations.public

Array

Yes

Array of public location identifiers where the monitor will run checks (e.g., ["US_EAST_1", "US_WEST_1"]).

monitor.name

String

Yes

The display name for your simple browser monitor.

monitor.period

Enum

Yes

How often the monitor runs. Options: EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, EVERY_DAY.

monitor.runtime.runtimeType

String

Yes

The runtime type used by your monitor. CHROME_BROWSER is the only accepted value.

monitor.runtime.runtimeTypeVersion

String

Yes

The runtime type version used by your monitor. 100 is the only accepted value.

monitor.runtime.scriptLanguage

String

Yes

The language used in your monitor. JAVASCRIPT is the only accepted value.

monitor.status

Enum

Yes

The monitor status. Options: ENABLED (monitor is active and performing checks), DISABLED (monitor is inactive).

monitor.uri

String

Yes

The URL to monitor (e.g., https://example.com).

monitor.advancedOptions.customHeaders

Object

No

Custom HTTP headers to include in the request. Each header has a name and value property.

monitor.advancedOptions.enableScreenshotOnFailureAndScript

Boolean

No

Captures a screenshot during job execution when a failure occurs or a script is executed.

monitor.advancedOptions.responseValidationText

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.

monitor.advancedOptions.useTlsValidation

Boolean

No

Whether to validate the TLS/SSL certificate. Set to true to verify the validity of the SSL certificate chain.

monitor.apdexTarget

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

guid

String

Yes

The unique entity GUID of the monitor you want to update.

monitor.browsers

Array

No

Browser(s) that the monitor will use to execute jobs. Supported browsers: CHROME, EDGE, FIREFOX.

monitor.devices

Array

No

Devices that the monitor will use to execute jobs. Supported devices: DESKTOP, MOBILE_LANDSCAPE, MOBILE_PORTRAIT, TABLET_LANDSCAPE, TABLET_PORTRAIT.

monitor.locations.public

Array

No

Array of public location identifiers where the monitor will run checks (e.g., ["US_EAST_1", "US_WEST_1"]).

monitor.name

String

No

The updated display name for your simple browser monitor.

monitor.period

Enum

No

How often the monitor runs. Options: EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, EVERY_DAY.

monitor.runtime.runtimeType

String

No

The runtime type used by your monitor. CHROME_BROWSER is the only accepted value.

monitor.runtime.runtimeTypeVersion

String

No

The runtime type version used by your monitor. 100 is the only accepted value.

monitor.runtime.scriptLanguage

String

No

The language used in your monitor. JAVASCRIPT is the only accepted value.

monitor.status

Enum

No

The monitor status. Options: ENABLED (monitor is active and performing checks), DISABLED (monitor is inactive).

monitor.uri

String

No

The URL to monitor (e.g., https://example.com).

monitor.advancedOptions.customHeaders

Object

No

Custom HTTP headers to include in the request. Each header has a name and value property.

monitor.advancedOptions.enableScreenshotOnFailureAndScript

Boolean

No

Captures a screenshot during job execution when a failure occurs or a script is executed.

monitor.advancedOptions.responseValidationText

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.

monitor.advancedOptions.useTlsValidation

Boolean

No

Whether to validate the TLS/SSL certificate. Set to true to verify the validity of the SSL certificate chain.

monitor.apdexTarget

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 100+ runtime. This ensures your monitor uses the latest browser features and security updates.

Input parameters

Parameter

Data Type

Is it Required?

Description

guid

String

Yes

The unique entity GUID of the monitor you want to upgrade.

monitor.runtime.runtimeType

String

Yes

The runtime type. CHROME_BROWSER is the only accepted value.

monitor.runtime.runtimeTypeVersion

String

Yes

The runtime version. 100 is the only accepted value.

monitor.runtime.scriptLanguage

String

Yes

The scripting language. JAVASCRIPT is the only accepted value.

Sample request

mutation {
syntheticsUpdateSimpleBrowserMonitor(
guid: "ENTITY_GUID"
monitor: {
runtime: {
runtimeType: "CHROME_BROWSER"
runtimeTypeVersion: "100"
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.

Downgrade a simple browser monitor's runtime

You can downgrade a simple browser monitor to use a legacy runtime. This may be necessary for compatibility reasons, but note that legacy runtimes will be end-of-life on October 22, 2024.

Important

Legacy runtimes are deprecated and will be end-of-life on October 22, 2024. Downgrading to legacy runtimes is not recommended except for temporary compatibility needs.

Input parameters

Parameter

Data Type

Is it Required?

Description

guid

String

Yes

The unique entity GUID of the monitor you want to downgrade.

monitor.runtime.runtimeType

String

Yes

Set to empty string "" to use legacy runtime.

monitor.runtime.runtimeTypeVersion

String

Yes

Set to empty string "" to use legacy runtime.

monitor.runtime.scriptLanguage

String

Yes

Set to empty string "" to use legacy runtime.

Sample request

mutation {
syntheticsUpdateSimpleBrowserMonitor(
guid: "ENTITY_GUID"
monitor: {
runtime: { runtimeType: "", runtimeTypeVersion: "", scriptLanguage: "" }
}
) {
errors {
description
type
}
}
}

Sample response

A successful response returns null for errors:

{
"data": {
"syntheticsUpdateSimpleBrowserMonitor": {
"errors": null
}
}
}

If there are any issues downgrading 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.

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.