I’m trying to perform something similar to SQL inner join operation across 3 ES indices (3 different ES datasources in grafana) having a same field in all these indices that captures unique values. The trick that I thought of is using templating option on ES datasource A, having “Include All Options” in the Selection Options in templating.
- Template 1- $sessionA
Then in the second query I use a different index (ES datasource B) but use something like sessionid:$sessionA to filter only these sessions. Then I keep these sessions in another template.
- Template 2- $sessionB (this would be a subset of sessions from ES datasource A)
After this, I want to filter sessions in ES datasource C which are in $sessionB (this would be a subset of sessions from ES datasource B). The entire process is carried out to create a subset and get a count of the number of sessions at all the three datasources.
Expected Result: Count of (ES datasource A sessions >= ES datasource B sessions >= ES datasource C sessions).
Questions:
-
Even after selecting ‘All’ option in the template dropdown, it looks like the entire data isn’t considered while getting data in second template. Is there a limit on the number of values being listed in the dropdown?
-
Is this the right way of performing joins operation?
Any inputs on this would be appreciated!