# Maintenance Windows without filter is valid for the whole environment

**URL:** <https://community.dynatrace.com/t/maintenance-windows-without-filter-is-valid-for-the-whole-environment/42951>\
**Category:** Open Q&A\
**Tags:** maintenance-window\
**Created:** [November 30, 2023, 10:31am UTC](https://community.dynatrace.com/t/maintenance-windows-without-filter-is-valid-for-the-whole-environment/42951 "2023-11-30T10:31:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![agravier](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/agravier/32/29303_2.png) [@agravier](https://community.dynatrace.com/u/agravier)\
**Post date:** [November 30, 2023, 10:31am UTC](https://community.dynatrace.com/t/maintenance-windows-without-filter-is-valid-for-the-whole-environment/42951/1 "2023-11-30T10:31:14Z")

</div>

Hello,

By default, if no filter is defined, the maintenance window is valid for the whole environment.  
I would avoid a human error so I’m trying to detect maintenance windows without filters like MZ, Tags, entity names etc…

1- I don’t find any fields on entity related to the maintenance mode  
2- I don’t find any metric in Dynatrace with the number of hosts in maintenance mode state, to create an alert.  
3- Through settings API, the array filters seems to be empty when no filters are applied :

 ![AurelienGravier_0-1701339231535.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/3/63d03f841a318af2cd296b740b74b94e93b1d1a2.png)

But I can’t use the filter parameter for the fields “filters” because it’ an array :

 ![AurelienGravier_1-1701339415595.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/d/ade372678e3aed47d2c7633eda6be64a70694b32.png)

{ “error”: { “code”: 400, “message”: “Unable to parse ‘filter’ at fieldName ‘value.filters’ with fieldType ‘ARRAY’ with operator ‘=’: unsupported operator: =” } }  
And there is no operator available in doc for array :&nbsp;[Filtering and sorting | Dynatrace Developer](https://developer.dynatrace.com/platform-services/general/filtering/#datatypes-and-operators)

Please, do you have another idea to detect this behavior ?  
Before, I’m creating a dedicated python script.

Thank you

Regards Aurélien.

---

<div class="post-metadata">

**Author:** ![uros\_djukic1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/uros_djukic1/32/37084_2.png) [@uros\_djukic1](https://community.dynatrace.com/u/uros_djukic1)\
**Post date:** [November 30, 2023, 1:48pm UTC](https://community.dynatrace.com/t/maintenance-windows-without-filter-is-valid-for-the-whole-environment/42951/2 "2023-11-30T13:48:19Z")

</div>

Hello Aurelien,  
Indeed ARRAY it is not supported as field operator. Thanks for your sharing.  
The workaround I see it is to use Audit log API, in that manner you could be informed about config changes.  
And here rapidly you will find schemaId to see more details in swagger.&nbsp;  
I assume it is time-consuming action but necessary at this time.  
via Audit log :

 ![uros_djukic1_0-1701352036075.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/9/3985a571b1cadef5038885213cf32dae63f2162c.png)

My action below UI :

 ![uros_djukic1_1-1701352060645.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/9/29e32be762972416890de1bc8d98d3f7b0dc3021.png)

Thanks

---

<div class="post-metadata">

**Author:** ![agravier](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/agravier/32/29303_2.png) [@agravier](https://community.dynatrace.com/u/agravier)\
**Post date:** [December 14, 2023, 2:15pm UTC](https://community.dynatrace.com/t/maintenance-windows-without-filter-is-valid-for-the-whole-environment/42951/3 "2023-12-14T14:15:19Z")

</div>

Thank you [@uros\_djukic1](https://community.dynatrace.com/user/26886)&nbsp;, good idea but I will use a Python script which uses the settings API instead of audit logs.👍.

---

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [December 14, 2023, 8:42pm UTC](https://community.dynatrace.com/t/maintenance-windows-without-filter-is-valid-for-the-whole-environment/42951/4 "2023-12-14T20:42:07Z")

</div>

I guess the Yellow warning box wasn’t enough?

haha, sorry for the sarcasm but read the below and you’ll get it.

[https://community.dynatrace.com/t5/Product-ideas/RFE-Poka-Yoke-maintenance-windows-should-not-default-to-entire/idi-p/179316](https://community.dynatrace.com/post/179316)
