<?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: Post process search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340101#M170266</link>
    <description>&lt;P&gt;Search 1 is :&lt;BR /&gt;
index=reportstore  earliest=-28d@d latest=@d sourcetype=reportstore_logs host=denver&lt;BR /&gt;
| eval ReportCreatedDate=strftime(ReportCreatedDate, "%D %T") &lt;BR /&gt;
| stats first(ReportCreatedDate) AS ReportCreatedDate by report_id &lt;BR /&gt;
| rename report_id as reportname &lt;/P&gt;

&lt;P&gt;search 2 is......... It has already a join in it but I still take this is as one search :&lt;/P&gt;

&lt;P&gt;index=offered_reports earliest=1522540800 sourcetype=splunkoffer Server_Name=denver &lt;BR /&gt;
    | table offer &lt;BR /&gt;
    | dedup offer &lt;BR /&gt;
    | eval offer=lower(offer) &lt;BR /&gt;
    | rename offer as Offer_Given &lt;BR /&gt;
    | join max=0 Offer_Given &lt;BR /&gt;
        [ search index=offered_reports earliest=1522540800 Master="master_splunk" &lt;BR /&gt;
        | eval Offer_Given=lower(Offer_Given) ] &lt;BR /&gt;
    | dedup reportname time_interval &lt;BR /&gt;
    | table reportname time_interval &lt;/P&gt;

&lt;P&gt;By joining search 1 type=outer [search 2 ] gives me Extra reports which are present in search1 and not present in search2&lt;/P&gt;

&lt;P&gt;By joining search 2 type=outer [search 1 ] gives me missing reports which are present in search2 and not present in search1&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:04:20 GMT</pubDate>
    <dc:creator>akhil36109</dc:creator>
    <dc:date>2020-09-29T19:04:20Z</dc:date>
    <item>
      <title>Post process search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340098#M170263</link>
      <description>&lt;P&gt;I have two searches &lt;/P&gt;

&lt;P&gt;I have a dashboard with two panels.&lt;/P&gt;

&lt;P&gt;1st panel has a query search1 join type=outer[search 2 ]  to get a table of results&lt;/P&gt;

&lt;P&gt;2nd panel has a query search2 join type=outer [search 1 ]  to get a table of results&lt;/P&gt;

&lt;P&gt;I did the above thing because they both give diff results and I need both of them.&lt;/P&gt;

&lt;P&gt;is there any way to optimize my dashboard??&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 18:49:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340098#M170263</guid>
      <dc:creator>akhil36109</dc:creator>
      <dc:date>2018-04-17T18:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Post process search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340099#M170264</link>
      <description>&lt;P&gt;The only way we can help you is with more information.  If you post the actual searches, then we can help you either optimize them or help you rethink it.  &lt;/P&gt;

&lt;P&gt;Your search can probably be refactored into something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(search 1) OR (search 2)
|  fields whatever.fields.you.want.from.either.type
| eval rectype=if(test.that.this.is.a.search.one,"search 1","search 2")
| stats values(*) as * by whatever.your.key.match.fields.are
| table whatever.your.key.match.fields.are rectype whatever.fields.you.want.from.either.type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Field &lt;CODE&gt;rectype&lt;/CODE&gt; will be a multivalue field.  If both types of records were found, then &lt;CODE&gt;mvcount(rectype)&lt;/CODE&gt; will be 2.  If &lt;CODE&gt;mvcount(rectype)&lt;/CODE&gt; is 1, then rectype will be either "search 1" or "search 2", indicating the type of record that was present, with the other type being absent.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 19:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340099#M170264</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-04-17T19:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Post process search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340100#M170265</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;To optimase your search you can use base search define here:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://answers.splunk.com/answers/239159/multiple-base-searches-in-a-dasboard-with-post-pro.html" target="test_blank"&gt;https://answers.splunk.com/answers/239159/multiple-base-searches-in-a-dasboard-with-post-pro.html&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1. Define a base search:

       &amp;lt;search id="base_search"&amp;gt;  &amp;lt;query &amp;gt;search1 join type=outer[search 2 ] &amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;

    2. Use the base search like:

      &amp;lt;search base="base_search"&amp;gt;&amp;lt;query&amp;gt;\example\ | stats count .....&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
      &amp;lt;search base="base_search"&amp;gt;&amp;lt;query&amp;gt;your_seconde_query&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Apr 2018 20:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340100#M170265</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2018-04-17T20:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Post process search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340101#M170266</link>
      <description>&lt;P&gt;Search 1 is :&lt;BR /&gt;
