New Relic Synthetics scripted monitors have several supported versions that use different runtime environments.
This document contains:
- The supported components and dependencies for Synthetics monitor versions
- How to use the
$env
variable properties - How to use proxy properties (for assorted older API test versions)
Find monitor version
A Synthetics monitor's version depends on what the most current monitor version was when that monitor was created.
To view a monitor's version:
- From synthetics.newrelic.com, select a monitor from the monitor index.
- Select Settings > General. The version number will be near the top of the page.
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.5.x (current)
-
Synthetics monitor version 0.5.x details:
- Browser: Chrome 60
- Node version: 6.11.2
- Selenium WebDriver version: 3.5.0 (exposed via
$browser>
and$driver
) - Proxy settings: Yes
- Supported third-party modules:
- atob 2.0.3
- btoa 1.1.2
- chai 4.1.1
- chai-webdriver 0.9.3
- colors 1.1.2
- consoleplusplus 1.4.1
- crypto-js 3.1.9-1
- faker 4.1.0
- joi 10.6.0
- lodash 4.17.4
- moment 2.18.1
- net-ping 1.2.1
- net-snmp 1.2.0
- nodejs-traceroute 1.1.1
- uuid 3.1.0
- protocol-buffers 3.2.1
- q 1.5.0
- request 2.81.0
- should 11.2.1
- text-encoding 0.6.4
- thrift 0.10.0
- tough-cookie 2.3.2
- underscore 1.8.3
- url-parse 1.1.9
- urllib 2.24.0
- urllib-sync 1.1.4
- validator 8.0.0
- xml2js 0.4.17
- Version 0.4.x
-
Synthetics monitor version 0.4.x details:
- Browser: Chrome 44
- Node version: 0.1.2
- Selenium WebDriver version: 2.47.0 (exposed via
$browser>
and$driver
) - Proxy settings: Yes
- Supported third-party modules:
- atob 2.0.3
- btoa 1.1.2
- chai 2.3.0
- chai-webdriver 1.1.1
- colors 1.1.2
- consoleplusplus 1.4.1
- crypto-js 3.1.5
- faker 3.0.1
- joi 6.6.1
- lodash 2.4.2
- moment 2.10.6
- net-ping 1.1.12
- net-snmp 1.1.14
- node-uuid 1.4.3
- protocol-buffers 3.1.6
- q 1.4.1
- request 2.60.0
- should 7.0.3
- text-encoding 0.6.4
- thrift 0.9.2
- tough-cookie 2.0.0
- underscore 1.8.3
- urllib 2.3.11
- urllib-sync 1.1.4
- url-parse 1.1.9
- validator 4.0.2
- xml2js 0.4.17
- Version 0.2.x
-
Synthetics monitor version 0.2.x details:
- Browser: Chrome 44
- Node version: 0.1.2
- Selenium WebDriver version: 2.47.0 (exposed via
$browser>
and$driver
) - Proxy settings: No
- Supported third-party modules:
- atob 2.0.3
- btoa 1.1.2
- chai 2.3.0
- chai-webdriver 1.1.1
- colors 1.1.2
- consoleplusplus 1.4.1
- crypto-js 3.1.5
- faker 3.0.1
- joi 6.6.1
- lodash 2.4.2
- moment 2.10.6
- net-ping 1.1.12
- net-snmp 1.1.14
- node-uuid 1.4.3
- protocol-buffers 3.1.6
- q 1.4.1
- request 2.60.0
- should 7.0.3
- text-encoding 0.6.4
- thrift 0.9.2
- tough-cookie 2.0.0
- underscore 1.8.3
- urllib 2.3.11
- urllib-sync 1.1.4
- url-parse 1.1.9
- validator 4.0.2
- xml2js 0.4.17
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:
- Browser: Phantomjs 1.9.8
- Node version: 0.1.0
- Selenium WebDriver version: 2.44.0 (exposed via
$browser>
and$driver
) - Proxy settings: No
- Supported third-party modules:
- chai 1.9.1
- chai-webdriver 0.9.3
- colors 1.1.2
- consoleplusplus 1.4.1
- crypto-js 3.1.2-5
- faker 2.0.1
- lodash 2.4.2
- moment 2.8.3
- node-uuid 1.4.3
- q 1.1.1
- should 4.0.4
- tough-cookie 0.12.1
- underscore 1.7.0
- validator 3.18.1
- xml2js 0.4.17
$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 |
---|---|---|---|
Unique ID ( |
string |
[check icon] | [check icon] |
Unique ID ( |
string |
[check icon] | [check icon] |
Unique ID ( |
number |
[check icon] | [check icon] |
Type of monitor this job is running |
string |
[check icon] | [check icon] |
API version this monitor is using |
string |
[check icon] | [check icon] |
Location where this job is running. Examples:
|
string |
[check icon] | [check icon] |
Host of the proxy that collects HTTP traffic metrics |
string |
[check icon] | |
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.