<?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: When I try to create an alert with the Splunk Rest API it just makes a report instead in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447648#M7864</link>
    <description>&lt;P&gt;I ran into same exact issue. Is there a way that we can create an alert with API? What I read in the documentation is anything whatever we perform in Splunk UI can be done through API. But, I cloud not figure out yet how to make it an alert instead of a report. Any solution for this?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 15:25:34 GMT</pubDate>
    <dc:creator>chandrasekharko</dc:creator>
    <dc:date>2019-04-11T15:25:34Z</dc:date>
    <item>
      <title>When I try to create an alert with the Splunk Rest API it just makes a report instead?</title>
      <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447645#M7861</link>
      <description>&lt;P&gt;I've been playing with the different properties to see if something would trigger a report/saved search becoming an alert with no luck. Any guidance on how to create an alert via the API would be much appreciated.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;parameters = {'name': 'test-alert1',
'search': 'index="_audit"',
'description': 'test alert',
'action.email': False,
'action.email.sendresults': None,
'action.email.to': '',
'action.populate_lookup': False,
'action.rss': False,
'action.script': False,
'action.summary_index': False,
'actions': '',
"action.slack_webhook_alert.param.slack_message": "test",
"action.sn_sec_multi_incident_alert.param.shortdescription": "test",
"action.sn_sec_multi_incident_alert.param.ci": "test",
"action.sn_sec_multi_incident_alert.param.category": "Splunk",
"action.sn_sec_multi_incident_alert.param.source": "test",
"action.sn_sec_multi_incident_alert.param.priority": "3",
"action.sn_sec_multi_incident_alert.param.description": "test",
'alert.digest_mode': True,
'alert.expires': '24h',
'alert.managedBy': '',
'alert.severity': '3',
'alert.suppress': None,
'alert.suppress.fields': '',
'alert.suppress.period': '',
'alert.track': False,
'alert_comparator': 'greater than',
'alert_condition': '',
'alert_threshold': '0',
'alert_type': 'always',
'allow_skew': '0',
'auto_summarize': False,
'is_visible': '1',
'dispatch.earliest_time': '-30m',
'is_scheduled': '1',
'cron_schedule': '5 ',
'max_concurrent': '1',
"action.sn_sec_multi_incident_alert": "1",
"actions": "sn_sec_multi_incident_alert",
"action.slack_webhook_alert": "1",
"action.slack_webhook_alert.param.slack_webhook": "INSERT WEBHOOK",
"actions": "slack_webhook_alert",
"action.slack_webhook_alert": "1"
}

res = requests.post(
"https://{host}/services/saved/searches".format(host=host),
headers=headers, verify=False, data=parameters)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447645#M7861</guid>
      <dc:creator>joemaz95</dc:creator>
      <dc:date>2023-01-19T15:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: When I try to create an alert with the Splunk Rest API it just makes a report instead</title>
      <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447646#M7862</link>
      <description>&lt;P&gt;I am also running into this with Splunk 7.1.2&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 19:34:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447646#M7862</guid>
      <dc:creator>jasonsigman</dc:creator>
      <dc:date>2018-07-18T19:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: When I try to create an alert with the Splunk Rest API it just makes a report instead</title>
      <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447647#M7863</link>
      <description>&lt;P&gt;I believe the only difference between a report and an alert is whether there is an alert condition specified.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 02:04:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447647#M7863</guid>
      <dc:creator>smeier</dc:creator>
      <dc:date>2018-10-16T02:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: When I try to create an alert with the Splunk Rest API it just makes a report instead</title>
      <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447648#M7864</link>
      <description>&lt;P&gt;I ran into same exact issue. Is there a way that we can create an alert with API? What I read in the documentation is anything whatever we perform in Splunk UI can be done through API. But, I cloud not figure out yet how to make it an alert instead of a report. Any solution for this?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 15:25:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447648#M7864</guid>
      <dc:creator>chandrasekharko</dc:creator>
      <dc:date>2019-04-11T15:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: When I try to create an alert with the Splunk Rest API it just makes a report instead</title>
      <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447649#M7865</link>
      <description>&lt;P&gt;I'm not sure if this helps- but I believe that setting alert_type to "always" is what causes Splunk to consider it be a report.&lt;/P&gt;

&lt;P&gt;This answer kind of talks about it- &lt;A href="https://answers.splunk.com/answers/566648/is-there-a-way-to-convert-a-scheduled-report-to-an.html"&gt;https://answers.splunk.com/answers/566648/is-there-a-way-to-convert-a-scheduled-report-to-an.html&lt;/A&gt; maybe it will help.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 16:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/447649#M7865</guid>
      <dc:creator>smeier</dc:creator>
      <dc:date>2019-04-11T16:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: When I try to create an alert with the Splunk Rest API it just makes a report instead</title>
      <link>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/627574#M14668</link>
      <description>&lt;P&gt;You need to send a POST request with the following parameters in the body:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;name&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;P&gt;&amp;lt;ANY NAME&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;alert_comparator&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;greater than&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;alert_threshold&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;search&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;lt;YOUR SEARCH IN SPL&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;alert_type&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;number of events&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;is_scheduled&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;cron_schedule&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;YOUR CRON SCHEDULE&amp;gt;&lt;BR /&gt;Example:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*/10 * * * *&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 19 Jan 2023 13:05:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/When-I-try-to-create-an-alert-with-the-Splunk-Rest-API-it-just/m-p/627574#M14668</guid>
      <dc:creator>melkenneth03</dc:creator>
      <dc:date>2023-01-19T13:05:35Z</dc:date>
    </item>
  </channel>
</rss>

