• /
  • Log in
  • Free account

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.

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.

Read on to learn how to:

Tip

Ping monitors are not affected by changes in runtime versions.

Upgrade a synthetic monitor

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 synthetic monitoring user interface. You can also upgrade your monitors by going to one.newrelic.com > Synthetics > Upgrade monitors.

Important

You won't see the Upgrade monitors option if you're already on the latest runtime version.

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)

Caution

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.

View synthetic monitoring upgrade history

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

Use environment variables in runtimes

Make your synthetic 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

MONITOR_ID

Unique ID (UUIDv4) identifying the running monitor

string

ACCOUNT_ID

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

number

MONITOR_TYPE

Type of monitor this job is running

string

API_VERSION

API version this monitor is using

string

LOCATION

Location where this job is running. Examples:

  • aws-us-east-1
  • 123-my_location-81D (for private locations)

string

PROXY_HOST

Host of the proxy that collects HTTP traffic metrics

string

PROXY_PORT

Port of the proxy that collects HTTP traffic metrics

number

USER_DEFINED_VARIABLES (private locations)

A configurable set of variables specified by users.

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

string

Review runtime dependencies

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.

Tip

If you're unsure about your monitor's version, go to one.newrelic.com > Synthetics > Upgrade monitors. You won't see the Upgrade monitors option if you're already on the latest runtime version.

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

Create issueEdit page
Copyright © 2022 New Relic Inc.