<?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: Custom Alert reaction with Python in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473995#M8477</link>
    <description>&lt;P&gt;Works fine. Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2020 14:09:05 GMT</pubDate>
    <dc:creator>flk2309</dc:creator>
    <dc:date>2020-02-20T14:09:05Z</dc:date>
    <item>
      <title>Custom Alert reaction with Python</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473991#M8473</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I want to trigger a a Python script as reaction to an alert. I have added the stanza to alert_actions.conf and restarted Splunk:&lt;/P&gt;

&lt;P&gt;[myscript]&lt;BR /&gt;
is_custom = 1&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
label = myscript&lt;BR /&gt;
description = myscript&lt;BR /&gt;
track_alert = 1&lt;BR /&gt;
ttl         = 600&lt;BR /&gt;
maxtime     = 5m&lt;BR /&gt;
icon_path = alert_manager_icon.png&lt;BR /&gt;
payload_format = xml&lt;BR /&gt;
filename    = myscript.py&lt;BR /&gt;
alert.execute.cmd = /opt/splunk/etc/apps/bla/bin/myscript.py&lt;/P&gt;

&lt;P&gt;In the spunkd log I find the following entry:&lt;/P&gt;

&lt;P&gt;02-19-2020 13:25:39.278 +0100 ERROR ModularUtility - Specified filename "..." not found in search path.&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;But the script is definitely there. Kindly help me to find out what I´m missing.&lt;/P&gt;

&lt;P&gt;Best Regards Falko&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473991#M8473</guid>
      <dc:creator>flk2309</dc:creator>
      <dc:date>2020-09-30T04:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Alert reaction with Python</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473992#M8474</link>
      <description>&lt;P&gt;Just try with below configurations in alert_actions.conf.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[myscript]
is_custom = 1
disabled = 0
label = myscript
description = myscript
track_alert = 1
ttl = 600
maxtime = 5m
icon_path = alert_manager_icon.png
payload_format = xml
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473992#M8474</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-19T15:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Alert reaction with Python</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473993#M8475</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;thank you. This works fine. &lt;/P&gt;

&lt;P&gt;Another question I have now is, how can I trigger this alert manually to develop the script? When I run it in the search, the script is not triggered. Is there any way?&lt;/P&gt;

&lt;P&gt;Thanks and best regards&lt;/P&gt;

&lt;P&gt;Falko&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 12:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473993#M8475</guid>
      <dc:creator>flk2309</dc:creator>
      <dc:date>2020-02-20T12:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Alert reaction with Python</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473994#M8476</link>
      <description>&lt;P&gt;Is you script reading any inputs?&lt;/P&gt;

&lt;P&gt;If not you can use sendalert command to trigger this alert action.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;your_search&amp;gt; | sendalert myscript
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Feb 2020 13:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473994#M8476</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-20T13:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Alert reaction with Python</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473995#M8477</link>
      <description>&lt;P&gt;Works fine. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 14:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473995#M8477</guid>
      <dc:creator>flk2309</dc:creator>
      <dc:date>2020-02-20T14:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Alert reaction with Python</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473996#M8478</link>
      <description>&lt;P&gt;You are welcome. Please accept the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 14:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Alert-reaction-with-Python/m-p/473996#M8478</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-20T14:26:49Z</dc:date>
    </item>
  </channel>
</rss>

