Dashboards & Visualizations

prevent dashboard from running searches when it is loaded

imrago
Contributor

Is it possible to prevent a dashboard to autorun all the searches in it when the dashboard is opened? Ideally the searches should run only when the user had selected all the desired parameters in the fields and Submit is pressed.

0 Karma
1 Solution

to4kawa
Ultra Champion
<form>
  <label>circle</label>
  <fieldset submitButton="true">
    <input type="checkbox" token="field1">
      <label>auto run</label>
      <choice value="2">2</choice>
    </input>
  </fieldset>
  <row>
    <panel depends="$alwaysHideCSS$">
      <html>
         <style>
           #chartPanel{
             width:500px !important;
           }
         </style>
       </html>
    </panel>
  </row>
  <row>
    <panel id="chartPanel">
      <chart>
        <search>
          <query>| makeresults count=$field1$
| streamstats count
| eval x=if(count=1,-1.100,1.100) 
| makecontinuous span=0.001 x
| dedup x
| eval y = exact(sqrt(1 - pow(x,2)))
| eval y = if(abs(x) <= 1,y,NULL)
| eval yy = -y
| table x y yy</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">line</option>
        <option name="charting.legend.placement">none</option>
        <option name="charting.fieldColors">{y:#000000, yy:#000000}</option>
        <option name="height">550</option>
      </chart>
    </panel>
  </row>
</form>

Hi, @imrago
This is an example.
If you pass the token to the search and click the submit button, basically it will not be executed automatically.

View solution in original post

0 Karma

to4kawa
Ultra Champion
<form>
  <label>circle</label>
  <fieldset submitButton="true">
    <input type="checkbox" token="field1">
      <label>auto run</label>
      <choice value="2">2</choice>
    </input>
  </fieldset>
  <row>
    <panel depends="$alwaysHideCSS$">
      <html>
         <style>
           #chartPanel{
             width:500px !important;
           }
         </style>
       </html>
    </panel>
  </row>
  <row>
    <panel id="chartPanel">
      <chart>
        <search>
          <query>| makeresults count=$field1$
| streamstats count
| eval x=if(count=1,-1.100,1.100) 
| makecontinuous span=0.001 x
| dedup x
| eval y = exact(sqrt(1 - pow(x,2)))
| eval y = if(abs(x) <= 1,y,NULL)
| eval yy = -y
| table x y yy</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">line</option>
        <option name="charting.legend.placement">none</option>
        <option name="charting.fieldColors">{y:#000000, yy:#000000}</option>
        <option name="height">550</option>
      </chart>
    </panel>
  </row>
</form>

Hi, @imrago
This is an example.
If you pass the token to the search and click the submit button, basically it will not be executed automatically.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...