SHORT VERSION: I need to create a visualization in Kibana that shows an index given as a ratio between a "sum" metric over a given period and a "filtered-count" metric over the same period. What is the best approach, if any exist?
LONG VERSION: I am recording UP/DOWN sequences about systems monitored by heartbeat "pings", in a dedicated ES index. Each document in this index is a "sequence" with the following main fields:
- sequence.status (up/down)
- sequence.continuation (0/1 boolean flag)
The latter "sequence.continuation" flag is there because at the end of each day, for each monitor name, sequences are forced to terminate and new ones are started, even if with the same status. Hence I need to recognize exactly how many "real" sequences are there, for each monitor.name in a given time period.
I would like to compute the ratio between the sum of the durations of all "UP" sequences and the number of the overall "UP" sequences in that time period, i.e. those for which the "sequence.continuation" flag is 0 (false).
Thanks for any help