I have a problem and I can't figure out how I could achieve this.
Every few minutes some orders get finished.
And I want to show how many are finished after 5 mins, after 10 mins, and so on.
So the x axis would be the time and y axis would be the sum of finished orders from start time.
Hi, how is your data structured? Do you get a document when order starts and one when order ends, or just a single one for the whole order? what fields would you have in your document?
Then it should be pretty straightforward:
You can map: "labels.order_end - labels.order_start" on one axis and count on the other. That calculation can be done in multiple ways:
Best way: when you update the order_end field, add/update a duration field.
TSVB math aggregation: you can do the difference there, when you have both fields, but you need to make sure first that you do checks for the label.order_end field existing first.
Scripted field: same as before, you need to do the checks and you can create your own duration field.
I was not specific on the x axis. I don't want the duration, I want the time ( @timestamp ).
So e.g. at 18:00 we have 0 orders finished, at 18:10 we have 10, then 15, and so on.
Here I got something, but I can't choose @timestamp, only the timestamp in us, which is pretty ugly:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.