Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale a data series on a Kusto timechart

I want to scale a data series on a time chart so that it is visible with the other series. The first two series represent successfully and failed requests with the 3rd series representing a customEvent of the application attempting to correct itself. All three series get plotted but the restart series is essentially a line at 0 due to the relative difference in magnitudes. The documentation for the ysplit option of the render operator suggests that axes would provide what I am looking for but none of the values seem to affect the graph.

requests
| where timestamp > ago(3d) and name has "POST /v1/validation"
| union customEvents |  where timestamp > ago(3d)
| extend Event=case(itemType == 'request' and success == "True", "Succeeded", itemType == "request" and success == "False", "Failed", "Restarted")
| summarize Count=count() by Event, bin(timestamp, 1h)
| render timechart

Here is the time chart that gets rendered with the Restarted series but the highest number within a bucket is 2 so it is essentially a flat line at the origin.

Kusto Timechart

Update 5/3

The UX client is the Application Insights Analytics widget of the Azure portal.

like image 431
Tedford Avatar asked May 02 '19 00:05

Tedford


1 Answers

Here's an example of how to use ysplit to create a custom y-axis for each series:

range timestamp from ago(3d) to now() step 1m
| extend Event = rand(100)
| extend EventCategory = case(
            Event < 80, 1, 
            Event < 99, 2,
            3)
| summarize Count=count() by tostring(EventCategory), bin(timestamp, 1h)
| render timechart with (ysplit=axes)

I can't run your query to be sure, but I would think that maybe just adding with (ysplit=axes) to the end would be enough to give you the desired behavior.

like image 156
bwmartens Avatar answered Oct 02 '22 11:10

bwmartens