I use the ELK stack to monitor many Java services, and more precisely, I use the input JST file to enter data into Elasticearch.
In one of them, I get the number of messages received by my service since the service started. So this is an incremental value, and I would like to create a graph with the number of received messages / seconds.
In the source data, I have the following data:
{
"metric_value_number": 1633157,
"hostname": "server1",
"metricsName": "ExchangesCompleted"
},
{
"metric_value_number": 1633811,
"hostname": "server1",
"metricsName": "ExchangesCompleted"
},
{
"metric_value_number": 1634512,
"hostname": "server1",
"metricsName": "ExchangesCompleted"
}
I would like for each document to calculate the delta between its value and the value of the document in front of it.
In my example, I want:
1633157 - 0 = 1633157
1633811 - 1633157 = 654
1634512 - 1633811 = 701
And draw the result of this operation.
I can not find a way to do this. Most of the time, people use the script field in the kiban, but they always perform the operation between the fields of the SELF document, and I want to do this with another document.
: ,
- ?
,
.