How to Get Synthetics Monitoring to Work in New Relic

How to Get Synthetics Monitoring to Work in New Relic

As a technical professional responsible for application performance, How to Get Synthetics Monitoring to Work in New Relic you know the importance of monitoring your software systems. Detecting issues quickly is critical to providing a good user experience and maintaining reliability. New Relic’s Synthetics monitoring feature allows you to proactively check your web apps and APIs from locations around the world, alerting you to problems before your users are affected. Configuring Synthetics monitoring in New Relic is straightforward, but does require a few steps to set up. By following this guide, you’ll have Synthetics up and running in no time, gaining valuable insight into how your web services are functioning for users across the globe. With proactive monitoring in place, you can rest assured your applications are operating as expected and your customers remain satisfied.

What Is Synthetics Monitoring?

Synthetics monitoring allows you to proactively monitor the availability and performance of your applications from the end user’s perspective.

  • Synthetics tests are scripts you configure to run on a regular schedule against your web applications. They simulate user interactions by accessing your web pages and APIs to monitor for issues.
  • You can configure basic tests to check page load times and verify content. More advanced tests can fill out forms, login, add items to carts, complete purchases, and otherwise emulate full end-to-end user workflows.
  • Tests run from locations around the world on a set schedule. This global monitoring provides insight into how your applications are performing for all your users, no matter where they are.
  • When tests detect a problem, New Relic issues an alert so you know right away if there’s an outage or performance slowdown impacting your end users. By detecting issues quickly, you can resolve them fast and provide the best experience for your customers.
  • To get started, you’ll need to enable Synthetics monitoring in your New Relic account. Then you can build basic page load and API tests through an easy to use UI, or write more advanced tests using a JavaScript API and the Synthetics REST API.
  • Configure tests to run as often as every 5 minutes so you have comprehensive monitoring and fast alerts. Review test results and errors in pre-built dashboards and reports. Drill down into specific tests to see detailed diagnostics and logs to speed up troubleshooting.

With frequent Synthetics tests providing monitoring from around the world, you’ll gain insight into your true end user experience and be alerted to issues as soon as they arise. Comprehensive Synthetics monitoring is a key tool for any high performing web application.

Creating Your First Synthetic Monitor

To configure your first synthetic monitor in New Relic, follow these steps:

  1. Log into your New Relic account and select Synthetics from the left-hand menu. Click โ€œAdd Monitorโ€ to create a new monitor.
  2. Choose the type of monitor you want to create. The three options are:
  3. Simple Browser: Checks if a web page is available and optionally contains expected content.
  4. Browser Script: Runs a Selenium IDE script to check complex user flows on a web page.
  5. API: Makes an API call to check the availability and response of an API endpoint.

For this example, select โ€œSimple Browser.โ€

  1. Enter the URL of the web page you want to monitor, e.g. You can also enter URL parameters if needed.
  2. Select an optional content match string to check for expected text on the page. For example, enter โ€œExample Websiteโ€ to ensure that text appears on the page.
  3. Choose a monitoring frequency between 1 and 60 minutes. For most websites, a 5 or 10-minute frequency is a good start.
  4. Set the monitoring locations where you want to check the web page from. Select at least two locations for the most accurate results.
  5. Give your monitor a name and an optional description to help identify it. Then click โ€œCreate Monitor.โ€
  6. Your new monitor will now appear on the list of monitors. How to Get Synthetics Monitoring to Work in New Relic It may take a few minutes for the first results to appear as the monitors run from each location. Once data is available, you’ll see the availability, response time, and pass/fail status for content matching.

With these steps, you’ve configured your first synthetic monitor to check on the availability and performance of a web page. Let New Relic watch the web for you!

Choosing the Right Monitor Type

How to Get Synthetics Monitoring to Work in New Relic

Choosing a Monitor Type

When configuring Synthetics monitoring in New Relic, How to Get Synthetics Monitoring to Work in New Relic you’ll need to determine which monitor type is most appropriate for your needs. The three main options are:

Ping monitors check if your website or API is available by sending an HTTP request. These are best for basic uptime monitoring.

Browser monitors check if specific web pages are loading properly by automating a browser to access the page. Use these to monitor critical user workflows or JS-heavy web apps.

