# Metric to determine app pool restarts in X timeframe?

**URL:** <https://community.dynatrace.com/t/metric-to-determine-app-pool-restarts-in-x-timeframe/41952>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, services-classic\
**Created:** [October 5, 2023, 7:43pm UTC](https://community.dynatrace.com/t/metric-to-determine-app-pool-restarts-in-x-timeframe/41952 "2023-10-05T19:43:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DStockland](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@DStockland](https://community.dynatrace.com/u/DStockland)\
**Post date:** [October 5, 2023, 7:43pm UTC](https://community.dynatrace.com/t/metric-to-determine-app-pool-restarts-in-x-timeframe/41952/1 "2023-10-05T19:43:34Z")

</div>

Hello,

I have the need to determine how many times app pools have been restarted (in 30 days) across our domain in Dynatrace.&nbsp; I’ve been poking around, but cannot figure it out.&nbsp; Is there a Metric I can configure to determine this, or perhaps by filtering through logs?

Thank you!

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [October 6, 2023, 7:58am UTC](https://community.dynatrace.com/t/metric-to-determine-app-pool-restarts-in-x-timeframe/41952/2 "2023-10-06T07:58:29Z")

</div>

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

you can filter through the events for this information.

 ![mark_bley_0-1696578943354.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/1/41c4475e3416ddf1a4891cc33705ff86ca771a56.png)

using the API you can determine the timeframe and the entity it happened on

```markup
"events": [
    {
      "eventId": "6798745626705320663_1696483060541",
      "startTime": 1696483060266,
      "endTime": 1696483064123,
      "eventType": "PROCESS_RESTART",
      "title": "Process restart",
      "entityId": {
        "entityId": {
          "id": "PROCESS_GROUP_INSTANCE-04FB78E5D361DA42",
          "type": "PROCESS_GROUP_INSTANCE"
        },
        "name": "IIS app pool .NET v4.5 Classic"
      },
...

```

For each instance count them up and you have your result.

BR,

Mark
