<?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: Can ITSI Maintenance mode be set from a command line as opposed to via the GUI and if so, how? in Splunk ITSI</title>
    <link>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/519102#M2164</link>
    <description>&lt;P&gt;Slight alteration - I had to add underscores in the start_time, end_time, object_type and _key to get this to work:&lt;/P&gt;&lt;P&gt;curl -k -u username:password https://localhost:8089/servicesNS/nobody/SA-ITOA/maintenance_services_interface/maintenance_calendar -X POST -H "Content-Type:application/json" -d "{\"title\":\"TEST MW\",\"start_time\":1589705600,\"end_time\":1589709600,\"objects\":[{\"object_type\":\"entity\",\"_key\":\"10bc6ede-20f5-45a8-a19f-562ffc425f69\"}]}"&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2020 15:12:31 GMT</pubDate>
    <dc:creator>nickmew</dc:creator>
    <dc:date>2020-09-11T15:12:31Z</dc:date>
    <item>
      <title>Can ITSI Maintenance mode be set from a command line as opposed to via the GUI and if so, how?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/333058#M402</link>
      <description>&lt;P&gt;I'm lazy and a creature of habit.  I do a regular weekly maintenance on our Splunk systems which necessitates setting up a bunch of maintenance windows in ITSI in advance via the GUI.  &lt;/P&gt;

&lt;P&gt;Is there a way to create an ITSI maintenance window from a command line / rest call - basically so I can set it up in CRON and get another 30 mins in bed?&lt;/P&gt;

&lt;P&gt;All I need is to be able to specify: &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Which server&lt;/LI&gt;
&lt;LI&gt;A name for the window&lt;/LI&gt;
&lt;LI&gt;A Duration&lt;/LI&gt;
&lt;LI&gt;List of impacted services or entities&lt;BR /&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 12 Apr 2018 03:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/333058#M402</guid>
      <dc:creator>pat_boyle</dc:creator>
      <dc:date>2018-04-12T03:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can ITSI Maintenance mode be set from a command line as opposed to via the GUI and if so, how?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/333059#M403</link>
      <description>&lt;P&gt;It seems the REST interface might be a way to automate this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/ITSI/3.1.4/RESTAPI/ITSIRESTAPIreference#Maintenance_Services_Interface" target="_blank"&gt;http://docs.splunk.com/Documentation/ITSI/3.1.4/RESTAPI/ITSIRESTAPIreference#Maintenance_Services_Interface&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/333059#M403</guid>
      <dc:creator>jherring_splunk</dc:creator>
      <dc:date>2020-09-29T20:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can ITSI Maintenance mode be set from a command line as opposed to via the GUI and if so, how?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/333060#M404</link>
      <description>&lt;P&gt;Use the below CURL to put Entities in Maintenance mode.&lt;/P&gt;

&lt;P&gt;Time should be in UTC.&lt;BR /&gt;
Use _key id for entities.&lt;/P&gt;

&lt;P&gt;curl -k -u admin:password &lt;A href="https://localhost:8089/servicesNS/nobody/SA-ITOA/maintenance_services_interface/maintenance_calendar" target="_blank"&gt;https://localhost:8089/servicesNS/nobody/SA-ITOA/maintenance_services_interface/maintenance_calendar&lt;/A&gt; -X POST -H "Content-Type:application/json" -d '{"title":"TEST MW","start_time":1589705600,"end_time":1589709600,"objects":[{"object_type":"entity","_key":"52f345bd-9764-4bc1-82a1-040"},{"object_type":"entity","_key":"45de7c5f-0d5f-4d50-9910-a1a"}]}'&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/333060#M404</guid>
      <dc:creator>kartikaykv1</dc:creator>
      <dc:date>2020-09-30T05:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can ITSI Maintenance mode be set from a command line as opposed to via the GUI and if so, how?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/519102#M2164</link>
      <description>&lt;P&gt;Slight alteration - I had to add underscores in the start_time, end_time, object_type and _key to get this to work:&lt;/P&gt;&lt;P&gt;curl -k -u username:password https://localhost:8089/servicesNS/nobody/SA-ITOA/maintenance_services_interface/maintenance_calendar -X POST -H "Content-Type:application/json" -d "{\"title\":\"TEST MW\",\"start_time\":1589705600,\"end_time\":1589709600,\"objects\":[{\"object_type\":\"entity\",\"_key\":\"10bc6ede-20f5-45a8-a19f-562ffc425f69\"}]}"&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 15:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Can-ITSI-Maintenance-mode-be-set-from-a-command-line-as-opposed/m-p/519102#M2164</guid>
      <dc:creator>nickmew</dc:creator>
      <dc:date>2020-09-11T15:12:31Z</dc:date>
    </item>
  </channel>
</rss>

