• /
  • EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

NerdGraph tutorial: Manage your synthetic monitors

Our NerdGraph API allows you to automate creating, updating, or deleting your synthetic monitors, private locations, secure credentials, and monitor downtimes.

Requirements

Requirements include:

Understand fields in NerdGraph explorer

You can view field definitions in NerdGraph explorer, but it may help to better understand the LOCATION, PERIOD, TAGS, and other fields.

Use queries to retrieve data

Queries make requests to fetch data. To learn additional query capabilities available to your synthetic entities, check out NerdGraph entities API tutorial.

Create your synthetic monitors

Below are some sample requests to automate the creation of your synthetic monitors.

Include the runtime object that includes runtimeType, runtimeTypeVersion, and scriptLanguage to use a newer runtime. Do not include the runtime object and these attributes to continue using a legacy runtime.

중요

As of August 26, 2024, you can no longer create new monitors using legacy runtimes on public or private locations. On October 22, 2024, we will end of life the containerized private minion (CPM) and legacy synthetics runtime versions.

Update your synthetic monitors

While you can't change the monitor type after creating it, you can update its settings. Only the guid and the settings that need updated are required as part of the request.

Include the runtime object that includes runtimeType, runtimeTypeVersion, and scriptLanguage to upgrade a monitor to use a newer runtime. Include this object and set these attributes to empty string to downgrade to a legacy runtime. Do not include this object and these attributes to continue using a legacy runtime.

Delete a synthetic monitor

Use these scripts to delete your monitors:

Manage your private locations

A private location allows you to monitor applications behind your firewall. When you create a private location, you install and configure private minions to execute the monitors assigned to that private location.

Manage your secure credentials

You use secure credentials when storing, protecting, and centrally managing protected information used by your monitors, like passwords, API keys, or encoded certificates. Using NerdGraph allows you to programmatically change the values of your secure credentials if you need to reset any credentials for any reason.

Manage your monitor downtimes

Monitor downtimes let you specify times that your synthetics should stop running. We've provided different snippets that demonstrate how to schedule monitor downtimes for your synthetics. You need to update these snippets to specify timezone, start times, and end times. To learn more about when you might schedule monitor downtimes, check out our doc Disable monitoring during scheduled maintenance times. To find timezone values, see the tz database of time zones. For example, America/Los Angeles would use the PDT abbreviation.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.