The query below gives me back a series of computed values.
I would like to plot those values in Kibana.
I think I should be able to do this in Visual Builder, but I'm stumped.
There is a calculation aggregation, but it needs an aggregation as input.
I don't have an aggregation, I have a series of documents.
GET /log-lines*/_search
{
"query": {
"bool": {
"must": [
{"match": { "server": "large.pod2.cache2.yyz.cdx-test.example.com" } }
]
}
},
"size" : 0,
"script_fields": {
"lag_seconds" : {
"script" : {
"lang": "painless",
"source" : "int lag = doc['ls-timestamp'].date.millisOfDay - doc['@timestamp'].date.millisOfDay; return ((lag < 0) ? lag + 1000 : lag) / 1000;"
}
}
}
}