30 Nov 2023 10:31 AM
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 :
But I can't use the filter parameter for the fields "filters" because it' an array :
{ "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.
Solved! Go to Solution.
30 Nov 2023 01:48 PM
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 :
My action below UI :
Thanks
14 Dec 2023 02:15 PM
Thank you @uros_djukic1 , good idea but I will use a Python script which uses the settings API instead of audit logs.👍.
14 Dec 2023 08:42 PM
I guess the Yellow warning box wasn't enough?
haha, sorry for the sarcasm but read the below and you'll get it.