Every two minutes once the "status" field records will get change and I want to count only the recent status records in Kibana visualization. Ex., The total count of status value 1 is 3 & 0 is 1. I tired with different aggregations but no luck. By using metric aggregation with bucket filter, If I choose the time filter to 2 minutes, I could get the result . But If I change the time range to last 15 minutes its counting all the last 15 minutes records. How can I get only the last recent counts even If change the time range? Any help please.
You can do this with TSVB Metric. Use count aggregation grouped by status, and on panel options make sure to set data timerange to "last value" and set your interval to 2 minutes. Notice if more than two minutes pass and there hasn't been a new document, you'll get 0 for the count.
Also the new Metric visualization can be nice and perhaps make a best use of the panel space (same configuration as table, just be sure to set the number of values in Top values to 2 to avoid unused padding):
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.