# How to alert for java thread counts?

**URL:** <https://community.dynatrace.com/t/how-to-alert-for-java-thread-counts/14695>\
**Category:** Alerting\
**Tags:** problems-classic, java\
**Created:** [August 13, 2018, 9:11am UTC](https://community.dynatrace.com/t/how-to-alert-for-java-thread-counts/14695 "2018-08-13T09:11:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muthukumar\_peri](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/muthukumar_peri/32/8740_2.png) [@muthukumar\_peri](https://community.dynatrace.com/u/muthukumar_peri)\
**Post date:** [August 13, 2018, 9:11am UTC](https://community.dynatrace.com/t/how-to-alert-for-java-thread-counts/14695/1 "2018-08-13T09:11:49Z")

</div>

Hi All,

I’m looking on setting up alerts for java thread counts in Dynatrace? Is there any way we can do that?

Regards

Muthu

---

<div class="post-metadata">

**Author:** ![nj\_njoku](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nj_njoku/32/13710_2.png) [@nj\_njoku](https://community.dynatrace.com/u/nj_njoku)\
**Post date:** [August 13, 2018, 3:10pm UTC](https://community.dynatrace.com/t/how-to-alert-for-java-thread-counts/14695/2 "2018-08-13T15:10:19Z")

</div>

Hi Muthu,

You should be able to do this with a Custom Alert under **Settings → Anomaly Detection → Custom Alerts**. You will set the **scope** to **Process** and select the metric **JVM Thread count.** You should be able to set the threshold for what you will like to be alerted on for this metric.

Thanks

NJ

---

<div class="post-metadata">

**Author:** ![muthukumar\_peri](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/muthukumar_peri/32/8740_2.png) [@muthukumar\_peri](https://community.dynatrace.com/u/muthukumar_peri)\
**Post date:** [August 13, 2018, 3:22pm UTC](https://community.dynatrace.com/t/how-to-alert-for-java-thread-counts/14695/3 "2018-08-13T15:22:52Z")

</div>

Thanks, NJ.

Regards,

Muthu

---

<div class="post-metadata">

**Author:** ![manish\_bachu](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@manish\_bachu](https://community.dynatrace.com/u/manish_bachu)\
**Post date:** [December 3, 2018, 11:17am UTC](https://community.dynatrace.com/t/how-to-alert-for-java-thread-counts/14695/4 "2018-12-03T11:17:27Z")

</div>

how can we do the same for JVM hung thread?
