Kibana: Line Graph from a JSON Array

I’ve messages in Elasticsearch in the following format:

{
  "root": {
    "attributes": {
      "attribute1": {
        "trends": [47.0, 47.0, 47.0, 47.0, 47.0, 47.0, 62.0, 62.0, 63.0, 63.0, 485.0]
      }, 
      "attribute2": {
        "trends": [0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  180.0]
      }
    },    
    "updateTimes": ["2020-05-03T13:08:08.967Z", "2020-05-03T13:08:09.217Z", "2020-05-03T13:08:09.234Z", "2020-05-03T13:08:09.116Z", "2020-05-03T13:08:08.889Z", "2020-05-03T13:08:09.766Z", "2020-05-03T13:08:09.783Z", "2020-05-03T13:08:09.486Z", "2020-05-03T13:08:37.594Z", "2020-05-03T13:08:37.750Z", "2020-05-03T13:09:11.378Z"],
    "id": "1234"
  }
}

I need to create a Line chart that shows trending values from the JSON array called, ‘trends’. In other words, ‘atrribute1’ will have its own Line Graph that shows trends & ‘attribute2’ will have its own. In the first version I don’t need to worry about the ‘updateTimes’ but if somehow I can show the value against its ‘updateTime’ that would be even better.

I tried using Line Graph but it only uses ‘aggregates’. Also tried ‘Timelion’ but couldn’t get it to work. Any help will be greatly appreciated. Thanks.

This is not possible in Kibana as it doesn't really support arrays. There is an open issue but there hasn't been any traction as Kibana fits more flattened data and it creates the aggregated data (like in your arrays) in ES by itself.
You could probably display that data with a custom Vega visualization or with Canvas.

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