cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get DB top 10 query wait states in AppD dashboard.

Hi Team,

I want to get DB top 10 query wait states in AppD dashboard. Kindly suggest.

8 REPLIES 8

Cansel.OZCAN
Architect

Hi Ashok,

I you have Analytics you can use ADQL in order create Top 10 query wait states widgetdb query.jpg

 

Thanks

Cansel

Hardik .Makwana
Creator

@Cansel.OZCAN  I have analytics, but it is still not showing. Can you please tell me the query for getting the top 10 sessions by weight widget? 

Hi Hardik,

You can use this ADQL as a simple

SELECT `wait-state-id`, (`wait-state-id`) FROM dbmon_wait_time

This query gathers data based on "wait state id" but you can change this query based on "wait state name" 

 

For Example wait state id 59 = Using CPU

CanselOZCAN_0-1713275623338.png

Thanks

Cansel

 

Hardik .Makwana
Creator

Hello Cansel,

I did the same, but it is showing me a syntax error. Please find the attachment below.Screenshot from 2024-04-17 09-48-19.pngScreenshot from 2024-04-17 10-16-45.png

Hi Hardik,

Actually, this is not a syntax error, after "FROM" you specify the data source and there is no data source like "DB5". You have to use "dbmon_wait_time" this comes from event service shards. 

 

Another thing is (sorry this is my fault ) I accidentally removed "count" before " (`wait-state-id`) " that is bolded below. Btw this query is based on a controller that has only 1 DB collector, if you have more than 1 collector you need to specify 'server-id'  column with "WHERE" clause.

SELECT `wait-state-id`, count(`wait-state-id`) FROM dbmon_wait_time

 

Thanks

Cansel

 

 

 

Hardik .Makwana
Creator

Dear Cansel, 

The query you have shared is running properly on one collector, but what if there are multiple collectors? It is showing me the wait state with its numeric IDs and giving a count for it as well. Another thing was, can I show the name of query with it's ID? Please check if the query is right or wrong because it is still not showing. One more thing, I want to let you know my setup is on prem. Please find the attachment below

Analytics 1.png

Thanks & Regards,

Hardik

Cansel.OZCAN
Architect

Hi Hardik,

The query that i sent to you is working for the whole collectors (I have only 1 collector so it is showing only 1 )  

If you have more than 1 collector you need to add "WHERE" clause with "server-id" property in order to filter your exact collector match. (you can also find which server-id is equal to which collector name via Chrome 12 Network tools. I sent you a reference screenshot) 

The query below will be useful for you to filter the exact collector,

In my example, I'm only working with a collector that server-id =4838 

CanselOZCAN_0-1713431450624.png

 

you can find your collector's server-id via Chrome-FireFox brows. developer tools like this below,

First Open you database collector via AppD controller UI below at the same time you can find the server-id detail over Browser's "Network-Response tab" 

 

CanselOZCAN_1-1713431618586.png

After finding the exact server-id property you can use this Select query below for the result

CanselOZCAN_3-1713431749312.png

 

If you want to compare result via Default dashboard widget as you can see it is also same below,

 

CanselOZCAN_4-1713431830264.png

Btw you can also find wait-stat-id explanation detail same way (over Chrome developer tool)

CanselOZCAN_5-1713431950029.png

 

If you want more detail please feel free.

 

Thanks

Cansel

 

 

 

 

 

 

Hardik .Makwana
Creator

Thank you, @Cansel.OZCAN  this information helped me alot.

On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here