cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maintenance Windows without filter is valid for the whole environment

AurelienGravier
DynaMight Pro
DynaMight Pro

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

But I can't use the filter parameter for the fields "filters" because it' an array :

AurelienGravier_1-1701339415595.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 : 
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.

 

Observability consultant - Dynatrace Associate/Pro/Services certified
3 REPLIES 3

uros_djukic1
Dynatrace Advisor
Dynatrace Advisor

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. 
I assume it is time-consuming action but necessary at this time.
via Audit log : 

uros_djukic1_0-1701352036075.png

My action below UI : 

uros_djukic1_1-1701352060645.png

Thanks

AurelienGravier
DynaMight Pro
DynaMight Pro

Thank you @uros_djukic1 , good idea but I will use a Python script which uses the settings API instead of audit logs.👍.

Observability consultant - Dynatrace Associate/Pro/Services certified

ct_27
DynaMight Pro
DynaMight Pro

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-defaul... 

HigherEd

Featured Posts