Manage monitor runtimes

Simple browser, scripted browser, and API monitors execute in the New Relic runtime environment that existed when the monitors were created, even when new runtimes are released.

Ping monitors are not affected by changes in runtime versions.

Since your monitors could be running on older runtimes, it's important for you to understand runtime features and upgrade monitors to use the latest runtime version.

This document describes how to:

The monitor version always matches its runtime version, and the monitor version determines what features the monitor can execute. See the section below that applies to your monitor version.

If you are unsure about your monitor's version, go to synthetics.newrelic.com > (select a monitor) > Settings > General. If a monitor users the current runtime, the version is Latest (not a number).

Here are monitor version details for all monitor types except ping:

Version 0.6.x (Latest)

Synthetics monitor version 0.6.x details:

The Synthetics runtime does not support the async/await syntax supported in Node 10.

Version 0.5.x

Synthetics monitor version 0.5.x details:

Version 0.4.x

Synthetics monitor version 0.4.x details:

Version 0.2.x

The only difference between monitor version 0.2.x and 0.4.x is that 0.4.x has network proxy settings enabled.

Synthetics monitor version 0.2.x details:

Version 0.1.0

Synthetics monitor version 0.1.0 details:

Make your Synthetics scripted monitors more contextually aware by using the $env variable properties. These represent important information about the runtime environment when the script executes.

You do not need to import $env because it is readily available, similar to the $browser and $http variables. For example:

console.log('running in ' + $env.LOCATION);
$browser.get('https://example.com');
$env property Type Scripted browser Scripted API test

JOB_ID

Unique ID (UUIDv4) identifying the running job

string [check icon] [check icon]

MONITOR_ID

Unique ID (UUIDv4) identifying the running monitor

string [check icon] [check icon]

ACCOUNT_ID

Unique ID (number) identifying the account that owns the monitor

number [check icon] [check icon]

MONITOR_TYPE

Type of monitor this job is running

string [check icon] [check icon]

API_VERSION

API version this monitor is using

string [check icon] [check icon]

LOCATION

Location where this job is running. Examples:

  • aws-us-east-1
  • 123-my_location-81D (for private locations)
string [check icon] [check icon]

PROXY_HOST

Host of the proxy that collects HTTP traffic metrics

string [check icon]

PROXY_PORT

Port of the proxy that collects HTTP traffic metrics

number [check icon]

USER_DEFINED_VARIABLES (private locations)

A configurable set of variables specified by users.

See the documenation about containerized private minion (CPM) configuration.

string [check icon] [check icon]

To ensure that you maintain monitor performance and get access to new features, upgrade your monitors whenever you see the Upgrade monitors button in the Synthetics user interface.

The upgrade provides a validation process to identify scripted monitors that are not compatible with the latest runtime. Validation allows you to correct any errors that the latest runtime might cause with existing monitors before your monitors are upgraded.

When you select Upgrade monitors, here are the options:

Task Description
Upgrade an incompatible monitor

If a monitor appears under Incompatible monitors:

  1. Select the monitor in the Name column, which opens the individual monitor so you can view your scripts.
  2. Select Validate latest and correct any errors with your monitor script.
  3. When the monitor is validated successfully, select Upgrade.
Upgrade any validated monitors

If you have some passing monitors, upgrade them by selecting Upgrade all passing monitors to latest runtime.

Upgrade all monitors (including failing monitors)

Upgrading without validation may cause monitor outages.

If you have some failing monitors, you can skip validation and correct errors later by selecting Upgrade all monitors on account to latest runtime.

To see a history of monitor version upgrades, query the NrAuditEvent.

For more help

Recommendations for learning more: