<?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: Why do my post-process timecharts display &amp;quot;no results found&amp;quot; in dashboard, but the query on its own is fine? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337953#M100242</link>
    <description>&lt;P&gt;@dave4988, First off you should start with some Search optimization. &lt;BR /&gt;
Few applicable in your case are (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Search/Writebettersearches"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Search/Writebettersearches&lt;/A&gt; and &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Search/NOTexpressions"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Search/NOTexpressions&lt;/A&gt;)&lt;BR /&gt;
1) Avoid using NOT.&lt;BR /&gt;
2) Filter results upfront.&lt;BR /&gt;
3) Inclusion is better than exclusion.&lt;/P&gt;

&lt;P&gt;Then you also need to review condition for Post Processing and optimization (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches#Post-process_searches_2"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches#Post-process_searches_2&lt;/A&gt;) &lt;BR /&gt;
1) Base query should have transforming command&lt;BR /&gt;
2) Do not pass on raw events&lt;BR /&gt;
3) Filter required results in the base search&lt;/P&gt;

&lt;P&gt;See some of the scenarios with examples for Post Processing with chained and complex post processing.&lt;/P&gt;

&lt;P&gt;Having said the above, try out the following query as base search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app sourcetype=tracelog splunk_server_group=prod 
                 eventName=business:Logout
                 ( description!="*invalid username or password*" )
                 ( code!="6703" code!="6704" code!="8006" code!="6900" code!="6000" )
                 success=false AND ( agent="true" OR agent="false" )
