SLA report show multiple URL monitors

I have referenced this guide for assistance but still not get the end result i’m looking for.
https://docs.newrelic.com/docs/synthetics/new-relic-synthetics/pages/synthetics-sla-report-aggregate-monitor-metrics

the query is below,

SELECT uniques(monitorName), average(duration), apdex(duration, t: 7),percentage(count(*), WHERE result !='SUCCESS') FROM SyntheticCheck FACET monthOf(timestamp) SINCE 1 month ago.

this is the result I receive. How do I get it to formation like a report?

the result just displayed
({
“facets”: [
{
“name”: “December 2015”,
“results”: [
{
“members”: [
“INT - Service One”,
“CUWEB - secure Swcredit”,
“INT - Countryfirst”,
“LEG - AMCU”,
“CUWEB - FCCS”,

Hi @rajones

It is the uniques(monitorName) causing you the problem. I think this is what you are after:

SELECT average(duration), apdex(duration, 7), percentage(count(*), WHERE result='SUCCESS') FROM SyntheticCheck FACET monitorName SINCE 1 month ago

An alternative grouped by date:

SELECT average(duration), apdex(duration, t:7), percentage(count(*), WHERE result='SUCCESS') FROM SyntheticCheck FACET dateOf(timestamp) SINCE 1 month ago

However, I notice that the Apdex values returned are 0.00 on my metrics, not sure if that is a bug.

Hi thanks for the reply, this query is nearly there. I get same result for apdex, with a couple that have 0.26. I’m not fussed about this field, what I would like is the % uptime so we can see which sites didn’t meet SLA of 95.9% uptime. Althought it doesn’t appear to bring back the 125 monitors.

If you want to see all monitors then you need to add LIMIT 125 on the end of the query.

There are more queries available in the Insights Query Library

1 Like

Thanks, I have also read your library link, which I have added the % Uptime field. Now I just need a sort option for the Uptime field show the items less than 100% from the top. Looking at the forum there doesn’t appear to be an option to sort is that correct?
Ray

Correct, there is currently no ORDER BY equivalent. The results are ordered by the first column selected.

1 Like

Awesome work @stefan_garnham

Order is by TIMESTAMP as Insights is a realtime environment, so you have the latest data first always. That said Timestamp is pretty much the first column always :smile:

The only time Timestamp isn’t the first is when faceting by an attribute or doing maths on a query and in this case as @stefan_garnham is still 100% on the money.