index=reportstore  earliest=-28d@d latest=@d sourcetype=reportstore_logs host=denver&lt;BR /&gt;
| eval ReportCreatedDate=strftime(ReportCreatedDate, "%D %T") &lt;BR /&gt;
| stats first(ReportCreatedDate) AS ReportCreatedDate by report_id &lt;BR /&gt;
| rename report_id as reportname &lt;/P&gt;

&lt;P&gt;search 2 is......... It has already a join in it but I still take this is as one search :&lt;/P&gt;

&lt;P&gt;index=offered_reports earliest=1522540800 sourcetype=splunkoffer Server_Name=denver &lt;BR /&gt;
    | table offer &lt;BR /&gt;
    | dedup offer &lt;BR /&gt;
    | eval offer=lower(offer) &lt;BR /&gt;
    | rename offer as Offer_Given &lt;BR /&gt;
    | join max=0 Offer_Given &lt;BR /&gt;
        [ search index=offered_reports earliest=1522540800 Master="master_splunk" &lt;BR /&gt;
        | eval Offer_Given=lower(Offer_Given) ] &lt;BR /&gt;
    | dedup reportname time_interval &lt;BR /&gt;
    | table reportname time_interval &lt;/P&gt;

&lt;P&gt;By joining search 1 type=outer [search 2 ] gives me Extra reports which are present in search1 and not present in search2&lt;/P&gt;

&lt;P&gt;By joining search 2 type=outer [search 1 ] gives me missing reports which are present in search2 and not present in search1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:04:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340101#M170266</guid>
      <dc:creator>akhil36109</dc:creator>
      <dc:date>2020-09-29T19:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Post process search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340102#M170267</link>
      <description>&lt;P&gt;The Full Searches:&lt;/P&gt;

&lt;P&gt;first one;&lt;/P&gt;

&lt;P&gt;index=reportstore  earliest=-28d@d latest=@d sourcetype=reportstore_logs host=denver&lt;BR /&gt;
| eval ReportCreatedDate=strftime(ReportCreatedDate, "%D %T") &lt;BR /&gt;
| stats first(ReportCreatedDate) AS ReportCreatedDate by report_id &lt;BR /&gt;
| rename report_id as reportname &lt;BR /&gt;
| join type=outer reportname &lt;BR /&gt;
    [ index=offered_reports earliest=1522540800 sourcetype=splunkoffer Server_Name=denver &lt;BR /&gt;
    | table offer &lt;BR /&gt;
    | dedup offer &lt;BR /&gt;
    | eval offer=lower(offer) &lt;BR /&gt;
    | rename offer as Offer_Given &lt;BR /&gt;
    | join max=0 Offer_Given &lt;BR /&gt;
        [ search index=offered_reports earliest=1522540800 Master="master_splunk" &lt;BR /&gt;
        | eval Offer_Given=lower(Offer_Given) ] &lt;BR /&gt;
    | dedup reportname time_interval &lt;BR /&gt;
    | table reportname time_interval  ] &lt;BR /&gt;
| table reportname,time_interval,ReportCreatedDate &lt;BR /&gt;
| fillnull value="Extra_reports" &lt;/P&gt;

&lt;P&gt;Second one:&lt;/P&gt;

&lt;P&gt;index=offered_reports earliest=1522540800 sourcetype=splunkoffer Server_Name=denver &lt;BR /&gt;
    | table offer &lt;BR /&gt;
    | dedup offer &lt;BR /&gt;
    | eval offer=lower(offer) &lt;BR /&gt;
    | rename offer as Offer_Given &lt;BR /&gt;
    | join max=0 Offer_Given &lt;BR /&gt;
        [ search index=offered_reports earliest=1522540800 Master="master_splunk" &lt;BR /&gt;
        | eval Offer_Given=lower(Offer_Given) ] &lt;BR /&gt;
    | dedup reportname time_interval &lt;BR /&gt;
    | table reportname time_interval &lt;BR /&gt;
 | rename reportname as report_guid&lt;BR /&gt;
| join type=outer report_guid[search index=reportstore  earliest=-28d@d latest=@d sourcetype=reportstore_logs host=denver&lt;BR /&gt;
| eval ReportCreatedDate=strftime(ReportCreatedDate, "%D %T") &lt;BR /&gt;
| stats first(ReportCreatedDate) AS ReportCreatedDate by report_id  ]&lt;BR /&gt;
| table report_guid,time_interval,ReportCreatedDate&lt;BR /&gt;
| fillnull value="Missing"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:04:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-process-search/m-p/340102#M170267</guid>
      <dc:creator>akhil36109</dc:creator>
      <dc:date>2020-09-29T19:04:23Z</dc:date>
    </item>
  </channel>
</rss>