API monitors check if your API is functioning properly by sending API requests. These allow you to monitor API performance and validate API responses.

Consider what you want to monitor and the level of detail needed. For simple uptime checks, a ping monitor may suffice. To monitor full user workflows or API functionality, choose a browser or API monitor.

Configuring the Monitor

Once you select a monitor type, you’ll configure the specific details. Provide a name and choose an interval to determine how often the monitor checks. Shorter intervals, like 1 minute, are good for critical systems. Longer intervals, like 15 minutes, are fine for less critical monitoring.

Specify the URL(s) to monitor. For browser monitors, select the actual web pages. For API monitors, enter the API endpoint(s). You can monitor multiple URLs to track an entire workflow or API.

Configure thresholds to determine when to trigger alerts. Set warning and critical thresholds for things like response time, status codes, and string matching. If a monitor drops below a threshold, you’ll receive an alert.

Add filters and assertions to check for specific conditions. Filters look for certain strings, status codes, or response sizes. Assertions validate that elements are on the page, API responses match a schema, strings are present, and more.

Choose alert conditions to determine when alerts are triggered and who receives the alerts. Options include trigger on failure, warning threshold, critical threshold, or a custom condition. Alerts can notify team members via email, Slack, PagerDuty, and other channels.

Following these steps will get your Synthetics monitors configured properly and provide actionable alerts to keep your systems monitored around the clock. Be sure to check on your monitors regularly and make any needed tweaks to the configurations to keep them optimized.

Setting Up Browser Monitoring

How to Get Synthetics Monitoring to Work in New Relic

To configure Synthetics browser monitoring in New Relic, you’ll need to follow a few steps.

Setting Up the Monitor

How to Get Synthetics Monitoring to Work in New Relic First, sign in to your New Relic account and select “Synthetics” from the menu. Click “Add Monitor” and select “Browser”.

Give your monitor a name and choose a frequency for how often you want it to run. For most websites, every 5-15 minutes is a good start. Select the locations you want to monitor from – choosing regions close to your visitors and customers is best.

Configuring the Browser

Next, enter the URL you want to monitor. You can monitor any web page or web application on the public Internet or your private network.

Select the browser you want to use for monitoring – Chrome, Firefox, or Selenium. Chrome and Firefox will monitor from real browsers, providing the most accurate experience. Selenium uses an automated browser and can monitor SPAs.

Choose a resolution, set a timeout threshold, and select whether to monitor with or without JavaScript enabled. Monitoring without JavaScript can provide a light-weight check of your page content and structure.

Defining Success Criteria

Success criteria are pass/fail checks to determine if your page load was successful. They can check page content, load time, JavaScript errors, and more.

Some useful checks to add are:

  • Page contains text: Enter expected text that should appear How to Get Synthetics Monitoring to Work in New Relic on the page. Checks that content is loading properly.
  • Page load under threshold: Enter a maximum page load time in seconds. Checks that your page is performing well.
  • No JavaScript errors: Checks the browser console for JavaScript errors after page load completes. Helpful for monitoring SPAs and client-side web applications.
  • HTTP status code is 200: Checks that the page returns a normal successful HTTP status code.

Once you’ve configured the monitor, save it. Your Synthetics browser monitor is now set up and will begin running on the schedule you defined. You’ll start receiving alerts if it fails to meet your success criteria. Be sure to check in on your monitor results regularly to ensure optimal uptime and performance.

Creating API Monitoring

To configure API monitoring in New Relic, you’ll need to create a

Synthetic monitor that checks the status of your API endpoints. ###

Defining the Monitor

  • Give the monitor a name that describes its function, e.g. โ€œCheckout API Monitorโ€.
  • Select the โ€œAPIโ€ monitor type.
  • Choose an API endpoint to monitor, e.g.
  • Select the request method: GET, POST, PUT, DELETE. For a POST or PUT request, provide the request body.
  • Choose an authentication method if required: None, Basic Auth, API key. Provide the necessary credentials.
  • Set the request headers if needed. These will be sent with every request.
  • Choose a monitoring frequency, e.g. every 5 minutes. More critical APIs may need monitoring every minute.

