We don't really have a robust query building mechanism in our standard metric visualization.
It's not clear to me exactly what you're trying to build, but it sounds like something you can probably use TSVB to build.
As a last resort, generally speaking, you can run almost any Elasticsearch query in Vega. Vega can be a bit tricky (you've got to understand Vega, Elasticsearch, and the way Kibana uses Vega).
I will describe you the concrete use case: We have applicants for jobs. Some applicants may apply for more than one job within our system, let's call them "recurring applicants" (as "recurring customers"). We would like to display not just the count of unique applicants (as we do using a Unique count), but also the unique count of recurring applicants. I have an ES query that yields this number, but there's no way for me to display it in Kibana (using a Metric visualization).
On the other hand, I imagine that Vega is flexible enough to produce it, but then I have understood that Kibana filters won't apply in the Vega plots.
I have looked at TSVB visualization but I was not obvious for me how to proceed with it. Would you have a more concrete suggestion.
If my understanding is right, this is not yet possible, but because of entirely understandable reasons, there's a plan of allowing something similar in the future:
Quoting from that blog:
We also see saved queries as a building block for some other powerful features. Imagine being able to create filters in the filter bar based on saved queries, giving us an easy way to combine existing queries. In a similar vein, we could develop a syntax for referencing saved queries inside a KQL expression. That would allow for effortless reuse of saved queries in places where a query text input is available without the full search bar, like the filters aggregation in Visualize. Having a way to save a portable set of filters in Kibana will open up all kinds of possibilities.
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.