# Monitor Graceful Shutdown Events in Dynatrace

**URL:** <https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, grail, hosts-classic, problems-classic\
**Created:** [September 11, 2024, 1:57pm UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604 "2024-09-11T13:57:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [September 11, 2024, 1:57pm UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/1 "2024-09-11T13:57:26Z")

</div>

_Summary:&nbsp;This post explains whether Dynatrace captures graceful shutdown events and what data is available when a service terminates. It describes relevant logs, process signals, and where to look for shutdown indicators._

Hi,

Are we getting a shutdown event in a graceful shutdown? I would like to know where I can find that event, it might be a host view, a Grail table, whatever… Do we have a way to find those events?

That shutdown event might trigger a workflow. Do you have any idea about this? Is that possible?

Thank you!

Best regards

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [September 11, 2024, 4:45pm UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/2 "2024-09-11T16:45:49Z")

</div>

Hi&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)

Wonder if pulling the last value of builtin:host.availability.state:splitBy(“availability.state”) can work for you?

 ![Yosi_Neuman_0-1726072933666.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/7/97cfb94372b90c481a8be96a90b094aca2144c3d.png)

HTH

Yos

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [September 11, 2024, 11:05pm UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/3 "2024-09-11T23:05:29Z")

</div>

Hey Anton, just tested it out in my environment, the metric mentioned above can be used as seen here:

 ![Fin_Ubels_0-1726095700791.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/c/1cccfc440a0c9fa89ba1ac32147ae7fc339d0b29.png)

You could script over the metric to ingest the changes as events but given the above requirements it would probably be easier to have the workflow run every minute and just check the metric. Unfortunately not as efficient as listening for events.

As for them as events, they were unique to my environment sorry, I had forgotten.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [September 12, 2024, 6:53am UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/4 "2024-09-12T06:53:55Z")

</div>

Hi,

Thank you!

I am trying to replicate those queries but I cannot find those events. I can see shutdown status in metric:

 ![AntonPineiro_0-1726123947111.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/52e98fc3b040bee5ecb66dd1c68cf4b094661a6b.png)

But events are empty:

 ![AntonPineiro_1-1726123959446.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/8d97d46e46b269d0654e846f8251d7e0b6502854.png)

Do you have some idea about that? Have you done some tenant configuration?

Best regards

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [September 12, 2024, 6:56am UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/5 "2024-09-12T06:56:04Z")

</div>

Hi Yos,

Thank you for your message!

I would like more an event to trigger some action immediately. It is more in relation to&nbsp;[@Fin\_Ubels](https://community.dynatrace.com/user/47376)&nbsp;answer.

Best regards

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [September 13, 2024, 12:35am UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/6 "2024-09-13T00:35:49Z")

</div>

Hey Anton, sorry I had forgotten that those events were unique to the environment I was using so they did not apply generally. Seems out of the box that the best solution is the metric. Sorry for any confusion!

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [October 15, 2024, 2:20am UTC](https://community.dynatrace.com/t/monitor-graceful-shutdown-events-in-dynatrace/47604/7 "2024-10-15T02:20:28Z")

</div>

Hey&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;it looks like this might be coming in future agent releases according to these changelogs&nbsp;[https://docs.dynatrace.com/docs/shortlink/release-notes-oneagent-sprint-301#host-availability-events-on-host-shutdown-and-reboot](https://docs.dynatrace.com/docs/shortlink/release-notes-oneagent-sprint-301#host-availability-events-on-host-shutdown-and-reboot). Not sure if this will resolve the issues you have but keep an eye out for this when it lands to see.
