<?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 can I send the data from splunk to python arguments? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-send-the-data-from-splunk-to-python-arguments/m-p/364386#M92863</link>
    <description>&lt;P&gt;You could create an alert that runs a script with either &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/Alert/Runscriptaction"&gt;the deprecated approach&lt;/A&gt; or &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/AdvancedDev/CustomAlertScript"&gt;the new approach&lt;/A&gt;.  I don't believe you can pass arguments directly to that script.  But if your arguments are in the search results, parse them out in the alert script and then call the actual script from there.  &lt;/P&gt;

&lt;P&gt;Or if you don't need/want to call the script based on some alert trigger, you could use spunk's &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog"&gt;rest api&lt;/A&gt; to just &lt;A href="https://answers.splunk.com/answers/232330/how-to-use-the-rest-api-to-just-run-a-search-and-s.html"&gt;run a search&lt;/A&gt;, then parse the results, then call your script&lt;/P&gt;

&lt;P&gt;Not sure if any of that helps, but hopefully at least points you in the right direction.&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jul 2017 12:32:08 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2017-07-01T12:32:08Z</dc:date>
    <item>
      <title>How can I send the data from splunk to python arguments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-send-the-data-from-splunk-to-python-arguments/m-p/364385#M92862</link>
      <description>&lt;P&gt;Hello everyone, i would like to ask if you guys have an idea on how can i send the data i got from splunk to python arguments? I have a splunk search that will determine the data and call/trigger the python script that have an arguments.&lt;/P&gt;

&lt;P&gt;would really appreciate your help. thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 05:32:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-send-the-data-from-splunk-to-python-arguments/m-p/364385#M92862</guid>
      <dc:creator>mrccasi</dc:creator>
      <dc:date>2017-06-27T05:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I send the data from splunk to python arguments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-send-the-data-from-splunk-to-python-arguments/m-p/364386#M92863</link>
      <description>&lt;P&gt;You could create an alert that runs a script with either &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/Alert/Runscriptaction"&gt;the deprecated approach&lt;/A&gt; or &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/AdvancedDev/CustomAlertScript"&gt;the new approach&lt;/A&gt;.  I don't believe you can pass arguments directly to that script.  But if your arguments are in the search results, parse them out in the alert script and then call the actual script from there.  &lt;/P&gt;

&lt;P&gt;Or if you don't need/want to call the script based on some alert trigger, you could use spunk's &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog"&gt;rest api&lt;/A&gt; to just &lt;A href="https://answers.splunk.com/answers/232330/how-to-use-the-rest-api-to-just-run-a-search-and-s.html"&gt;run a search&lt;/A&gt;, then parse the results, then call your script&lt;/P&gt;

&lt;P&gt;Not sure if any of that helps, but hopefully at least points you in the right direction.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jul 2017 12:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-send-the-data-from-splunk-to-python-arguments/m-p/364386#M92863</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2017-07-01T12:32:08Z</dc:date>
    </item>
  </channel>
</rss>

