<?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: errors in custom alert action in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/errors-in-custom-alert-action/m-p/474212#M9630</link>
    <description>&lt;P&gt;Place python script &lt;STRONG&gt;splunk2alc.py&lt;/STRONG&gt; in /opt/splunk/etc/apps/mlbso/bin/ and alert_actions.conf with below configurations in /opt/splunk/etc/apps/mlbso/default.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [splunk2alc]
 is_custom = 1
 disabled = 0
 label = Splunk2ALC
 description = Send Alert to Alc
 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:29:19 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2020-02-19T15:29:19Z</dc:date>
    <item>
      <title>errors in custom alert action</title>
      <link>https://community.splunk.com/t5/Alerting/errors-in-custom-alert-action/m-p/474211#M9629</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We created a custom alert action as per documentation and try to trigger it.&lt;BR /&gt;
We get the following errors:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2/19/20
4:01:42.547 PM  
02-19-2020 16:01:42.547 +0100 ERROR SearchScheduler - Error in 'sendalert' command: Alert action script for action "splunk2alc" not found., search='sendalert splunk2alc results_file="/opt/splunk/var/run/splunk/dispatch/scheduler__d038423__mlbso__RMD5782cf4a2b848fa26_at_1582124460_1760/results.csv.gz" results_link="https://splunk-ml.zone1.mo.sap.corp:443/app/mlbso/@go?sid=scheduler__d038423__mlbso__RMD5782cf4a2b848fa26_at_1582124460_1760"'
host = mo-7ee963859.zone1.mo.sap.corpsource = /opt/splunk/var/log/splunk/splunkd.logsourcetype = splunkd
2/19/20
4:01:42.546 PM  
02-19-2020 16:01:42.546 +0100 ERROR sendmodalert - Error in 'sendalert' command: Alert action script for action "splunk2alc" not found.
host = mo-7ee963859.zone1.mo.sap.corpsource = /opt/splunk/var/log/splunk/splunkd.logsourcetype = splunkd
2/19/20
4:01:42.546 PM  
02-19-2020 16:01:42.546 +0100 ERROR sendmodalert - action=splunk2alc - Failed to find alert.execute.cmd "python".
host = mo-7ee963859.zone1.mo.sap.corpsource = /opt/splunk/var/log/splunk/splunkd.logsourcetype = splunkd
2/19/20
4:01:42.544 PM  
02-19-2020 16:01:42.544 +0100 INFO  sendmodalert - Invoking modular alert action=splunk2alc for search="Crash Dump Alert ALC - AlertAction" sid="scheduler__d038423__mlbso__RMD5782cf4a2b848fa26_at_1582124460_1760" in app="mlbso" owner="d038423" type="saved"
host = mo-7ee963859.zone1.mo.sap.corpsource = /opt/splunk/var/log/splunk/splunkd.logsourcetype = splunkd
2/19/20
4:01:38.316 PM  
02-19-2020 16:01:38.316 +0100 DEBUG sendmodalert - action=alert_manager - Token value action.splunk2alc=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Our alect_actions.conf looks as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[splunk2alc]
is_custom = 1
disabled = 0
label = Splunk2ALC
description = Send Alert to Alc
track_alert = 1
ttl         = 600
maxtime     = 5m
icon_path = alert_manager_icon.png
payload_format = xml
alert.execute.cmd = python
alert.execute.cmd.arg.0 = /opt/splunk/etc/apps/mlbso/bin/splunk2alc.py
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;under the alert.execute.cmd we have tried already quite some combinations, like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME$/bin/python
$SPLUNK_HOME/bin/python
/opt/splunk/bin/python
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All throw same error.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/errors-in-custom-alert-action/m-p/474211#M9629</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-02-19T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: errors in custom alert action</title>
      <link>https://community.splunk.com/t5/Alerting/errors-in-custom-alert-action/m-p/474212#M9630</link>
      <description>&lt;P&gt;Place python script &lt;STRONG&gt;splunk2alc.py&lt;/STRONG&gt; in /opt/splunk/etc/apps/mlbso/bin/ and alert_actions.conf with below configurations in /opt/splunk/etc/apps/mlbso/default.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [splunk2alc]
 is_custom = 1
 disabled = 0
 label = Splunk2ALC
 description = Send Alert to Alc
 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:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/errors-in-custom-alert-action/m-p/474212#M9630</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-19T15:29:19Z</dc:date>
    </item>
  </channel>
</rss>

