Create a maintenance window to tell Dynatrace when you expect planned, non-standard operation. Dynatrace enriches telemetry with maintenance metadata during the window. Use maintenance windows to share maintenance context with your team, suppress notifications, avoid automated actions, and keep availability calculations accurate.
You have an IAM policy that allows write access to the builtin:maintenance-windows schema:
ALLOW settings:objects:read, settings:objects:write, settings:schemas:readWHERE settings:schemaId = "builtin:maintenance-windows";
If you plan to use custom scheduling rules or calendars, create them before configuring the maintenance window:
You can create a maintenance window either in the Dynatrace web UI or via API.
Go to Settings > General > Maintenance windows.
Select New maintenance window.
Enter the basic details such as the maintenance window Name and Description.
Select Next.
Configure the schedule. Your options depend on whether the window repeats.
Select Next.
Enter the Scope filter criteria so only matching telemetry is marked as under maintenance in the Maintenance Scope field. Start entering text in the field to get suggestions. Select Preview to preview the data. Under Preview results, you can find a list of event types you can enrich with metadata.
Select Save to save the maintenance window and verify that it appears in the Maintenance windows table as Active.
If you create a recurring maintenance window, ensure that the required scheduling rule and calendar are already available.
Send a POST request to api/v2/settings/objects.
In the request body, set:
schemaId to builtin:maintenance-windowsscope to environmentIn value, define the basic details, schedule configuration, and filter criteria.
Submit the request and store the returned object ID for updates.
Verify that the new maintenance window is in the table under Settings > General > Maintenance windows. The window is set to Active by default.
If you create a recurring maintenance window, use the same shared scheduling rules and calendars as in the web UI flow.
You can pause a maintenance window without losing its configuration, or remove it entirely. Neither action stops a window that is already running; it continues until its configured end time.
Go to Settings > General > Maintenance windows.
Find the maintenance window in the list.
Choose one of the following:
To pause the window without deleting it, update the window's state via the Settings API.
To delete a maintenance window, send a DELETE request to api/v2/settings/objects/{objectId}.
Apply the filter criteria to target the telemetry you want to mark as maintenance. Use common Grail primary fields and Grail primary tags so your filter criteria work consistently.
The UI provides a filter field that converts your input to DQL matcher syntax automatically. For the API and configuration as code, use the DQL matcher syntax directly.
The examples below show common filter patterns that you can adapt to scope a maintenance window to specific entities, tags, or Grail primary fields.
Define filter criteria for a specific Kubernetes cluster (Grail primary fields):
k8s.cluster.name = k8s-02
Define filter criteria for an Azure resource group (Grail primary fields):
azure.resource.group = my-resource-group
Define filter criteria by environment (using Grail primary tags):
primary_tags.environment = staging
Define filter criteria for a host:
host.name = HOST-CWS-4-IG-1-HG-200001
Define filter criteria for a host group (Grail primary fields):
dt.host_group.id = host-group-1234
Define filter criteria for a process:
dt.smartscape.process = PROCESS-00970A58C3D6A4AE
Define filter criteria for a service:
dt.smartscape.service = SERVICE-01B5009DAFF92605
Define filter criteria for an HTTP check:
dt.entity.http_check = HTTP_CHECK-0A77C3D2E1F82B5A
Define filter criteria for a Synthetic test:
dt.entity.synthetic_test = SYNTHETIC_TEST-0B44D7A3C2E91F67
Define filter criteria for a frontend:
frontend.name = easytravel-frontend
Define filter criteria for data coming from an extension:
device = mysql-postgresql:5432:DemoDatabase
Combined example using AND:
k8s.cluster.name = k8s-02 AND primary_tags.environment = staging
Combined example using OR:
k8s.cluster.name = k8s-01 OR k8s.cluster.name = k8s-02
Filter multiple values using IN:
primary_tags.environment IN (staging, production, testing)