Supports Canvas Linechart the feature seriesAgg and Group this by Terms

Is it possible to use in Canvas Linechart the Aggregation seriesAgg and Group this by Terms like available in normal TSVB Visualisation?


There are some servers sending status information to elasticsearch:

    webserver_status {type="nginx.v1", state="online"} 1
    webserver_status {type="nginx.v2", state ="online"} 2
    webserver_status {type="nginx.v1", state ="offline"} 10
    webserver_status {type="nginx.v2", state ="offline"} 10

    //5sec later
    webserver_status {type="nginx.v1", state="online"} 5
    webserver_status {type="nginx.v2", state ="online"} 6
    webserver_status {type="nginx.v1", state ="offline"} 6
    webserver_status {type="nginx.v2", state ="offline"} 6

Inside an normal dashboard I can create a time-visualization of servers in state online with the following Kibana UI, which works perfect:

Inside Canvas Linechart there is a aggTerms but there is no matching documentation available, how to use this …

means to get from my example above a Canvas line chart (similar to the TSVB visualization).
Note: I will not include the TSVB visualization in Canvas, because in TSVB there is no way to hide x and y. This is much more Comfortable in Canvas8)

You are probably looking for the ply function which is able to perform math on a column. For example | ply by="project" fn={math "mean(price)" | as "price"}. You would run the ply after SQL.

I do not recommend using the agg functions in Canvas unless you are willing to read through the source code of Kibana, as these functions are implementation details of Lens and the aggregation-based visualizations.

Got your point. I will go with ply , but additionally dig a bit into the source code.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.