<?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: [Sideview] How to use a search within a PostProcess that is located downstream to another different search in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186907#M18812</link>
    <description>&lt;P&gt;I have not tested this,but try also with :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row2_col1" autoRun="True"&amp;gt;
    &amp;lt;param name="search"&amp;gt;| stats count by username, host, error&amp;lt;/param&amp;gt;

    ...
    &amp;lt;module name="PostProcess"&amp;gt;
      &amp;lt;param name="search"&amp;gt;$search$ | stats sum(count) as count by username&amp;lt;/param&amp;gt;

      ...
      &amp;lt;module name="PostProcess"&amp;gt;
        &amp;lt;param name="search"&amp;gt;$postProcess$ | where count&amp;gt;10 |&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 30 Jun 2015 15:55:12 GMT</pubDate>
    <dc:creator>ngatchasandra</dc:creator>
    <dc:date>2015-06-30T15:55:12Z</dc:date>
    <item>
      <title>[Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186904#M18809</link>
      <description>&lt;P&gt;In the diagram below:&lt;/P&gt;

&lt;P&gt;Search A&lt;BR /&gt;
--Search B&lt;BR /&gt;
----PostProcess&lt;/P&gt;

&lt;P&gt;How can I use Search A in the PostProcess.&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 14:37:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186904#M18809</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2015-06-30T14:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186905#M18810</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Try to other this like follow example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="PostProcess"&amp;gt;
   &amp;lt;param name="search"&amp;gt;| stats count by username, host, error&amp;lt;/param&amp;gt;

   ...
   &amp;lt;module name="PostProcess"&amp;gt;
     &amp;lt;param name="search"&amp;gt;$postProcess$ | stats sum(count) as count by username&amp;lt;/param&amp;gt;

     ...
     &amp;lt;module name="PostProcess"&amp;gt;
       &amp;lt;param name="search"&amp;gt;$postProcess$ | where count&amp;gt;10 |&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this case, the postProcesses modules are all operating on the same dispatched search, then you can in each case refer to the aggregate postProcess from upstream as $ postProcess $, pretty much anywhere.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 14:55:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186905#M18810</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2015-06-30T14:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186906#M18811</link>
      <description>&lt;P&gt;But i have two searches one under another. How can i get $postProcess$ or $search$ of first search in the PostProcess that is actually the child of the second search. I think these variables will refer the second search by default, and not the first one.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 15:18:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186906#M18811</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2015-06-30T15:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186907#M18812</link>
      <description>&lt;P&gt;I have not tested this,but try also with :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row2_col1" autoRun="True"&amp;gt;
    &amp;lt;param name="search"&amp;gt;| stats count by username, host, error&amp;lt;/param&amp;gt;

    ...
    &amp;lt;module name="PostProcess"&amp;gt;
      &amp;lt;param name="search"&amp;gt;$search$ | stats sum(count) as count by username&amp;lt;/param&amp;gt;

      ...
      &amp;lt;module name="PostProcess"&amp;gt;
        &amp;lt;param name="search"&amp;gt;$postProcess$ | where count&amp;gt;10 |&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jun 2015 15:55:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186907#M18812</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2015-06-30T15:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186908#M18813</link>
      <description>&lt;P&gt;What exactly about Search A do you need?   Do you need a couple fields, and the results are a single-row?   If so then the best way is to use a ResultsValueSetter in between Search A and Search B to pull down those values.    If you want to run the whole postProcess search against Search A's results, it's best to reorganize the view a little, specify the postprocess string with a ValueSetter, and then simply use that ValueSetter's $foo$ token inside each PostProcess.  There are probably some other options that I'm not thinking of, so let me know what you need exactly from search A.   &lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 16:46:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186908#M18813</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2015-06-30T16:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186909#M18814</link>
      <description>&lt;P&gt;Thank you so much for replying.&lt;/P&gt;

&lt;P&gt;I have search A and search B running on completely different indexes. I have a TabSwitcher where I need to show results from each of these indexes in seperate tabs. Please consider the snippet below:&lt;/P&gt;

&lt;P&gt;Search A&lt;BR /&gt;
---ValueSetter ($search$ / $postprocess$)&lt;BR /&gt;
------Search B&lt;BR /&gt;
---------TabSwitcher&lt;BR /&gt;
-------------PostProcess of A (no matter what I set in the valuesetter used at the top, and use that here, It takes search B as the main search, hence disrupting the results. I need to run this postprocess on search A.)&lt;BR /&gt;
-------------PostProcess of B (successfully running on search B and showing results.)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 09:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186909#M18814</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2015-07-01T09:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186910#M18815</link>
      <description>&lt;P&gt;I need all the results from search A, not just one row.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 10:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186910#M18815</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2015-07-01T10:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186911#M18816</link>
      <description>&lt;P&gt;I think I see.     The easy solution would be to move Search A and Search B down into the relevant Tab.   Of course this would make the searches (re)dispatch whenever the user changes the tab.   My guess is this is the reason you're not writing the view this way -  that you want the searches to dispatch once when the page loads and then not dispatch again. &lt;/P&gt;

&lt;P&gt;What you can do then,   is to use a ValueSetter module to save the sid of SearchA into a $foo$ token like so: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="ValueSetter"&amp;gt;
  &amp;lt;param name="arg.sidA"&amp;gt;$results.sid$&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When search B comes along and clobbers everything about search A,  this little $sidA$ token will survive.    So you can then use that.  Instead of using postprocess at all for search A, you can then use the &lt;CODE&gt;loadjob&lt;/CODE&gt; command with that sid. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search"&amp;gt;
  &amp;lt;param name="search"&amp;gt;loadjob $sidA$ | &amp;lt;your 'postprocess' commands go here&amp;gt;&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;loadjob is a little clunky, and I've seen some weird behavior from it over the years, but this should work perfectly well and give you the behavior you need. &lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 23:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186911#M18816</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2015-07-01T23:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: [Sideview] How to use a search within a PostProcess that is located downstream to another different search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186912#M18817</link>
      <description>&lt;P&gt;Sorry I am late to reply. This solution worked. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2015 08:11:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Sideview-How-to-use-a-search-within-a-PostProcess-that-is/m-p/186912#M18817</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2015-07-31T08:11:40Z</dc:date>
    </item>
  </channel>
</rss>

