<?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: no events returning for any search jobs (api call) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16085#M1885</link>
    <description>&lt;P&gt;Yeah, I confused by this too the first time I tried to search via the REST API.&lt;/P&gt;

&lt;P&gt;I think it's easier to understand based on the new UI in Splunk 4 than it was in 3.x.&lt;/P&gt;

&lt;P&gt;If you run a search from the UI, there are three different tabs you can switch between.  The first two show you your "events"  ("Event list", and "Event table" modes), and the final tab is the "Results table".&lt;/P&gt;

&lt;P&gt;So basically your "events" are untransformed events.  This includes the &lt;CODE&gt;_time&lt;/CODE&gt; and &lt;CODE&gt;_raw&lt;/CODE&gt; fields.  Generally this is anything that happens before a &lt;CODE&gt;stats&lt;/CODE&gt; or &lt;CODE&gt;chart&lt;/CODE&gt; search command.   The "results" are only available if you do some sort of transformation and would only include the fields explicitly listed in your &lt;CODE&gt;stats&lt;/CODE&gt; command, for example.&lt;/P&gt;

&lt;P&gt;To make matters worse, it seems that sometime the terms "events" and "results" are used interchangeably.&lt;/P&gt;

&lt;P&gt;If you are running 4.1, you can use the 'Job Inspector' to see the different between these 2.  Look for the entry &lt;CODE&gt;eventSearch&lt;/CODE&gt; vs the &lt;CODE&gt;reportSearch&lt;/CODE&gt;.  There is also field called &lt;CODE&gt;search&lt;/CODE&gt; that shows the combination of both of these, and I think will always match your actual search string.&lt;/P&gt;

&lt;P&gt;Another gotcha here is that if you are doing a transformation on your events and running the search from the UI than you can see both the events and the results.  I don't think it works this way by default for REST searches.  Try setting &lt;CODE&gt;status_buckets=300&lt;/CODE&gt; when you submit your search job.  (This is similar to the way a saved search runs vs running a search interactively.... It's more efficient for splunk NOT to keep both event and results when it doesn't have to.  There can be a big savings by simply not extracting all the fields when splunk knows their aren't going to be used.)&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2010 01:34:58 GMT</pubDate>
    <dc:creator>Lowell</dc:creator>
    <dc:date>2010-06-25T01:34:58Z</dc:date>
    <item>
      <title>no events returning for any search jobs (api call)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16084#M1884</link>
      <description>&lt;P&gt;i am not recieving any xml for /services/search/jobs/&lt;CODE&gt;&amp;lt;sid&amp;gt;&lt;/CODE&gt;/events&lt;/P&gt;

&lt;P&gt;... but i get xml for /services/search/jobs/&lt;CODE&gt;&amp;lt;sid&amp;gt;&lt;/CODE&gt;/results&lt;/P&gt;

&lt;P&gt;I'm not sure i entirely understand the difference between the two... but this endpoint doesn't seem to work for ANY search.&lt;/P&gt;

&lt;P&gt;halp?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2010 20:07:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16084#M1884</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-06-24T20:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: no events returning for any search jobs (api call)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16085#M1885</link>
      <description>&lt;P&gt;Yeah, I confused by this too the first time I tried to search via the REST API.&lt;/P&gt;

&lt;P&gt;I think it's easier to understand based on the new UI in Splunk 4 than it was in 3.x.&lt;/P&gt;

&lt;P&gt;If you run a search from the UI, there are three different tabs you can switch between.  The first two show you your "events"  ("Event list", and "Event table" modes), and the final tab is the "Results table".&lt;/P&gt;

&lt;P&gt;So basically your "events" are untransformed events.  This includes the &lt;CODE&gt;_time&lt;/CODE&gt; and &lt;CODE&gt;_raw&lt;/CODE&gt; fields.  Generally this is anything that happens before a &lt;CODE&gt;stats&lt;/CODE&gt; or &lt;CODE&gt;chart&lt;/CODE&gt; search command.   The "results" are only available if you do some sort of transformation and would only include the fields explicitly listed in your &lt;CODE&gt;stats&lt;/CODE&gt; command, for example.&lt;/P&gt;

&lt;P&gt;To make matters worse, it seems that sometime the terms "events" and "results" are used interchangeably.&lt;/P&gt;

&lt;P&gt;If you are running 4.1, you can use the 'Job Inspector' to see the different between these 2.  Look for the entry &lt;CODE&gt;eventSearch&lt;/CODE&gt; vs the &lt;CODE&gt;reportSearch&lt;/CODE&gt;.  There is also field called &lt;CODE&gt;search&lt;/CODE&gt; that shows the combination of both of these, and I think will always match your actual search string.&lt;/P&gt;

&lt;P&gt;Another gotcha here is that if you are doing a transformation on your events and running the search from the UI than you can see both the events and the results.  I don't think it works this way by default for REST searches.  Try setting &lt;CODE&gt;status_buckets=300&lt;/CODE&gt; when you submit your search job.  (This is similar to the way a saved search runs vs running a search interactively.... It's more efficient for splunk NOT to keep both event and results when it doesn't have to.  There can be a big savings by simply not extracting all the fields when splunk knows their aren't going to be used.)&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 01:34:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16085#M1885</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-25T01:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: no events returning for any search jobs (api call)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16086#M1886</link>
      <description>&lt;P&gt;Thank you. This helps a lot. It still raises my eyebrow... but it points me in a good direction.  Thanks Lowell.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 19:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16086#M1886</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-06-25T19:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: no events returning for any search jobs (api call)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16087#M1887</link>
      <description>&lt;P&gt;It may also help to poke around in the &lt;CODE&gt;$SPLUNK_HOME/var/run/splunk/dispatch/&amp;lt;jobid&amp;gt;&lt;/CODE&gt; folders.  There you should can see what splunk is actually storing for a given search job.  For example, you'll see the results in &lt;CODE&gt;results.csv.gz&lt;/CODE&gt; and your events in the &lt;CODE&gt;events&lt;/CODE&gt; folder along with other files that correspond to the various endpoints.  (Of course just browsing the endpoints with a browser can be helpful too.)&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 20:08:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/no-events-returning-for-any-search-jobs-api-call/m-p/16087#M1887</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-25T20:08:52Z</dc:date>
    </item>
  </channel>
</rss>

