question

Gary R. avatar image
Gary R. asked ·

How to Scope Maintenance window by displayName in API

I'm looking to give my SysAdmins a 1 line curl script to create one-time maintenance windows for reboots. Is there a way I can set scope based on displayName rather than entityID or tags? I'm doubtful that my sysadmins will know the entityID of a host, but they will know hostname, which corresponds to displayName in our environment.

This doesn't work, but illustrates what I'm trying to accomplish:

    {
        "id":"TestAPIPlannedMW",
        "type":"Planned",
        "description":"Test MW created from API",
        "suppressAlerts":true,
        "suppressProblems":false,
        "scope":{
            "matches": {
                "type": "HOST",
                "displayName": "my-server.example.com"
            }
        },
        "schedule":{
            "type":"Once",
            "timezoneId":"America/Chicago",
            "maintenanceStart":"2018-08-01 20:00",
            "maintenanceEnd":"2018-08-01 20:05"
        }
    }

tags and metadatamaintenance window
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Wolfgang B. avatar image
Wolfgang B. answered ·

Display name filter is not possible as of today, but how about to use a tag on the host to achieve this scope?

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Gary R. avatar image
Gary R. answered ·

Short follow-up, I created an Automatic Tag to add a Host:displayName tag to hosts, and can now easily create Maintenance windows for my hosts.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Gary R. avatar image
Gary R. answered ·

Okay. I'll probably need to start tagging all me hosts with their hostname to get this working. Thanks.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Space Topics

mobile monitoring dotnet synthetic monitoring reports iis chat kubernetes servicenow amazon web services mysql mainframe rest api errors cassandra dashboard oneagent sdk cmc application monitoring openkit smartscape request attributes monitoring developer community user tagging log monitoring services ufo syntheticadvisory activegate ip addresses auto-detection high five award oracle hyperion webserver uem usql iib test automation license web performance monitoring ios news migration management zones index ibm mq web services custom event alerts notifications sso host monitoring knowledge sharing reports browser monitors java hybris sap vmware maintenance window user action naming javascript appmon ai synthetic classic availability tipstricks automation extensions session replay diagnostic tools permissions davis assistant faq documentation problem detection http monitors server easytravel apdex aws-quickstart network docker tags and metadata cloud foundry google cloud platform synthetic monitoring process groups account usability dynatrace saas gui paas openshift key user actions administration user actions postgresql synthetic locations oneagent security Dynatrace Managed user management custom python technologies mongodb openstack user session monitoring continuous delivery citrix configuration alerting NGINX action naming linux nam installation masking error reporting database mission control jmeter recorder apache mobileapp RUM php threshold azure purepath davis scripting agent aix nodejs android