I'm trying to use event data generated by a Sensu monitoring server to calculate environment availability. I've used a date histogram to place the events into 1 minute buckets which seems to work as expected. I'm struggling with the last piece of the Jigsaw to count the number of buckets created, giving me my total minutes downtime.
Unless I'm missing something, I'd need to use the pipeline aggregations in 2.0 to do any kind of calculation across buckets but from what I can see even they don't provide a method of counting buckets. I'm new to elasticsearch so I may be missing something obvious.
Can anybody make any suggestions?