Splunk AppDynamics

JMX stuckthreads metric?

CommunityUser
Splunk Employee
Splunk Employee

We have a need to send a notification (setup a health rule and policy) when "stuckthreads" occur on a JVM. I opened an AppDynamics support ticket and they simply replied that is not possible. If that is a true then that seems to be a huge deficiency with AppDynamics. Stuck threads seem basic and common enough that there should be a way to track and alert on them. Stuck threads are usually reported by JMX but not in numeric form.

I've search for an answer on how I can get a stuck thread metric to report on and haven't been able to find anything. Anyone know how to get a stuck thread metric or otherwise report and alert on stuck threads?

Labels (1)
0 Karma
1 Solution

Brian_Wheeldon
Contributor

1. Some application servers provide a "stuck threads" JMX metric in numerical form. If this metric is available, the AppDynamics Java agent can collect it, baseline it, run rules on it and allow you to build dashboards and reports that visualize it. https://docs.appdynamics.com/display/PRO43/Configure+JMX+Metrics+from+MBeans

2. The normal impact of "stuck threads" is the business transaction that triggered the stuck thread blocks for a long period of time. This will be automatically detected as a "Stalled" transaction. The AppDynamics agent will collect a snapshot that includes a stack trace indicating the method where the request stalled. https://docs.appdynamics.com/display/PRO43/Slow+Response+Times

3. If the thread is stuck due to deadlocked threads, this will automatically be detected by the agent and an event generated: https://docs.appdynamics.com/display/PRO43/Code+Deadlocks+for+Java

4. The AppDynamics Java Agent automatically detects and monitors Thread Contention: https://docs.appdynamics.com/display/PRO43/Thread+Contention

This set of capabilities should address the use case of detecting and diagnosing stuck threads.

Regards,

Brian Wheeldon 

View solution in original post

0 Karma

Brian_Wheeldon
Contributor

1. Some application servers provide a "stuck threads" JMX metric in numerical form. If this metric is available, the AppDynamics Java agent can collect it, baseline it, run rules on it and allow you to build dashboards and reports that visualize it. https://docs.appdynamics.com/display/PRO43/Configure+JMX+Metrics+from+MBeans

2. The normal impact of "stuck threads" is the business transaction that triggered the stuck thread blocks for a long period of time. This will be automatically detected as a "Stalled" transaction. The AppDynamics agent will collect a snapshot that includes a stack trace indicating the method where the request stalled. https://docs.appdynamics.com/display/PRO43/Slow+Response+Times

3. If the thread is stuck due to deadlocked threads, this will automatically be detected by the agent and an event generated: https://docs.appdynamics.com/display/PRO43/Code+Deadlocks+for+Java

4. The AppDynamics Java Agent automatically detects and monitors Thread Contention: https://docs.appdynamics.com/display/PRO43/Thread+Contention

This set of capabilities should address the use case of detecting and diagnosing stuck threads.

Regards,

Brian Wheeldon 

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I hoped that there was a way to transpose the stuck thread string value to a numeric value so I could alert on it directly, but I'll give your methods a try and see if it will suffice. Thanks, Brian, for the solution.

0 Karma
Get Updates on the Splunk Community!

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...