2

I'm having a problem with the analytics tools, specifically the Analytics inside Application Insights as well as the Logs analytics inside a Log Analytics workspace. Regardless of query or chart type, when I specify with(ymin=x, ymax=y) values to the render function those values are ignored.

Example query:

Heartbeat
| summarize heartbeatPerHour = count() by bin_at(TimeGenerated, 1m, ago(30d)), Computer
| extend availablePerHour = iff(heartbeatPerHour > 0, true, false)
| summarize totalAvailableHours = countif(availablePerHour == true) by Computer 
| extend availabilityRate = totalAvailableHours*100.0/(1440 * 30)
| extend MeetsSLA = availabilityRate > 99.9
| project Computer, availabilityRate 
| render barchart with(title="Last 30 Days Availability (DEMO)", ymin=0, ymax=100)

In this particular case the expeced values are between 2-3% uptime because the system's only been logging for a day yet the query covers a month. Yet the resulting graph has a range of 0-3 instead of the requested 0-100. There doesn't seem to be an "automatic range" option that I need to turn off; by all accounts including MS's documentation this should just work, yet it isn't. Result from example:

Screen cap of query with rendered graph

I've tried this with queries from App Insights as well as from a Log Analytics workspace. I've tried this with multiple browsers.

Am I doing something wrong, or is this a fault within the system that I should talk to MS about?

Slavik N
  • 4,705
  • 17
  • 23
Robb Bromley
  • 41
  • 1
  • 3
  • 1
    The top note in the render operator documentation (https://learn.microsoft.com/en-us/azure/kusto/query/renderoperator) mentions "User agents might not render results as instructed, depending on their support for the required rendering instructions.". Probably Log Analytics doesn't support these properties. You might have better luck if you ask here: https://techcommunity.microsoft.com/t5/Azure-Log-Analytics/bd-p/AzureLogAnalytics – Claudiu Guiman Feb 21 '19 at 14:52
  • Thanks! I'll give that a shot and update this if anything comes of it. – Robb Bromley Feb 22 '19 at 20:06
  • Just following up. The tech community didn't have much in the way of answers. I can make the graph give me the range I want, but only if I artificially include data near the desired lower end. I suspect the chart library is just ignoring these settings completely. – Robb Bromley Mar 29 '19 at 14:16
  • @RobbBromley how can i add an artificial value ? i have a query that only has values 1, 2 but the y axis in the chart starts from 1 and goes like this till 2 (1, 1.2, 1.4, 1.6, 1.8, 2). I wanted it to start at 0 and can be either 0, 1, 2 or 0, 0.5, 1, 1.5. – gopi nath Feb 06 '20 at 19:33
  • @RobbBromley, are you still having this issue? – Tomer Shetah Jan 31 '21 at 19:35

1 Answers1

0

For some reason Microsoft have hidden away a feature most would want in a sub-menu, even if you have enough screen space. You can change the axis range and other things by:

  1. Creating a metrics chart and clicking to edit it (but after you've exited Edit view, because that's logical) Create a new metrics chart

As you can see, we have a chart with over 100% availability. We can change that though.

  1. Click on the three-dots and Chart Settings. Click on the three-dots menu

  2. Change the Max value and the chart will update instantly Update Max value

Red
  • 3,030
  • 3
  • 22
  • 39