# Dashboard creation with a query

**URL:** <https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064>\
**Category:** Kibana\
**Tags:** dashboard\
**Created:** [February 21, 2023, 11:58am UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064 "2023-02-21T11:58:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haneesha](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Haneesha](https://discuss.elastic.co/u/Haneesha)\
**Post date:** [February 21, 2023, 11:58am UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/1 "2023-02-21T11:58:23Z")

</div>

Hi Team,  
Could you please let me know how to create a dashboard using a query. I have a query, i am supposed to create a dashboard.  
Query:  
select type\_cd,status\_cd, count(row\_id) from siebel.s\_loy\_txn  
where TXN\_DT \>= (sysdate-1) and  
type\_cd = 'Accrual'  
group by type\_cd,status\_cd;

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [February 21, 2023, 2:45pm UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/2 "2023-02-21T14:45:44Z")

</div>

Hi @Haneesha,

Welcome to the community! Kibana dashboards are created using the UI rather than a specific query. I would check out the below sections of the query to create your first dashboard:

1. [Create your first dashboard](https://www.elastic.co/guide/en/kibana/current/create-a-dashboard-of-panels-with-web-server-data.html)
2. [Create custom tables](https://www.elastic.co/guide/en/kibana/current/lens.html#create-custom-tables)

When creating visualization panels for your dashboard you can see what query is being sent to Elastic using the Inspect option:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/4/5400a1e29c87a2fcff5bc35d93b4516bab70f5a7.png)

Hope that helps.

---

<div class="post-metadata">

**Author:** ![Haneesha](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Haneesha](https://discuss.elastic.co/u/Haneesha)\
**Post date:** [February 21, 2023, 3:10pm UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/3 "2023-02-21T15:10:13Z")

</div>

Hi Carly,  
Actually i have created multiple dashboards previously. But now instead of the log annotations which we generally use for creating a dashboard through GUI, now we have a query. Our requirement is to create a new dashboard for the query i mentioned. What should be our step to proceed. Means should we create any new conf.d file and then parse and then get logs to kibana once and then create a dashboard or what?. Could you please help.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [February 21, 2023, 4:01pm UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/4 "2023-02-21T16:01:43Z")

</div>

Hi @Haneesha,

It sounds like you are using Logstash to ingest data and then build your own dashboards. Is that correct? Can you explain a bit more about what source of logs you're trying to ingest and create a dashboard over?

---

<div class="post-metadata">

**Author:** ![Haneesha](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Haneesha](https://discuss.elastic.co/u/Haneesha)\
**Post date:** [February 21, 2023, 4:37pm UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/5 "2023-02-21T16:37:57Z")

</div>

Yes Carly.You are right. We are using filebeat, logstash, Elasticsearch and kibana. But now I just got a mail with this mentioned query saying they need dashboard for that query. Usually i create dashboard with the data already present in kibana( discover tab in GUI) . If the data is present in discover, i will just create visualisation and then dashboard. If it is not present, we will parse the data and all those grok, conf file creation follows. Then we will make dashboard. But using query i never created and in my team there is no one right now who knows regarding this to proceed. So i request you to help if you know something.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [February 22, 2023, 9:21am UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/6 "2023-02-22T09:21:09Z")

</div>

Ok, where is this query pulling data from though? Since it's SQL, is it pulling from a DB?

---

<div class="post-metadata">

**Author:** ![Haneesha](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Haneesha](https://discuss.elastic.co/u/Haneesha)\
**Post date:** [February 22, 2023, 9:43am UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/7 "2023-02-22T09:43:33Z")

</div>

Hi Carly,  
Yes. It's from DB.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [February 22, 2023, 3:07pm UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/8 "2023-02-22T15:07:27Z")

</div>

Ok, since you're familiar with Logstash, have you had a look at the [JDBC input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html) to see if that fits with what you want to do and the DB that you're using? If you pull the data into Elasticsearch you can then build dashboards on top just like you do currently with your other sources.

---

<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:** [March 22, 2023, 3:07pm UTC](https://discuss.elastic.co/t/dashboard-creation-with-a-query/326064/9 "2023-03-22T15:07:49Z")

</div>

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