4

I am trying to configure the dashboard consists few business critical functionality which we needs to focus for performance monitoring based on the SLAs.

Example a landing page url retrieves a records needs to be faster and accepted SLA is

Green < 1sec Amber 1 sec - 2 secs Red > 2 secs

We were able to configure the same in SPLUNK based on flat file logs. However we could not able to configure similar thing in Azure.

enter image description here

As of now I could not able to create a dashboard for our requirement. Any type of graphical representation is Ok for us. Based on this monitoring we might need to react and improve the performance over the period of time when it goes slow.

Developer
  • 487
  • 9
  • 28
  • 1
    Not sure if I misunderstood you: suppose in a time range(like 1 day), if the average response time of the url_1 is less than 1s, then in the graph shows it's fine etc. Is it correct? – Ivan Glasenberg Feb 12 '20 at 09:49
  • @IvanYang, yes. For a single request url average time for last 24 hours goes more than 2 it is not good as per SLA. So we need to monitor on daily basis to act on it, if its continuously more than 2 secs. I am not sure it can be done using Log Analytics with Kusto scripting . Syntax looks difficult – Developer Feb 12 '20 at 11:16
  • You can try using Serverless360 API monitoring and I guess it provides the requirement you are looking for. – Nadeem Duke Feb 15 '20 at 19:33
  • why are you using average time and not 75th or 95th or 99th percentiles ? – biswpo Feb 19 '20 at 11:24

3 Answers3

4

You can use the below Kusto query in application insights:

requests 
| where timestamp > ago(2h) //set the time range
| where url == "http://localhost:54917/" //set the url here
| summarize avg_time =avg(duration)
| extend my_result = case(
avg_time<=1000,"good", //1000 milliseconds
avg_time<=2000,"normal",//2000 milliseconds
"bad"
)

Note:

1.the unit of avg_time is milliseconds

2.when avg_time <=1000 milliseconds, then in dashboard, it shows "good"; when <=2000 milliseconds, it shows "normal"; when >2000 milliseconds, it shows "bad".

The query result(change it to Chart):

enter image description here

Then in dashboard:

enter image description here

Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60
  • Is it possible to change the chart type and somehow show where it is sitting in the SLA levels? We do this in SPLUNK and now we are looking some what similar in Log Analytics. We have around 15 url/dashboard to monitor, – Developer Feb 13 '20 at 08:19
  • @Developer, you mean something looks like the picture in your post? I'll take a try, but not sure if can figure it out. – Ivan Glasenberg Feb 13 '20 at 08:33
  • Yes. It need not to be same picture, but somehow it needs to be visualized where it fits in a given Range of times :) Thanks a lot for helping! – Developer Feb 13 '20 at 10:23
  • @Developer, hello, after some researching, I didn't find there're any doc / functions / solutions. Sorry for that:(. – Ivan Glasenberg Feb 17 '20 at 05:20
4

An approximated solution which can serve your purpose

use request time vs time char along with reference lines which can be your SLA thresholds So you can figure out at this moment the response time is below or above the threshold

// Response time trend // Chart request duration over the last 12 hours requests | where timestamp > ago(12h) | summarize avgRequestDuration=avg(duration) by bin(timestamp, 10m) // use a time grain of 10 minutes | render timechart | extend Green = 200 | extend Amber = 400 | extend red = 800

it would look something like below

enter image description here

I think it is much more useful than your previous UI, which has kind of a meter like feel that gives you health indication at that moment, but with continuous time plot you get better picture of the trend

biswpo
  • 771
  • 7
  • 23
0

If you run the same query in Azure Workbooks, you could use the "thresholds" renderer in grids or tiles to format cells with if/then/else like that for color for each range.

thresholds

would get you: thresholds in a grid

you can then pin that grid/tiles/graph to an azure dashboard. (if the query uses a workbooks time range parameter, it will inherit the dashboard's time range and auto update as well.

John Gardner
  • 24,225
  • 5
  • 58
  • 76