| timechart count(eval(agent=="true")) as "True" count(eval(agent=="false")) as "False" by errors
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then in your Post Process search you can use, For agent="true" scenario,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields True*
| rename True* as *
| timechart sum(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For agent="false" scenario,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields True*
| rename True* as *
| timechart sum(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Jun 2017 08:01:52 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-06-07T08:01:52Z</dc:date>
    <item>
      <title>Why do my post-process timecharts display "no results found" in dashboard, but the query on its own is fine?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337951#M100240</link>
      <description>&lt;P&gt;I have a simple-xml Splunk dashboard with a base query, and two post-processing queries inheriting from the base. However, when I load the dashboard, it always says "No results found." When I click the "Open in search" button, the results show as expected. Also, when I take out of base search and just throw the entire search into both panels, the charts display as expected. Anyone know what's going on here?&lt;/P&gt;

&lt;P&gt;Here's the dashboard xml that isn't working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
    &amp;lt;label&amp;gt;Test Dashboard&amp;lt;/label&amp;gt;
    &amp;lt;description&amp;gt;This is a test&amp;lt;/description&amp;gt;
        &amp;lt;search id="base"&amp;gt;
            &amp;lt;query&amp;gt;
                index=app sourcetype=tracelog splunk_server_group=prod 
                eventName=business:Logout
                (NOT description="*invalid username or password*")
                NOT code="6703" NOT code="6704" NOT "code=8006" NOT "code=6900" NOT "code=6000" 
            &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
    &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
            &amp;lt;title&amp;gt;Test chart 1&amp;lt;/title&amp;gt;
            &amp;lt;chart&amp;gt;
                &amp;lt;search base="base"&amp;gt;
                    &amp;lt;query&amp;gt;
                        search success=false AND agent=true | timechart count by errors
                    &amp;lt;/query&amp;gt;
                &amp;lt;/search&amp;gt;
                &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
            &amp;lt;/chart&amp;gt;
        &amp;lt;/panel&amp;gt;
    &amp;lt;/row&amp;gt;
        &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
            &amp;lt;title&amp;gt;Test chart 2&amp;lt;/title&amp;gt;
            &amp;lt;chart&amp;gt;
                &amp;lt;search base="base"&amp;gt;
                    &amp;lt;query&amp;gt;
                        search success=false AND agent=false | timechart count by errors
                    &amp;lt;/query&amp;gt;
                &amp;lt;/search&amp;gt;
                &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
            &amp;lt;/chart&amp;gt;
        &amp;lt;/panel&amp;gt;
    &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, if I combine the queries and get rid of the base query as seen below, it works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
    &amp;lt;label&amp;gt;Test Dashboard&amp;lt;/label&amp;gt;
    &amp;lt;description&amp;gt;This is a test&amp;lt;/description&amp;gt;
    &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
            &amp;lt;title&amp;gt;Test chart 1&amp;lt;/title&amp;gt;
            &amp;lt;chart&amp;gt;
                &amp;lt;search&amp;gt;
                    &amp;lt;query&amp;gt;
                        index=app sourcetype=tracelog splunk_server_group=prod 
                        eventName=business:Logout
                        (NOT description="*invalid username or password*")
                        NOT code="6703" NOT code="6704" NOT "code=8006" NOT "code=6900" NOT "code=6000" 
                        | search success=false AND agent=true | timechart count by errors
                    &amp;lt;/query&amp;gt;
                &amp;lt;/search&amp;gt;
                &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
            &amp;lt;/chart&amp;gt;
        &amp;lt;/panel&amp;gt;
    &amp;lt;/row&amp;gt;
        &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
            &amp;lt;title&amp;gt;Test chart 2&amp;lt;/title&amp;gt;
            &amp;lt;chart&amp;gt;
                &amp;lt;search&amp;gt;
                    &amp;lt;query&amp;gt;
                        index=app sourcetype=tracelog splunk_server_group=prod 
                        eventName=business:Logout
                        (NOT description="*invalid username or password*")
                        NOT code="6703" NOT code="6704" NOT "code=8006" NOT "code=6900" NOT "code=6000" 
                        |  search success=false AND agent=false | timechart count by errors
                    &amp;lt;/query&amp;gt;
                &amp;lt;/search&amp;gt;
                &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
            &amp;lt;/chart&amp;gt;
        &amp;lt;/panel&amp;gt;
    &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas? Am I missing something here?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 21:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337951#M100240</guid>
      <dc:creator>dave4988</dc:creator>
      <dc:date>2017-06-06T21:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my post-process timecharts display "no results found" in dashboard, but the query on its own is fine?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337952#M100241</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
the problem is that a post process search doesn't pass all fields to the related searches, so the following commands fail (in your example "success=false AND agent=true | timechart count by errors") because fields haven't values, instead if you run it as a search both post process and panel search are united and so they run.&lt;BR /&gt;
To solve the problem, you have to insert at the end of each post process search the command "fields" with the all fields you use in the panels searches.&lt;BR /&gt;
In your example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields _time, success, agent, errors
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 06:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337952#M100241</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-06-07T06:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my post-process timecharts display "no results found" in dashboard, but the query on its own is fine?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337953#M100242</link>
      <description>&lt;P&gt;@dave4988, First off you should start with some Search optimization. &lt;BR /&gt;
Few applicable in your case are (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Search/Writebettersearches"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Search/Writebettersearches&lt;/A&gt; and &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Search/NOTexpressions"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Search/NOTexpressions&lt;/A&gt;)&lt;BR /&gt;
1) Avoid using NOT.&lt;BR /&gt;
2) Filter results upfront.&lt;BR /&gt;
3) Inclusion is better than exclusion.&lt;/P&gt;

&lt;P&gt;Then you also need to review condition for Post Processing and optimization (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches#Post-process_searches_2"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches#Post-process_searches_2&lt;/A&gt;) &lt;BR /&gt;
1) Base query should have transforming command&lt;BR /&gt;
2) Do not pass on raw events&lt;BR /&gt;
3) Filter required results in the base search&lt;/P&gt;

&lt;P&gt;See some of the scenarios with examples for Post Processing with chained and complex post processing.&lt;/P&gt;

&lt;P&gt;Having said the above, try out the following query as base search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app sourcetype=tracelog splunk_server_group=prod 
                 eventName=business:Logout
                 ( description!="*invalid username or password*" )
                 ( code!="6703" code!="6704" code!="8006" code!="6900" code!="6000" )
                 success=false AND ( agent="true" OR agent="false" )
| timechart count(eval(agent=="true")) as "True" count(eval(agent=="false")) as "False" by errors
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then in your Post Process search you can use, For agent="true" scenario,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields True*
| rename True* as *
| timechart sum(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For agent="false" scenario,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields True*
| rename True* as *
| timechart sum(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2017 08:01:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-post-process-timecharts-display-quot-no-results-found/m-p/337953#M100242</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-06-07T08:01:52Z</dc:date>
    </item>
  </channel>
</rss>

