<?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: How to run search only for shown panels? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221959#M175934</link>
    <description>&lt;P&gt;i found a workaround for this.&lt;BR /&gt;
i'm initializing the tokens at the page load, so no panel is shown for the start.&lt;BR /&gt;
this is how i achieved it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
    &amp;lt;init&amp;gt;
        &amp;lt;unset token="a"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="b"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="c"&amp;gt;&amp;lt;/unset&amp;gt;
        ...

      &amp;lt;/init&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in the  tag you can initialize many things, here is a link to the tag description:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Set_tokens_on_page_load"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Set_tokens_on_page_load&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2017 17:49:51 GMT</pubDate>
    <dc:creator>naty</dc:creator>
    <dc:date>2017-02-09T17:49:51Z</dc:date>
    <item>
      <title>How to run search only for shown panels?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221955#M175930</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i have a dashboard with several panels.&lt;BR /&gt;
i have used the "depends" option for every panel to see only those that i need.&lt;/P&gt;

&lt;P&gt;what i have noticed is even though i have this option, still all the panels would start the search as soon as the page loads and not when only shown.&lt;/P&gt;

&lt;P&gt;meaning, when i open the dashboard i see nothing.&lt;BR /&gt;
i'm inputting some data for tokens (interval, time, etc).&lt;BR /&gt;
then i choose the panels i would like to show.&lt;BR /&gt;
for each panel i have used the depends and rejects options to see only those that matter to that subject.&lt;BR /&gt;
i have noticed that after inputting all the data needed, all the panels would make their search, no matter if the depends is on them.&lt;/P&gt;

&lt;P&gt;my goal is that only that shown panels would start the search and show their output.&lt;BR /&gt;
we are using Splunk 6.5.1&lt;/P&gt;

&lt;P&gt;How can it be done?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2017 15:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221955#M175930</guid>
      <dc:creator>naty</dc:creator>
      <dc:date>2017-01-08T15:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to run search only for shown panels?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221956#M175931</link>
      <description>&lt;P&gt;Best option would be to include the depends token that you used for panel in the panel search, so that searches will not run untill that token is set (and thus panel is visible). E.g. If you're setting a token say $showPanel1$ with value say "Y", then in the base search (first portion) of the panel search, add a condition &lt;CODE&gt;"$showPanel1$"="Y"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2017 15:17:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221956#M175931</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-08T15:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to run search only for shown panels?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221957#M175932</link>
      <description>&lt;P&gt;can you give an example?&lt;BR /&gt;
if i got it right, you mean something like this:&lt;BR /&gt;
index=myind source=mysrc "$showPanel1$"="Y" | ...&lt;BR /&gt;
but doesn't interfere with the search? i'm basically saying to splunk to search for event with showPanel=Y&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2017 15:35:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221957#M175932</guid>
      <dc:creator>naty</dc:creator>
      <dc:date>2017-01-08T15:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to run search only for shown panels?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221958#M175933</link>
      <description>&lt;P&gt;It won't. When the token value is evaluated, your search will look like this and should always work. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myind source=mysrc "Y"="Y" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another (better IMO) option you could do is to set value of $showPanel1$ as 1, then your search would look like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myind source=mysrc $showPanel1=1 | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Upon evaluation, results in 1=1 which is always true.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myind source=mysrc 1=1 | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Jan 2017 16:02:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221958#M175933</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-08T16:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to run search only for shown panels?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221959#M175934</link>
      <description>&lt;P&gt;i found a workaround for this.&lt;BR /&gt;
i'm initializing the tokens at the page load, so no panel is shown for the start.&lt;BR /&gt;
this is how i achieved it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
    &amp;lt;init&amp;gt;
        &amp;lt;unset token="a"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="b"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="c"&amp;gt;&amp;lt;/unset&amp;gt;
        ...

      &amp;lt;/init&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in the  tag you can initialize many things, here is a link to the tag description:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Set_tokens_on_page_load"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Set_tokens_on_page_load&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-search-only-for-shown-panels/m-p/221959#M175934</guid>
      <dc:creator>naty</dc:creator>
      <dc:date>2017-02-09T17:49:51Z</dc:date>
    </item>
  </channel>
</rss>

