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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...