Scripted monitor version runtime environments

New Relic Synthetics scripted monitors have several supported versions that use different runtime environments.

This document contains:

Find monitor version

A Synthetics monitor's version depends on what the latest monitor version was when that monitor was created.

To view a monitor's version:

Note that the monitor version will only be displayed if it is not using the latest. For example:

  • If the monitor was created when version 0.5.x or prior was the latest, then the previous version (example: 0.5.x) will be displayed as the monitor version.
  • If the monitor was created when the latest was version was 0.6.x or greater, then a monitor version will not be displayed.

Monitor version runtime environments

A Synthetics monitor's runtime environment version defines the version of components and dependencies that are used to perform that monitor's checks. This version information applies to scripted browsers and API tests (it also applies to simple browser monitors, but that monitor type doesn't provide a scripting environment for use of third-party modules).

Choose a monitor version to see its details:

Version 0.6.x (latest for ping, simple browser, and scripted browser monitors)

Synthetics monitor version 0.6.x details:

Version 0.5.x (latest for scripted API monitors)

Synthetics monitor version 0.5.x details:

Version 0.4.x

Synthetics monitor version 0.4.x details:

Version 0.2.x

Synthetics monitor version 0.2.x details:

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

Version 0.1.0

Synthetics monitor version 0.1.0 details:

$env property reference

You can make your New Relic Synthetics scripted monitors more contextually aware by using the $env variable properties. These represent important information about the runtime environment in your script during execution.

It is not necessary to import $env; it is readily available, like the $browser and $http variables. Here's an 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]

Proxy properties

The following applies only to these versions:

  • API monitors: 0.4.0, 0.2.2, 0.2.1, 0.1.0
  • Scripted monitors: 0.1.0

In order to analyze and collect your HTTP traffic metrics, Synthetics must ensure the traffic passes through a conceptual funnel. Synthetics includes a software "funnel" component capable of analyzing the HTTP requests or responses and collecting the information.

  • New Relic's scripted browser monitors (versions 0.4.x and lower) include a mechanism to do this analysis without needing an HTTP proxy, so you don't have to configure anything.
  • New Relic's API test (versions 0.4.x and lower) provides an $http object that is pre-configured to make the requests pass through the internal HTTP proxy. This allows you to write your test and not need to include any proxy settings.

If you want to use some other way to generate HTTP traffic while still collecting the HTTP traffic metrics, you can use $env.PROXY_HOST and $env.PROXY_PORT. Include these properties in your script to collect traffic metrics.

For more help

Recommendations for learning more: