Add and edit monitors

Monitors are virtual browsers that monitor your website, recording each check in detail. They also capture aggregate numbers, including an overview, detailed statistics for each page resource, and downtime incidents. Synthetics also collects custom response codes for more detail on your monitor runs.

Types of monitors

There are several types of monitors you can use to check the status of an application or website:

Ping monitors are monitors that simply check to see if an application is online. The Synthetics ping monitor uses a simple Java HTTP client to make requests to your site. For consistency with other Synthetics monitor types, the user agent is identified as Google Chrome. However, the HTTP client is not a full browser, and does not execute JavaScript. If you need JavaScript functionality, use a Simple Browser monitor.

Simple Browser monitors make a request to your site through an instance of Google Chrome. Compared to a simple ping, this is a more accurate emulation of an actual customer visit. The user agent is identified as Google Chrome.

Scripted Browser monitors are used for more sophisticated, customized monitoring. With these monitors, you can set up a monitor that navigates your website and ensures specific resources are present.

API Tests are used to monitor your API endpoints. This can ensure that your app server works, in addition to your website.

Add a monitor

From the Monitors index, select Add Monitor.

Select the type of monitor to add. Ping monitors ensure your website is responding, while Simple Browser monitors send real browsers to check your website. For more complex monitoring, Scripted Browser monitors verify that specific resources are present, while API Tests verify your API endpoint on the back end.

Add a Ping or Simple Browser monitor
  1. Specify a monitor type, name, and URL.
  2. Optional: Add a validation string or Advanced options:
    • A validation string is available for Ping and Simple Browser. This option enables substring monitoring for response validation.
    • Verify SSL is available for Ping and Simple Browser. This option verifies the validity of the SSL certificate chain. It can be duplicated by running the following syntax:

      openssl s_client -servername {YOUR_HOSTNAME} -connect {YOUR_HOSTNAME}:443 -CApath /etc/ssl/certs > /dev/null
    • The Bypass HEAD request option is available for Ping. This option skips the default HEAD request and instead uses the GET verb with a ping check.
    • Redirect is Failure is available for Ping. If a redirect result occurs when Redirect is Failure is enabled, New Relic Synthetics will categorize the result as a failure, rather than following the redirect and checking the resulting URL.
  3. Select the locations from which you want your monitor to run.
  4. Choose a frequency to determine how often each location will run your monitor.
  5. Optional: Set up alert notifications.
  6. Select Create my monitor to confirm.

Wait a few minutes, then check your monitor from the Monitors index.

Add a Scripted Browser or API Test monitor
  1. Specify a monitor type and name.
  2. Select the locations from which you want your monitor to run.
  3. Choose a frequency to determine how often each location will run your monitor.
  4. Optional: Set up alert notifications.
  5. Select Next: Write your script to create a script for your Scripted Browser or API Test, then select Validate to verify your syntax.

    For complex scripts, validation may take up to one minute.

  6. Select Create my monitor to confirm.

Wait a few minutes, then check your monitor from the Monitors index.

You can also use the Synthetics REST API to add monitors.

Edit a monitor

To edit an existing monitor:

  1. From the Monitors index, select the monitor you want to edit.
  2. In the side menu bar, select a link to change the following settings:

    • Select Settings > General to edit name, Apdex T, URL, locations, frequency, and Advanced options.
    • Select Settings > Script to edit your monitor script for a Scripted Browser or API Test monitor.
    • Select Settings > Alert notifications to edit your alert settings.
  3. Select Save changes to confirm.

You cannot change a monitor's type after the monitor is created.

Delete a monitor

To delete a monitor:

  1. From the Monitors index, select the monitor you want to edit.
  2. From the selected monitor, select Settings > General.
  3. Select the trash can icon.

You can also use the Synthetics REST API to delete a monitor.

Monitor settings

When configuring monitors, the following settings are available:

Type

Select the type of monitor you want to create. A monitor's type can't be changed after the monitor is created.

  • Ping: Specify a single URL to monitor for availability. Synthetics will check this URL via HEAD or GET requests. The non-configurable timeout for this monitor is 60 seconds.

    Access to this feature depends on your subscription level. For Synthetics paid subscriptions, Pings do not count against your monthly credits budget. Synthetics free subscriptions can also create free Pings, within reasonable limits.

  • Simple Browser: Specify a single URL to monitor via real browser. Once each frequency interval, Synthetics will check this URL via a Selenium-powered Google Chrome browser. The non-configurable timeout for this monitor is 60 seconds.
  • Scripted Browser: Create a script to drive a Selenium-powered Google Chrome browser. The browser follows each step in the script to verify that complex behavior is working as expected (for example, searching a website, then clicking one of the search results). The non-configurable timeout for this monitor is 180 seconds.
  • API Test: Create an API script to ensure your API endpoint is working correctly. For more information, see Write API tests.
Monitor name

Defines a name for the monitor. Monitor names cannot contain unencoded angle brackets (< >). To include angle brackets in a monitor name, encode them as HTML bracket entities (&lt; &gt;) in the UI or API.

Location

Select the locations where you want your monitor to run. Select more locations to ensure that your application is available to users around the world. If you have any private locations, they will be listed here too. You can use the Synthetics location API endpoint to retrieve a list of valid locations for your account.

Your monitor will run one check from each selected location during each frequency interval. For example, if you select three locations and define a frequency of 15 minutes, your monitor will run three checks in each 15 minute period (or 8,640 checks per month).

Frequency

Select how often the monitor runs. This frequency applies to each location. For example, if you select three locations and a Frequency of 15 minutes, your monitor will run three checks in each 15 minute period (or 8,640 checks per month).

Alerts

Specify an email address to receive alerts when a monitor fails. Or, attach a monitor to an existing alert policy for more notification options. For more information, see Alerting in Synthetics.

Apdex T

Customize the Apdex T for this monitor. This setting is only available when editing the settings for an existing monitor, not when creating a new monitor. Change the Apdex T from the default 7 seconds for more accurate Apdex scores in your SLA reports. For example, if you have a very long scripted browser, you might adjust the Apdex T to 15 seconds to more closely reflect the usual completion time. Similarly, a good Apdex T for a simple browser check might be only 2 seconds.

Response Validation (optional)

Specify text to search for on the page. When using Simple Browser or Ping monitor types, there is a 1MB limit on the page load.

For more help

Additional documentation resources include:

Discuss Synthetics in the Online Technical Community! Troubleshoot, offer feedback, and share and view example scripts. If you need additional help, get support at support.newrelic.com.