<?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 How to get jobID or savedsearch from custom Python command in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-get-jobID-or-savedsearch-from-custom-Python-command/m-p/455771#M8296</link>
    <description>&lt;P&gt;Hello Splunk experts&lt;/P&gt;

&lt;P&gt;I'm trying to figure out what the best way to get a jobID or monitor job status for a search executed via the Splunk Web UI which is then piped &lt;CODE&gt;|&lt;/CODE&gt; to my custom command.   I'd like to ensure I am working with completed data/results, so I'm trying to do something similar to the below, which I usually do when kicking-off jobs directly from the API.  I am not sure how to pull job status/job id  information for a job that is being executed within the UI then piped | to a custom command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;while not job.is_done():
    sleep(.2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample of what my search would look  like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
|eval x=blah
|stats count by x, y 
| table y
| customCommandHere
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 23 Jul 2018 15:50:48 GMT</pubDate>
    <dc:creator>splunker1981</dc:creator>
    <dc:date>2018-07-23T15:50:48Z</dc:date>
    <item>
      <title>How to get jobID or savedsearch from custom Python command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-get-jobID-or-savedsearch-from-custom-Python-command/m-p/455771#M8296</link>
      <description>&lt;P&gt;Hello Splunk experts&lt;/P&gt;

&lt;P&gt;I'm trying to figure out what the best way to get a jobID or monitor job status for a search executed via the Splunk Web UI which is then piped &lt;CODE&gt;|&lt;/CODE&gt; to my custom command.   I'd like to ensure I am working with completed data/results, so I'm trying to do something similar to the below, which I usually do when kicking-off jobs directly from the API.  I am not sure how to pull job status/job id  information for a job that is being executed within the UI then piped | to a custom command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;while not job.is_done():
    sleep(.2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample of what my search would look  like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
|eval x=blah
|stats count by x, y 
| table y
| customCommandHere
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jul 2018 15:50:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-get-jobID-or-savedsearch-from-custom-Python-command/m-p/455771#M8296</guid>
      <dc:creator>splunker1981</dc:creator>
      <dc:date>2018-07-23T15:50:48Z</dc:date>
    </item>
  </channel>
</rss>

