# Query on multiple indexes and generate the dashboard in Kibana

**URL:** <https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433>\
**Category:** Kibana\
**Created:** [April 17, 2021, 12:11am UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433 "2021-04-17T00:11:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaay\_kannan\_Vr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajaay_kannan_vr/32/87205_2.png) [@ajaay\_kannan\_Vr](https://discuss.elastic.co/u/ajaay_kannan_Vr)\
**Post date:** [April 17, 2021, 12:11am UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433/1 "2021-04-17T00:11:52Z")

</div>

My requirement is to build Dashboards to monitor the transaction flow between Two system with middleware as interface to connect both the systems. Each event is captured in elastic search indexes.  
**System 1**  
**Interface (Middleware)**  
**System 2**

Sample Transaction flow as below:  
Step1:  
System 1 -\> Interface -\> System 2  
Step2:  
System 2 -\> Interface -\> System 1

Sample Log:  
Step1:  
System1 Log -\> {"TxnRef": "12345","System1Status":"TxnPlaced","System1TimeStamp":"dd:mm:yyyy hh:mm:ss"}  
Interface Log-\> {"TxnRef":"12345","InterfaceStatus":"Interfaced2System2","dd:mm:yyyy hh:mm:ss"}  
System 2 Log -\> {"TxnRef": "12345","System2Status":"TxnProcessed","System2TimeStamp":"dd:mm:yyyy hh:mm:ss"}

Use Case1:  
How do i build a query to get the latest status based on the status above example i need to retrieve the result as TxnProcessed for transaction ref 12345  
Expected Results:  
TxnRef: 12345  
Status: TxnProcessed

Use Case2:  
To get the processing time between each processing to identify the lagging processing

System1 to Interface timetaken = Interface Timestamp - System 1 TimeStamp  
Interface to System2 processing = System 2 Timestamp - Interface Timestamp

Overall Processing Time = System2 Timestamp - System1 Timestamp

Kibana dashboard to be built based on the status  
Example: Dashboard 1 Transaction with status as "TxnPlaced"  
Dashboard 2 Transaction with status as "Interfaced2System2"  
Dashboard 3 Transaction with status as "TxnProcessed"

I need your suggestion on how to achieve this case in elastic search. Hope i have explained to some extent on my requirement.

---

<div class="post-metadata">

**Author:** ![Felix\_Roessel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felix_roessel/32/41623_2.png) [@Felix\_Roessel](https://discuss.elastic.co/u/Felix_Roessel)\
**Post date:** [April 17, 2021, 6:52pm UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433/2 "2021-04-17T18:52:47Z")

</div>

What you need to do is to create a transform job that is calculating your use cases and storing that result in a separate index.  
Then you use that index to visualize the results.

---

<div class="post-metadata">

**Author:** ![ajaay\_kannan\_Vr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajaay_kannan_vr/32/87205_2.png) [@ajaay\_kannan\_Vr](https://discuss.elastic.co/u/ajaay_kannan_Vr)\
**Post date:** [April 18, 2021, 12:54am UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433/3 "2021-04-18T00:54:06Z")

</div>

Thanks for your reply Felix\_Roessel. Since I’m pretty new to elasticsearch please give some more insights on transform of index option available in elastic search or need to create api outside to do transformation.

---

<div class="post-metadata">

**Author:** ![Felix\_Roessel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felix_roessel/32/41623_2.png) [@Felix\_Roessel](https://discuss.elastic.co/u/Felix_Roessel)\
**Post date:** [April 18, 2021, 3:57am UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433/4 "2021-04-18T03:57:30Z")

</div>

Here you find everything you need

> **[Transforming data | Elasticsearch Guide \[7.x\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/transforms.html)**

Let me know if you have further questions

---

<div class="post-metadata">

**Author:** ![ajaay\_kannan\_Vr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajaay_kannan_vr/32/87205_2.png) [@ajaay\_kannan\_Vr](https://discuss.elastic.co/u/ajaay_kannan_Vr)\
**Post date:** [April 18, 2021, 11:44pm UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433/5 "2021-04-18T23:44:06Z")

</div>

Thanks for your quick reply.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 16, 2021, 11:44pm UTC](https://discuss.elastic.co/t/query-on-multiple-indexes-and-generate-the-dashboard-in-kibana/270433/6 "2021-05-16T23:44:51Z")

</div>

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