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:
- Upgrade a synthetic monitor
- View a synthetic monitor upgrade history
- Use environment variables in runtimes
- Review runtime dependencies
ヒント
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.
重要
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:
|
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. |
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');
| Type | Scripted browser | Scripted API test |
---|---|---|---|
Unique ID ( |
| ||
Unique ID ( |
| ||
Unique ID ( |
| ||
Type of monitor this job is running |
| ||
API version this monitor is using |
| ||
Location where this job is running. Examples:
|
| ||
Host of the proxy that collects HTTP traffic metrics |
| ||
Port of the proxy that collects HTTP traffic metrics |
| ||
A configurable set of variables specified by users. See the documentation about containerized private minion (CPM) configuration. |
|
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.
ヒント
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:
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicの とandドキュメント をご確認ください。