Configuring Alerts

  • Set up an alert to notify you if the API monitor fails. Select the โ€œMonitor failsโ€ alert type.
  • Choose a notification channel: Email, PagerDuty, Slack, etc.
  • Set the alert threshold, e.g. 3 failures in 5 minutes.
  • Add alert recipients: the developers responsible for the API.

Reviewing Results

  • once enabled, the API monitor will begin checking your endpoint at the set frequency.
  • View results and details of each check under Monitor Overview > Results.
  • Check the average response time and total failures to ensure your API’s performance and reliability.
  • In the event of a failure, review the alert to troubleshoot the issue. Then resolve it promptly to avoid disruption.

Configuring synthetics monitoring for your APIs helps give you insight into their availability and performance. By catching issues early, you can minimize downtime and ensure a good experience for API consumers. Be sure to review monitoring results regularly and make any needed adjustments to frequency or alert thresholds. With New Relic Synthetics, you’ll gain confidence that your APIs are functioning as intended.

Testing From Multiple Locations

How to Get Synthetics Monitoring to Work in New Relic

To ensure your Synthetics monitors provide an accurate representation of performance from multiple locations, you’ll want to set up tests to run from various geographic regions.

Configure Monitor Locations

New Relic provides Synthetics monitoring locations in over 15 regions around the world. To add locations to your Synthetics monitors:

  1. Log in to your New Relic account and select Synthetics from the menu.
  2. Click on the name of the monitor you want to edit.
  3. Under the Locations section, click โ€œAdd Location.โ€
  4. Select the region(s) you want to monitor from. For example, in How to Get Synthetics Monitoring to Work in New Relic choose North America, Europe, and Asia Pacific.
  5. Review the specific city locations available in each region and check the boxes next to the cities you want to monitor from.
  6. Click โ€œAdd Selected Locationsโ€ to save your changes.

Your Synthetics monitor will now run tests from the locations you specified, in addition to the default location. Monitor the performance dashboard to see metrics for each location. This allows you to verify there are no location-specific latency or availability issues.

Compare Multi-Location Results

With tests running from multiple points around the world, you gain valuable insight into how your application or API is performing for end users in different geographic regions. Be on the lookout for:

  • Higher latency or lower availability in a particular location. This could indicate an issue with your hosting provider or data center in that region.
  • Consistently poor performance across all locations. This likely points to an issue within your own systems or application code.
  • Significant differences in performance between locations. Your end users in some parts of the world may be having a poor experience with your product or service.

By monitoring synthetics from key locations your end users are accessing your systems from, you gain a more holistic view of performance and the ability to provide the best experience for all your customers, regardless of location. Continuous optimization and improvement based on these geographic insights help ensure maximum uptime and reliability around the globe.

Configuring Alerts for Your Synthetic Monitors

Once you have created Synthetic monitors to keep an eye on your website and APIs, youโ€™ll want to set up alerts to notify you if there are any issues. Alerts in New Relic allow you to get notifications via email, Slack, PagerDuty, or webhooks when your monitors detect problems.

An alert policy determines which monitors will trigger an alert, the conditions that activate the alert, and how you are notified. To create an alert policy for your Synthetics monitors:

  1. Click Alerts in the left-hand navigation, then click “Add alert policy”.
  2. Give the policy a name and description to help identify it. For example, “Synthetics Website Monitors”.
  3. Under “What do you want to alert on?”, select “Synthetic monitors”.
  4. Choose which Synthetic monitors you want to alert on. You can select all of them or specific monitors.
  5. Set conditions for when an alert will trigger. The most common options are “Monitor status = Failed” or “Response time > X seconds”. You can adjust the threshold response time as needed.
  6. Select how you want to be notified when an alert triggers. Options include:

Be sure to test your alert policy by manually failing one of your Synthetic monitors. Check that you receive notifications as expected before relying on the alerts in case of an actual failure. Alerts, when properly configured, can help give you peace of mind that you’ll know right away if there are any availability or performance issues with your web services.

Using Synthetics Monitoring Data in New Relic Dashboards

Once you have Synthetics monitors set up and running in New Relic, the data they generate can provide crucial insights into the performance and availability of your applications. You can visualize this data on New Relic dashboards to track key metrics and spot potential issues.

