Hi,
I've created a Metric visualization with 2 metrics:
Top hit aggregation on "name" field that I have
Count aggregation
On top of that I created a filter to get only the results from the recent minute.
So, I get a count of the distinct names that were present in the recent minute.
Furthermore, I had to exclude some of these results by a "status" field - I wanted to get the count of the distinct names with that status "error" only.
So I added a Buckets Terms aggregation with include "ERROR".
It works well, but when there are no suitable results at all, I get "no results found" in the visualization, which looks quite ugly. I'd like it to show 0. How can I achieve that?
Is it possible in the metric visualization? If not, is there another visualization that can meet my needs?
Hi @Chenlrv can you please tell me if you used the TSVB metric visualization or a standard metric visualization or you created one on Canvas?
If you can send me also the version of Kibana you are running I can take a look and see if this is actually a bug or something that we haven't think of
Can you also send me the current configuration on the editor, I'm not sure I've 100% understood how you are configuring this and in particular where you used the top hit aggregation and the terms one.
Because if you are looking to have a metric that describes the number of unique faulty devices, you can simply have a unique count metric aggregation and then apply a filter on the error status code.
I'm also seeing that you are specifying also another time filter last minute and I think that will not produce the wanted result. I think this can be achieved with TSVB metric visualization as described in this other reply: Get visualization of missing data
I expect that if there are no such results, the metric will show 0 and not "no results found", that's the desired behavior. How can I achieve that? I use last minute filter because I want to show the number of devices that got status error in the last minute
@markov00 I tried the TSVB metric as you suggested, indeed it almost meets all of my needs - it does show count 0 when there are no results, but the font is too small, and could not find a way to make it bigger.. in the metric visualization the font size is customizable, we want it to look very big.
What you can do is to use the same TSVB configuration and use Markdown, you should be able to print out your text and change the css style for that increasing the font size as you prefer.
Could you please create an enhancement request for the font style/size of TSVB metric here so we can see if we can put that on our roadmap https://github.com/elastic/kibana/issues/new?template=Feature_request.md
@markov00 Markdown also lets me change the background color depends on the count number? I want to background color to be green on 0 and to be red when bigger than 0.
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.