<?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 do I run a real-time subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48708#M11630</link>
    <description>&lt;P&gt;Hi Jason, did you see my comment above to use a lookup instead?&lt;/P&gt;

&lt;P&gt;You could perform your realtime search first, then use a lookup of the static data to fill out the results with whatever you want from the static list of app info.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2013 10:09:46 GMT</pubDate>
    <dc:creator>mbenwell</dc:creator>
    <dc:date>2013-03-05T10:09:46Z</dc:date>
    <item>
      <title>How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48702#M11624</link>
      <description>&lt;P&gt;I am trying to join in some status information in real-time against a static list of data, but getting an error when setting my subsearch to real time: &lt;CODE&gt;invalid value "rt-1h" for time term 'earliest'&lt;/CODE&gt; What's going wrong here?&lt;/P&gt;

&lt;P&gt;(reason: I have a static list of apps in one index, and need the status from a log line in another. The status might not be there - in that case I have to assume the app is down - so I need the static list of apps to join against.)&lt;/P&gt;

&lt;P&gt;Search: (all time, as app listing could be quite old)&lt;BR /&gt;
index=applisting | table app | join type=outer app [search index=appstatus earliest=rt-1h latest=rt | dedup app | table app status]&lt;/P&gt;

&lt;P&gt;From this &lt;A href="http://splunk-base.splunk.com/answers/1336/does-specifying-real-time-earliestlatest-values-in-the-search-bar-work-for-anyone"&gt;answer&lt;/A&gt; it looks like they're not meant to be used. So how does one kick off a real-time search from the search bar?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 16:22:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48702#M11624</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-03-01T16:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48703#M11625</link>
      <description>&lt;P&gt;You don't.&lt;/P&gt;

&lt;P&gt;The result of a subsearch is used as a parameter for the main search, and is therefore run first. Real-time searches do not finish, hence cannot be used as a subsearch. You get a hint from splunk when you select a real-time window from the time picker and run a search with a subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[subsearch]: Subsearches of a real-time search run over all-time unless explicit time bounds are specified within the subsearch.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2013 16:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48703#M11625</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-01T16:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48704#M11626</link>
      <description>&lt;P&gt;Disappointing. Then how does one join up a real time data stream, that may or may not contain the status of the app, with a static list of apps so the report looks the same (doesn't have holes for nulls)?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 06:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48704#M11626</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-03-04T06:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48705#M11627</link>
      <description>&lt;P&gt;Put the static list in a non-rt subsearch?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 06:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48705#M11627</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-04T06:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48706#M11628</link>
      <description>&lt;P&gt;Could you flip the search around and use a lookup instead?&lt;/P&gt;

&lt;P&gt;Maybe you could perform the rt search and then use a lookup to pull more detailed app data.  I think that would mean a lookup file instead of an index for applisting&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 07:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48706#M11628</guid>
      <dc:creator>mbenwell</dc:creator>
      <dc:date>2013-03-04T07:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48707#M11629</link>
      <description>&lt;P&gt;Last I checked the join command doesn't have a right join (meaning, always include all members of the subsearch, whether or not they exist in the main search). I think I tried outer join but it would not include any items from the static list where they did not exist in the main list, so outer join is really a left join, not a full outer join.&lt;/P&gt;

&lt;P&gt;Maybe I should try with an append and a stats rather than a join.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 09:50:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48707#M11629</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-03-05T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48708#M11630</link>
      <description>&lt;P&gt;Hi Jason, did you see my comment above to use a lookup instead?&lt;/P&gt;

&lt;P&gt;You could perform your realtime search first, then use a lookup of the static data to fill out the results with whatever you want from the static list of app info.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 10:09:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48708#M11630</guid>
      <dc:creator>mbenwell</dc:creator>
      <dc:date>2013-03-05T10:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48709#M11631</link>
      <description>&lt;P&gt;Unfortunately | inputlookup "is not supported by real time search"&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 11:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48709#M11631</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-03-05T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48710#M11632</link>
      <description>&lt;P&gt;Nope, tried inputlookup, but it's evidently "not supported" by realtime search&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 23:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48710#M11632</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-03-05T23:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48711#M11633</link>
      <description>&lt;P&gt;I found a way to do it that works but is obviously not ideal.&lt;/P&gt;

&lt;P&gt;index=applisting | table app | join type=outer app [search index=appstatus earliest=-1h latest=+2y | dedup app | table app status]&lt;/P&gt;

&lt;P&gt;As new data arrives it updates the primary search. Not sure how a 2 year forward looking subsearch will go with performance hit as the months go by though.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2013 03:56:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48711#M11633</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2013-09-27T03:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48712#M11634</link>
      <description>&lt;P&gt;If you do it the other way its much more reliable : You dont need your app list to be in real-time&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=appstatus earliest=rt-1h latest=rt | dedup app | table app| join type=outer app [search statusindex=applisting earliest=-1y latest=now| table app ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Sep 2013 06:10:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48712#M11634</guid>
      <dc:creator>timmalos</dc:creator>
      <dc:date>2013-09-27T06:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48713#M11635</link>
      <description>&lt;P&gt;Unless they have fixed type=outer to mean full outer join (not left outer join) then you'll still run into problems where an app is in the listing but has no status (perhaps because it's down) - there will be no line for it.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2013 09:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48713#M11635</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-09-27T09:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48714#M11636</link>
      <description>&lt;P&gt;Well, joins or appends work when it's not a realtime search. The whole point was a realtime status dsahboard though.&lt;/P&gt;

&lt;P&gt;I just tested &lt;CODE&gt;index=_internal | stats count by host | append [inputlookup allHosts] | stats max(count) as count by host&lt;/CODE&gt; and found that it works properly (showing hosts as blank if they are in the lookup but not in the events) if run non-RT, but only shows hosts in the events if changed to RT.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2013 09:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48714#M11636</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-09-27T09:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48715#M11637</link>
      <description>&lt;P&gt;For this to work your parent search has to be a realtime search I dont think alltime for the primary search would work.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2013 09:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48715#M11637</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2013-09-27T09:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run a real-time subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48716#M11638</link>
      <description>&lt;P&gt;Nor are appends supported in realtime, though they don't error out. Consider this search:&lt;BR /&gt;
&lt;CODE&gt;index=_internal | stats count by host | append [inputlookup allHosts] | stats max(count) as count by host&lt;/CODE&gt;&lt;BR /&gt;
Non-RT, it shows all hosts in allHosts, even if they don't have any events. Changed to RT, it becomes a shorter list of only hosts that have events.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2013 09:36:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-run-a-real-time-subsearch/m-p/48716#M11638</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-09-27T09:36:32Z</dc:date>
    </item>
  </channel>
</rss>

