<?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 Add events mid search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73773#M18497</link>
    <description>&lt;P&gt;Is it possible to recover events that I've filtered out in a search, ie (and I know this is a daft example but it's good for simplicity):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=MySource | search events older that 10 days | do some stuff with those old event | bring back all the events from sourcetype=MySource | do some stuff with all the events
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;thanks in advance&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2012 11:56:42 GMT</pubDate>
    <dc:creator>Bulluk</dc:creator>
    <dc:date>2012-02-17T11:56:42Z</dc:date>
    <item>
      <title>Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73773#M18497</link>
      <description>&lt;P&gt;Is it possible to recover events that I've filtered out in a search, ie (and I know this is a daft example but it's good for simplicity):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=MySource | search events older that 10 days | do some stuff with those old event | bring back all the events from sourcetype=MySource | do some stuff with all the events
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 11:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73773#M18497</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-02-17T11:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73774#M18498</link>
      <description>&lt;P&gt;The above is the short version to a longer problem. I have a HiddenSearch which passes events to HiddenPostProceses further down the page. This works for all searches except one where the first search contains useful information but filters out events that I need in the second search. I'm trying to avoid using a whole new search as I want all searches to inherit from a timerange picker that's associated with the initial HiddenSearch&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 12:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73774#M18498</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-02-17T12:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73775#M18499</link>
      <description>&lt;P&gt;What are you trying to do?&lt;/P&gt;

&lt;P&gt;I ask because if you just bring back all the original events then surely you won't have anything useful from doing the initial filtering? I suppose if you threw some eval magic in to create new fields it might be worth something. &lt;BR /&gt;
Anyway I guess you could do this;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=bob | where something=that | append [search sourcetype=bob] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will bring back all your original events and append to your current result set&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 12:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73775#M18499</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-02-17T12:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73776#M18500</link>
      <description>&lt;P&gt;Best practice is to do as wide a search as possible and then keep all filtering actions to the postprocess&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 12:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73776#M18500</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-02-17T12:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73777#M18501</link>
      <description>&lt;P&gt;It's a bit tricky to explain in the number of characters I have to type in. I'm working with iis logs. At the top of the page a user can enter a url. The initial search performs a few rex searches to extract and populate variables for the uri_stem and uri_query. I then perform a where search to filter results to just events that match the url that the user entered. this is passed to the PostProcess searches to make some simple graphs with. My problem search was discussed here &lt;A href="http://splunk-base.splunk.com/answers/37766/transaction-with-mvexpand" target="_blank"&gt;http://splunk-base.splunk.com/answers/37766/transaction-with-mvexpand&lt;/A&gt;. Unfortunately _serial is always null despite....&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73777#M18501</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2020-09-28T11:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73778#M18502</link>
      <description>&lt;P&gt;transactions being displayed if I only search on:&lt;/P&gt;

&lt;P&gt;eval etime=_time | fields cs_username cs_uri_stem etime | transaction cs_username&lt;/P&gt;

&lt;P&gt;So my work around was to simply restart from the beginning but then use the variables from the first search to filter the results of the second. &lt;/P&gt;

&lt;P&gt;I've just tried using append to add soourcetype=iis back in but I get no results at all....&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73778#M18502</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2020-09-28T11:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73779#M18503</link>
      <description>&lt;P&gt;Interesting, I might be missing something. You did it using the synax | append [search sourcetype=iis] ? If you run that search and go to the search inspector (if its pre 4.3 its in actions and inspect search job) does it have any counts listed for the command.append component?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 12:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73779#M18503</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-02-17T12:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73780#M18504</link>
      <description>&lt;P&gt;if I put&lt;/P&gt;

&lt;P&gt;stats count&lt;/P&gt;

&lt;P&gt;into the postProcess search I get a value, if I put &lt;/P&gt;

&lt;P&gt;append [search sourcetype=iis] | stats count&lt;/P&gt;

&lt;P&gt;the chart is completely blank. I've had a look at the job (I'm on v4.2.4) and I get the following error (I'm running with an admin account)&lt;/P&gt;

&lt;P&gt;SearchException: Search operation 'subsearch' is unknown. You might not have permission to run this operation.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 13:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73780#M18504</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-02-17T13:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73781#M18505</link>
      <description>&lt;P&gt;Incidentally, append works fine via the search app's gui. My filtered search piped to stats count returns ~500 events, with append it returns ~40000. The problem seems to be running subsearchs in a postprocess&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 13:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73781#M18505</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-02-17T13:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73782#M18506</link>
      <description>&lt;P&gt;Stranger still, despite getting the error above the number of events returned in the job monitor suggests that the append statement is working as it shows ~40000 events&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 13:34:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73782#M18506</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-02-17T13:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73783#M18507</link>
      <description>&lt;P&gt;I feel like a total muppet!&lt;/P&gt;

&lt;P&gt;For some reason my search spawns 3 subsearches in the jobs view. The panel on my dashboard stays blank until all 3 have completed their work. Basically I was being impatient, if I leave it for a minute (I'm on a dev box so it takes a while) the result pops up.&lt;/P&gt;

&lt;P&gt;I'll be giving the points to Draineh as the append command was the answer I was looking for.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 13:47:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73783#M18507</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-02-17T13:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Add events mid search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73784#M18508</link>
      <description>&lt;P&gt;Glad you've got it working now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 14:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-events-mid-search/m-p/73784#M18508</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-02-17T14:47:03Z</dc:date>
    </item>
  </channel>
</rss>

