Splunk Search

Is it possible to have one checkbox that can be used to toggle between 2 difference searches on a dashboard panel?

anshushireen
New Member

I need to select two different searches for my table based on the toggle option. Please help

0 Karma

chimell
Motivator

Hi
Look at this search code it might be help

<form>
   <label>TestDynamicPanel</label>
   <fieldset submitButton="false">
     <input type="dropdown" token="show1">
       <label>Dropdown1</label>
       <populatingSearch fieldForLabel="temp" fieldForValue="temp">|gentimes start=-1 | eval temp="ColumnChart" | table temp</populatingSearch>
     </input>
     <input type="dropdown" token="show2">
       <label>Dropdown2</label>
       <populatingSearch fieldForLabel="temp" fieldForValue="temp">|gentimes start=-1 | eval temp="LineChart" | table temp</populatingSearch>
     </input>
     <input type="dropdown" token="show3">
       <label>Dropdown3</label>
       <populatingSearch fieldForLabel="temp" fieldForValue="temp">|gentimes start=-1 | eval temp="Table" | table temp</populatingSearch>
     </input>
   </fieldset>
   <row>
     <panel>
       <chart depends="$show1$">
       <title>Details for $submitted:sourcetype|s$</title>
      <searchString>index=_internal | timechart count</searchString>
         <earliestTime>-15m</earliestTime>
         <latestTime>now</latestTime>
         <option name="charting.chart">column</option>
     </chart>
       <chart depends="$show2$">
       <title>Details for $submitted:sourcetype|s$</title>
      <searchString>index=_internal | timechart count</searchString>
         <earliestTime>-15m</earliestTime>
         <latestTime>now</latestTime>
         <option name="charting.chart">line</option>
     </chart>
       <table depends="$show3$">
         <searchString>index=_internal | timechart count</searchString>
         <earliestTime>-15m</earliestTime>
         <latestTime>now</latestTime>
       </table>
     </panel>
   </row>
 </form>
0 Karma

gyslainlatsa
Motivator
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 ...