I am looking for an API which will provide availability metrics of all synthetic monitors in New Relic. Is it possible to get it through New Relic API?
Hi @balamurugeshganesan and welcome to the community. You can use the NRQL below to provide a table which provides the availability statistics.
SELECT percentage(count(result), WHERE result='SUCCESS') AS '% Availability' FROM SyntheticCheck FACET monitorName
Caveat for anyone looking at this
I run ping synthetics against the endpoint every minute to get the best availability stats possible. The longer the period between synthetics runs, the greater a single failure affects the availability percentage.
hi Stefan, thanks for the query. I am looking for a query which will return apdex, %satisfied and availability for a week or month for all monitors. Above query is returning details with success rate 100%
Ah, you want an SLA report for Synthetics. In that case, the post below is exactly what you need.
yes, any idea what values i have to pass incase of ‘T’ in query?
That would be the duration for your apdex score. The documentation explains how Apdex is calculated to help you decide.
so APdex value will be set by userfor each monitor while configuring monitor in New Relic is it?
Thanks Stefan for your help, i could get the details through above query. but the details which i got through the query are not accurate. there is a slight difference between the details showed in New Relic SLA report and detials returned by
The SLA report will work for the apdex for each monitor, where the query you are using is an apdex for all of the monitors returned in the query. Obviously, if each monitor has a different apdex then your query will be out. Also the time period you set in your query with the SINCE and UNTIL keywords will also change the data that is reported on.
Welcome to the community, its so nice to see your first post here!
I hope you are well.
I see @stefan_garnham has given some amazing support here, as usual . Many thanks Stefan.
Please let us know if the guidance offered provided the help needed!
Thanks Stefan and Cody. i could get the required details through API. Now i am looking for REAL USER Metrics for all browser monitors through API. Can you suggest some references?
There are 2 ways to get Real User Metrics;
- Using NRQL - Browser/SPA NRQL query examples | New Relic Documentation
- Using REST API - Obtaining browser (end user) page load time data (v2) | New Relic Documentation
On a side note its best to keep posts focused on 1 topic / question, for different topics / questions as to avoid confusion. For additional non related questions, please create a new post in the related category.
Thanks for the details dcody. I thought itz not possible to get RUM for browser monitors.
Happy to help, to my understanding the above should work. Please do let me know if they arent successful at helping you!