<?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 processing gives incorrect results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522599#M147362</link>
    <description>&lt;P&gt;See the best practices section about non transforming base searches here&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.6/Viz/Savedsearches" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.6/Viz/Savedsearches&lt;/A&gt;&lt;/P&gt;&lt;P&gt;as your example searches are non transforming, it may be that you are not returning fields from the second base search.&lt;/P&gt;&lt;P&gt;Try adding the same | fields statement you have in your first example.&lt;/P&gt;&lt;P&gt;However, in principle, when getting strange results with non transforming base searches, it may be a resource issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Oct 2020 21:51:48 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-10-01T21:51:48Z</dc:date>
    <item>
      <title>Post processing gives incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522520#M147329</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am new to the splunk and this community. I have searched everyone for my problem but i could not figure out what is wrong. Basically i am using base search and post process search for a dashboard.&amp;nbsp; My base search is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search id="basesearch1"&amp;gt;
&amp;lt;query&amp;gt;index=index1 | fields field1, field2&amp;lt;/query&amp;gt;
&amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
&amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
&amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my second base search that uses first base search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search base="basesearch1" id="basesearch2"&amp;gt;
&amp;lt;query&amp;gt;search field1=value1&amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and finally the post process search is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search base="basesearch2"&amp;gt;
&amp;lt;query&amp;gt;stats count(field1) as count by field2 | sort -count | head 5&amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i apply it as a single search query like this there is no problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 | fields field1, field2 | search field1=value1 | stats count(field1) as count by field2 | sort -count | head 5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however, in the dashboard the count numbers does not match with the above search query. I used 2 base searches because in the same dashboard, I need to use basesearch1 and basesearch2 in different panels as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 06:35:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522520#M147329</guid>
      <dc:creator>Kaand</dc:creator>
      <dc:date>2020-10-02T06:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Post processing gives incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522599#M147362</link>
      <description>&lt;P&gt;See the best practices section about non transforming base searches here&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.6/Viz/Savedsearches" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.6/Viz/Savedsearches&lt;/A&gt;&lt;/P&gt;&lt;P&gt;as your example searches are non transforming, it may be that you are not returning fields from the second base search.&lt;/P&gt;&lt;P&gt;Try adding the same | fields statement you have in your first example.&lt;/P&gt;&lt;P&gt;However, in principle, when getting strange results with non transforming base searches, it may be a resource issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 21:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522599#M147362</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-10-01T21:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Post processing gives incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522627#M147374</link>
      <description>&lt;P&gt;Actually if a merge basesearch1 and 2 into one basesearch and use the postprocess after that, the result i get from the post process is fairly similar to the results i get from the search without basesearch (but not the same).&amp;nbsp; Therefore, i think the problem must be a resource or a limit issue. I believe somehow the basesearch or the post process search cuts the job in the middle of the search.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 06:01:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Post-processing-gives-incorrect-results/m-p/522627#M147374</guid>
      <dc:creator>Kaand</dc:creator>
      <dc:date>2020-10-02T06:01:36Z</dc:date>
    </item>
  </channel>
</rss>

