Unable to set up Synthetics monitoring in New Relic for my Java application deployed in Tomcat server


I am unable to set up the synthetics monitoring for my java application deployed in tomcat server.

I am able to set up APM for the same but not Synthetics. I followed the steps provided in docs but no use.
Please help.


Hello, @rakeshcse590: What have you tried? What kind of Synthetics monitor are you trying to set up?

Hi phil.,

I want to set up synthetics monitoring for my application. Hosted in my localhost

I i nstalled the Java agent and passed the newrelic .jar as kvm arguements. But I am still seeing get started page on synthetics.
I want to set ping, simple browser monitor

Please help

Synthetics is designed to monitor websites that are accessible on the public Internet. You will not be able to use Synthetics to monitor a site running on localhost, unless you give it a publicly-accessible URL.

Ok. Even for monitoring websites also how can I get started.
Please guide me.

To create a Ping monitor:

  1. Give your monitor a name. This is how it will appear in the Synthetics list of monitors
  2. Specify the URL you wish to monitor
  3. Choose the locations (cities) from which you wish to monitor the site
  4. Specify how frequently you would like the monitor to run
  5. Click, “Create my monitor”
1 Like

Thanks Phil, I am able to create a simple browser monitor now.

Can you please help/guide how can i set up an alert for resource download time for synthetics monitor created using simple browser for a website.


New Relic Support isn’t able to offer assistance in writing scripts for Synthetics. The syntax and method for writing Synthetics scripts are based on industry standard Selenium WebDriverJs, with some additional helper functions and tools provided. We have additional documentation available on writing scripted browser monitors to help you get started writing Synthetics scripts as well lots of specific examples in our community here and here. Explanations and solutions to common scripted monitor errors can be found here.

In addition to this you can refer to the reference documentation available for WebDriverJs here.

That being said, you will want to use the $browser.get function to download the file as discussed in the following thread:

One thing to note is that there is a 180s (3 min) default global timeout for script execution. If the script has not completed after 180s, the job is terminated. So larger files might timeout. In that case you will need to use a Containerized Private Minion (CPM) where this timeout can be configured when using the Containerized Private Minion by providing the MINION_CHECK_TIMEOUT on minion startup. This value must be an integer between 0 seconds (excluded) and 900 seconds (included).

Hi, @rakeshcse590: For each resource that is downloaded by a Synthetics monitor, New Relic records a SyntheticRequest event, which includes an attribute called duration containing the number of milliseconds the resource took to download.

You can create an NRQL alert condition based on a query like this:

SELECT max(duration) FROM SyntheticRequest WHERE monitorName = 'Your Monitor'

Then set the threshold to the maximum number of milliseconds you want to allow for resources to download.