<?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: unable to run python scripted alert in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191674#M12414</link>
    <description>&lt;P&gt;this is already the case&lt;/P&gt;</description>
    <pubDate>Fri, 22 Aug 2014 13:35:45 GMT</pubDate>
    <dc:creator>sbsbb</dc:creator>
    <dc:date>2014-08-22T13:35:45Z</dc:date>
    <item>
      <title>unable to run python scripted alert</title>
      <link>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191672#M12412</link>
      <description>&lt;P&gt;I've made a scripted alert in python, and put it in py app directory&lt;BR /&gt;
.../splunk/etc/apps/myapp/bin/scripts/scripted_alert.py&lt;/P&gt;

&lt;P&gt;in  .../splunk/var/log/splunk/python.log I see that it has been triggered with the correct path, and parameters :&lt;BR /&gt;
2014-08-22 14:37:01,178 INFO ['.../splunk/etc/apps/myapp/bin/scripts/scripted_alert.py', '1', '| stats c | eval ...&lt;/P&gt;

&lt;P&gt;When I try to execute it with&lt;BR /&gt;
&lt;CODE&gt;.../splunk/bin/splunk cmd python .../splunk/etc/apps/myapp/bin/scripts/scripted_alert.py'&lt;/CODE&gt; with all the parameters from the python.log, it is working...&lt;/P&gt;

&lt;P&gt;It seems that splunk is not taking the python interpreter ?&lt;BR /&gt;
But in my file header I have&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!.../splunk/bin/python
# -*- coding: utf-8 -*-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(... is a substitution / I'm using Splunk 5.0.5)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 12:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191672#M12412</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2014-08-22T12:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: unable to run python scripted alert</title>
      <link>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191673#M12413</link>
      <description>&lt;P&gt;Most likely your hash bang is off. I believe in this case the full path should work better. if that is a typical Splunk unix install try:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;#!/opt/splunk/bin/python&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 22 Aug 2014 12:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191673#M12413</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2014-08-22T12:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: unable to run python scripted alert</title>
      <link>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191674#M12414</link>
      <description>&lt;P&gt;this is already the case&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 13:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/unable-to-run-python-scripted-alert/m-p/191674#M12414</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2014-08-22T13:35:45Z</dc:date>
    </item>
  </channel>
</rss>

