none
Custom query with summarized by automatic time granularity RRS feed

  • Question

  • I've created a custom query that I want to put in a dashboard as a line chart. It appears that if I don't use a where clause to filter on timestamp that the chart uses the time range specified in the dashboard, which is what I want and it works great. However, it appears that I have to specify in my query what the summarized timestamp granularity is otherwise I just get one time series data point. I would prefer this be automatic based on the time range selected in the dashboard as well though. Is there a way to do this? Here is a fairly simplified version of my query:

    requests
    | extend Type=tostring(split(url, "/")[4])
    | where split(url, "/")[2] == "api.relish.com"
    | where split(url, "/")[3] == "v1"
    | summarize Duration=avg(duration) by Time=bin(timestamp, 5m), Type
    | render timechart


    Friday, May 10, 2019 8:25 PM

Answers

  • I think I figured it out on my own. It appears that I just need to summarize by the timestamp without using the bin function. If there is anything I'm missing, or a better way to do this, please let me know.

    requests
    | extend Type=tostring(split(url, "/")[4])
    | where split(url, "/")[2] == "api.relish.com"
    | where split(url, "/")[3] == "v1"
    | summarize Duration=avg(duration) by Time=timestamp, Type
    | render timechart

    Friday, May 10, 2019 8:35 PM