SLA Report Using NRQL with Previous Month Data

Hi, I am trying to Add SLA Report in NRQL Insight Dashboard. Trying to merge the SLA report for last two months together by following two queries.
SELECT percentage(count(result), WHERE result = ‘SUCCESS’) AS ‘% Availability’ FROM SyntheticCheck SINCE last month UNTIL this month FACET monitorName
SELECT percentage(count(result), WHERE result = ‘SUCCESS’) AS ‘% Availability’ FROM SyntheticCheck SINCE this month FACET monitorName

What’s the question?

I need to merge result of both queries in same dashboard chart

Sorry, but what is the question about merging them into the same dashboard? What problem or issue are you having getting it to display the way you want.

@Ferdine.silva I see your last request was around merging results of the queries. Are you still needing assistance with this?

Hi Joi, Yes I am still looking for a two months report in same Chart/Table analysis.
E.g: September and August Data.

Hi @Ferdine.silva - You can achieve the merged data by changing your query.

SELECT percentage(count(result), WHERE result='SUCCESS' As '%Availability' FROM SyntheticCheck SINCE last month FACET monthOf(timestamp), monitorName

This will give you a table with the percentage for each monitor broken down by month. You can change the FACET around to get the results in the format you need.

2 Likes

Thanks @stefan_garnham, but I am looking for a comparison of two months data in two fields so that we can project how well we are doing good than previous month for reports.

We’ve tried to get more information about your problem. Often in the forums we are trying to help people that have a problem and want help figuring out how to do something. That’s sort of a give and take kind of thing. It’s harder in a forum when people are just requesting others to complete their task. We don’t know exactly how you want this formed and how to help you fish.

Can you mock up what you are wanting exactly in a graphic and try to tell us where you need help based on where you are finding a challenge with NRQL etc?

I can probably just give you something, but I personally would want to truly help you. If you read this thread from top to bottom its hard to know what you really wanted and having requirements change due to lack of information makes it hard for us to help efficiently or keep interest.

2 Likes

SELECT (filter(count(*), where monthOf(timestamp) = 'August 2020' and result ='SUCCESS') / filter(count(*), where monthOf(timestamp) = 'August 2020') * 100) or 0 as 'August', (filter(count(*), where monthOf(timestamp) = 'September 2020' and result ='SUCCESS') / filter(count(*), where monthOf(timestamp) = 'September 2020') * 100) or 0 as 'September', (((filter(count(*), where monthOf(timestamp) = 'September 2020' and result ='SUCCESS') / filter(count(*), where monthOf(timestamp) = 'September 2020') * 100) or 0) - ((filter(count(*), where monthOf(timestamp) = 'August 2020' and result ='SUCCESS') / filter(count(*), where monthOf(timestamp) = 'August 2020') * 100) or 0)) as 'Change from last month' from SyntheticCheck facet monitorName since '2020-08-01 00:00:00 EST' limit max

1 Like

Hey there @Ferdine.silva - Just checking in to see how you are doing with this query. I know it can be hard to find the right way to ask about what you need when you are learning New Relic and NRQL. Did you figure it out?