Line chart from field values and sum

Hi,

I am newbie to ELK and I have able to work on the queries, but need help with Kibana Visualization for line chart value extracted from fields.

Here is the document and I would like to prepare a line chart with 4 lines from values extract from fields (dist,dcs,cap,distltocap) and line sum of all four values and groupby UniqueID. Each document has unique ID with values for these fields. Could you please advise?

{
"_index": "intodisk-2017.06.23",
"_source": {
"dist": 76,
"dcs": 3,
"cap": 2,
"distltocap": 1,
"UniqueID": "8751256",
"@timestamp": "2017-06-23T19:58:11.195Z",
"host": "linuxget1",
"time": "23/06/2017 15:58:10",
},
"fields": {
"@timestamp": [
1524513491195
]
},
"sort": [
1524513491195
]
}

I would like to prepare a line chart with 4 lines from values extract from fields (dist,dcs,cap,distltocap)

You should be able to do this by adding metrics on the Y axis. You will need to select something like, Max, Min, Sum, or average because you could get multiple documents in the same bucket chosen for the x-axis. If there is only a single doc in each bucket, then it shouldn't matter which of these metrics you select.

and line sum of all four values and groupby UniqueID.

You can create a new field that sums all values by creating a painless scripted field. Something like:

Hi,

Thanks for the replay. I am able to use the expression provided and able to plot the values after calculating the sum. Just a question, how can I tag or represent each value with corresponding UniqueID in the chart?

Thanks,
Maddy

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