<?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: How to disable an email alert for a single saved search through CLI or Rest API? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211129#M3758</link>
    <description>&lt;P&gt;Is a Splunk restart required after making this call? &lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2017 13:38:12 GMT</pubDate>
    <dc:creator>pretzel2</dc:creator>
    <dc:date>2017-12-18T13:38:12Z</dc:date>
    <item>
      <title>How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211124#M3753</link>
      <description>&lt;P&gt;I am trying to automate the silencing and un-silencing of a single email alert. Is there a way to do this through the CLI or the Rest API? I have yet to find a way that has worked.&lt;/P&gt;

&lt;P&gt;I need to be able to do this either via the command line or through a very simple application.&lt;/P&gt;

&lt;P&gt;I am currently trying to use curl. I have tried the following command: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8089/servicesNS/&amp;lt;user&amp;gt;/&amp;lt;app&amp;gt;/saved/searches/&amp;lt;search" target="test_blank"&gt;https://localhost:8089/servicesNS/&amp;lt;user&amp;gt;/&amp;lt;app&amp;gt;/saved/searches/&amp;lt;search&lt;/A&gt; name&amp;gt; -d "is_scheduled=false"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However it returns:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;response&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;msg type="ERROR"&amp;gt;
 In handler 'savedsearch': Cannot find saved search with name '&amp;lt;search name&amp;gt;' .&amp;lt;/msg&amp;gt;
  &amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I started looking through the savedsearches.conf of the user and the search that was there is now gone and is not present in any of the other savedsearches.conf files on my server yet it shows up in the web portal.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 20:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211124#M3753</guid>
      <dc:creator>csimp2033</dc:creator>
      <dc:date>2016-04-20T20:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211125#M3754</link>
      <description>&lt;P&gt;You could possibly re-write the config using &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTREF/RESTconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTREF/RESTconf&lt;/A&gt; and then fire off a debug/refresh.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 04:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211125#M3754</guid>
      <dc:creator>dolivasoh</dc:creator>
      <dc:date>2016-04-21T04:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211126#M3755</link>
      <description>&lt;P&gt;I attempted this and I could not figure out a way to get this to work.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 17:26:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211126#M3755</guid>
      <dc:creator>csimp2033</dc:creator>
      <dc:date>2016-04-21T17:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211127#M3756</link>
      <description>&lt;P&gt;I figured it out. The reason that the curl command was not working was because the search was in the nobody user's saved search conf file rather than the user that created the saved search. Also the -d "is_scheduled=false" needed to be -d "is_scheduled=0"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:32:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211127#M3756</guid>
      <dc:creator>csimp2033</dc:creator>
      <dc:date>2020-09-29T09:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211128#M3757</link>
      <description>&lt;P&gt;You need to use -d actions="". &lt;/P&gt;

&lt;P&gt;Example this creates the search with alert:&lt;/P&gt;

&lt;P&gt;curl -ku admin:matteo &lt;A href="https://127.0.0.1:8089/servicesNS/admin/search/saved/searches/" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/admin/search/saved/searches/&lt;/A&gt; -d name=zzzsrch  -d search=* -d is_scheduled=1 -d cron_schedule="*/2 * * * *" -d actions=email -d action.email.to="&lt;A href="mailto:zzz@ssss.com" target="_blank"&gt;zzz@ssss.com&lt;/A&gt;" | grep -E "action.email\"|action.email.to"&lt;/P&gt;

&lt;P&gt;This disable the alert:&lt;/P&gt;

&lt;P&gt;curl -ku admin:matteo &lt;A href="https://127.0.0.1:8089/servicesNS/admin/search/saved/searches/zzzsrch" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/admin/search/saved/searches/zzzsrch&lt;/A&gt;  -d actions="" | grep -E "action.email\"|action.email.to"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211128#M3757</guid>
      <dc:creator>mzorzi</dc:creator>
      <dc:date>2020-09-29T13:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211129#M3758</link>
      <description>&lt;P&gt;Is a Splunk restart required after making this call? &lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 13:38:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211129#M3758</guid>
      <dc:creator>pretzel2</dc:creator>
      <dc:date>2017-12-18T13:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable an email alert for a single saved search through CLI or Rest API?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211130#M3759</link>
      <description>&lt;P&gt;for disabling/enabling an alert, no not at all.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-disable-an-email-alert-for-a-single-saved-search-through/m-p/211130#M3759</guid>
      <dc:creator>shawngarrettsgp</dc:creator>
      <dc:date>2017-12-18T15:54:54Z</dc:date>
    </item>
  </channel>
</rss>

