How to fetch 2x top hit values from 2 different indexes' documents in one table?

Hi
I have 2 x Elasticsearch indexes and I've made one Kibana index using the * wildcard index name.

I'd like to present 2 top hit (latest) values in a table; one value from each Elasticsearch index - so these are 2 different documents that I want to query.

Quite simply, Kibana fetches the latest document and then presents one Top Hit value (which exists in that document), and a "-" character in place of the other value.

By setting a filter of _index: a or b, I can toggle which value is shown.

My question, can I use the "JSON input" or other solution to show the Top Hit (latest) value for each metric, where each metric is filtered to it's respective Elastic index? Can I get an example of how to do this, please?

Thanks in advance!
Mark

anyone able to help here, please?

Hi @Mark_Duncan,

Not sure if this is helpful, but instead of creating * index, have you considered creating 2 separate visualisations (e.g. of type Metric), 1 for each index, and then display a top hit there.

And then put those 2 visualisations side by side in a dashboard?

Thanks Dosant.
Yeah, I can of course do that. Thank you.
I am, however, trying to place the 2 metrics in the same table. I am actually using an "Enhanced Table" visualisation which is a plugin. It then allows me to calculate another metric in a new column by calculating Top Hit a x Top Hit b.

But my blocker remains getting the 2 top hit values into one table from 2 different indexes.

Cheers
Mark

Aha I think I have this resolved now :slight_smile:
Kibana was working as I'd hoped; the result was a tiny number and not being displayed with enough decimals for it to show up!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.