I have documents simulating ticket creation, for example:
{
"number": 12,
"created_at": "2015-07-01T12:16:17Z",
"closed_at": null,
"state": "open"
}
At some point in the future, the second document models the closing event:
{
"number": 12,
"created_at": "2015-07-01T12:16:17Z",
"closed_at": "2015-07-08T8:12:42Z",
"state": "closed"
}
Problem: I want to draw a history of open tickets. In the above example, I would like to get the number 12 to contribute to the counter as a whole from 2015-07-01to 2015-07-08timespan, What I tried:
- Bucketing with
date_histogramonly seems to be able to provide the number of tickets created or closed at any given date. - Scripting metrics only seem to allow me to modify the calculation of the metric rather than the specific bucketing of the document.
, Elastic Search Kibana, - . , , (, ), , , , .
: , , , , .