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.
Sensu only creates an event when a check fails and I believe the default behaviour is to only create buckets when there is at least 1 document in the bucket. So if I have 3 events, each at 5 minute check intervals and I use a date histogram with 1 minute intervals, I'll get 15 buckets. I think
Obviously the whole strategy fails because I can't find a way to count the buckets without writing some code to do it.
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.