<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Monaco: Maintenance Window Creation Automation in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283254#M2310</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would say creating a unique identifier each time.&lt;/P&gt;&lt;P&gt;Or not using Monaco, make direct calls to API, I think you do not to play with IDs in that way.&lt;/P&gt;&lt;P&gt;Or using workflows to call CMDB, get data, and create maintance windows.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Thu, 07 Aug 2025 07:24:23 GMT</pubDate>
    <dc:creator>AntonPineiro</dc:creator>
    <dc:date>2025-08-07T07:24:23Z</dc:date>
    <item>
      <title>Monaco: Maintenance Window Creation Automation</title>
      <link>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283171#M2309</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello, I am seeking assistance with the following challenge we are encountering.&lt;/P&gt;&lt;H1&gt;Context&lt;/H1&gt;&lt;P&gt;Our goal is to automate the creation of maintenance windows (MW). We receive MW requests through our CMDB, which we can extract as JSON, and then use this data to create MWs in Dynatrace.&lt;/P&gt;&lt;P&gt;We started implementing this using Monaco within a Python script, which successfully deploys a MW.&lt;/P&gt;&lt;H1&gt;Current Logic of the Script&lt;/H1&gt;&lt;P&gt;The script loops through the MWs in the JSON file extracted from our CMDB. For each MW, it sets the appropriate values as environment variables for Monaco to use with the &lt;EM&gt;mw.yaml&lt;/EM&gt; file shown below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mw.yaml" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/29405iF9BAC366B8120340/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mw.yaml.png" alt="mw.yaml" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;mw.yaml&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The &lt;EM&gt;mw.json&lt;/EM&gt; file shown below contains the configuration values needed for each MW, depicted below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mw.json" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/29406i5BD4EE6223F36169/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mw.json.png" alt="mw.json" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;mw.json&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;H1&gt;Problem We Encounter&lt;/H1&gt;&lt;P&gt;Since the &lt;EM&gt;maintenanceWindowId&lt;/EM&gt; (&lt;EM&gt;id&lt;/EM&gt; in &lt;EM&gt;mw.yaml&lt;/EM&gt;) is static, each iteration creates and deploys the same actual MW in Dynatrace—essentially updating the same existing MW rather than creating new ones. This is because,&amp;nbsp;to my understanding, the &lt;EM&gt;id&lt;/EM&gt; is specific to Monaco CLI as a unique reference to a specific Dynatrace entity.&lt;/P&gt;&lt;H1&gt;My Questions&lt;/H1&gt;&lt;UL&gt;&lt;LI&gt;What workaround exists for this?&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Can I make the &lt;EM&gt;id&lt;/EM&gt; dynamic, similar to how other parameters are dynamically updated between iterations by changing the corresponding environment variable?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Is Monaco suitable for this kind of use case?&lt;UL&gt;&lt;LI&gt;Is performing direct calls to Dynatrace's API a better approach?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Note that a possible solution could be editing the &lt;EM&gt;mw.yaml&lt;/EM&gt; file during each iteration to assign a unique identifier. However, I prefer to keep&lt;EM&gt; mw.yaml&lt;/EM&gt; as a generic template, and writing to a file each time isn't very time-efficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your consideration. Please don't hesitate to ask if you need any additional information about the script setup.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 11:17:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283171#M2309</guid>
      <dc:creator>Jordi2</dc:creator>
      <dc:date>2025-08-06T11:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Monaco: Maintenance Window Creation Automation</title>
      <link>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283254#M2310</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would say creating a unique identifier each time.&lt;/P&gt;&lt;P&gt;Or not using Monaco, make direct calls to API, I think you do not to play with IDs in that way.&lt;/P&gt;&lt;P&gt;Or using workflows to call CMDB, get data, and create maintance windows.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 07:24:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283254#M2310</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2025-08-07T07:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Monaco: Maintenance Window Creation Automation</title>
      <link>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283283#M2311</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your feedback.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have implemented it using the API instead of Monaco and, indeed, this removes the&amp;nbsp;&lt;EM&gt;id&amp;nbsp;&lt;/EM&gt;problem.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 10:53:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Monaco-Maintenance-Window-Creation-Automation/m-p/283283#M2311</guid>
      <dc:creator>Jordi2</dc:creator>
      <dc:date>2025-08-07T10:53:06Z</dc:date>
    </item>
  </channel>
</rss>