Adding a Synthetics widget to a dashboard

To add Synthetics data to a dashboard, click the โ€œAdd widgetโ€ button and select the โ€œSyntheticsโ€ widget. You’ll be prompted to choose which monitor you want to display data for. Select the monitor and the specific metrics you want to track, such as average response time, pass/fail rate, or error percentage. You can add multiple Synthetics widgets to the same dashboard to monitor different aspects of your application’s performance.

Using Synthetics data to set alerts

The metrics gathered by your Synthetics monitors can also be used to trigger alerts in New Relic if certain thresholds are crossed. For example, you might want to be notified if your application’s average response time exceeds a certain number of seconds or if the pass/fail rate drops below 95%. To set up an alert, go to Alerts -> Add alert policy. Select โ€œSyntheticsโ€ as the policy type, choose your monitor and the metric you want to alert on, then set the threshold that will trigger the alert. You can have the alert send a notification, create an incident, or trigger automated workflows.

Correlating Synthetics data with other metrics

The power of New Relic lies in its ability to correlate data across your entire software stack. You can analyze how Synthetics metrics relate to metrics from other New Relic products, like Infrastructure, Browser, Mobile, and APM. For example, you might notice that spikes in application response time reported by Synthetics coincide with high CPU or memory How to Get Synthetics Monitoring to Work in New Relic utilization on your servers. Or a drop in browser page load times could correspond with an increase in mobile app crashes. Correlating metrics in this way helps you understand how the performance of one part of your software impacts other parts.

New Relic Synthetics provides a comprehensive view of the availability and experience of your software. Visualizing Synthetics data through dashboards and alerts, and analyzing how it relates to metrics across your stack, will help your team maintain optimal performance and keep your users happy.

FAQ: Common Questions About Synthetics Monitoring in New Relic

How to Get Synthetics Monitoring to Work in New Relic

What is Synthetics monitoring?

Synthetics monitoring allows you to proactively monitor your applications and APIs by simulating user interactions and transactions. You can set up monitors to run on a schedule to ensure your application is performing as expected. If there are any issues detected, New Relic will alert you so you can resolve them quickly.

What can I monitor with Synthetics?

You can monitor your application’s user flows, APIs, and key How to Get Synthetics Monitoring to Work in New Relic transactions using scripts you write or New Relic’s out-of-the-box monitors. Some examples include:

  • User login and signup flows
  • Adding items to a cart and checking out
  • API requests and responses
  • Database queries

How do I set up Synthetics monitoring?

To start monitoring with Synthetics, follow these steps:

  1. In the New Relic UI, go to Synthetics > Monitors.
  2. Click “Create Monitor” to begin setting up your first monitor.
  3. Choose the type of monitor you want to create: API, Browser, or Scripted Browser.
  4. Configure the details for your monitor like the name, frequency, locations to run from, and more.
  5. Add the script or API call details that will simulate user interactions with your application.
  6. Save your monitor. It will now run on the schedule you defined.

How much does Synthetics monitoring cost?

Synthetics monitoring is available on all New Relic paid plans. The number of Synthetics monitors you can run depends on your plan level. Pricing details can be found on How to Get Synthetics Monitoring to Work in New Relic New Relic does not charge any additional fees for geographic locations or types of monitors.

What kinds of alerts can I set up?

You can configure alerts to notify your team via email, Slack, or PagerDuty when:

  • A Synthetics monitor fails to run
  • The response time or throughput of a monitor changes significantly
  • An API call returns an error status code
  • A browser monitor fails or encounters JavaScript errors

Alerts allow you to proactively detect issues with your applications so you can investigate and resolve them quickly.


You now have Synthetics monitoring set up to keep a pulse on your application in New Relic. With regular checks configured and alerts in place, you’ll get visibility into performance issues quickly and can address them before they impact users. As your application evolves, be sure to revisit your Synthetics monitors and make any needed changes to the locations, frequency, or How to Get Synthetics Monitoring to Work in New Relic thresholds. Optimizing your monitors along with your app will help ensure you continue detecting problems early and keeping your application running smoothly. With New Relic Synthetics by your side, you have an easy way to monitor your web application and API performance from anywhere.

Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: