Splunk Search

How can I add multiple panels to a dashboard that utilizes separate time pickers, search tokens and searches?

digital_alchemy
Path Finder

The title pretty much explains what I want to do. The code below is for two separate dashboards that I would like to combine into a single dashboard. When I've tried to combine them I always end up with a shared time picker and user input for the search term.

What I'm looking for is the ability to combine into a single dashboard yet retain individual search features.

<!--- DHCP Search Panel --->

<form>
  <label>DHCP Lookup</label>
  <searchTemplate>*** MY DHCP SEARCH ***</searchTemplate>
  <fieldset>
    <input type="text" token="dhcp_search_term">
      <default>dest_ip=</default>
    </input>
    <input type="time">
      <default>Last 7 days</default>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <title>DHCP Results:</title>
        <option name="showPager">true</option>
        <option name="count">20</option>
      </table>
    </panel>
  </row>
</form>

<!--- EPO Search Panel --->

<form>
  <label>McAfee EPO Lookup</label>
  <searchTemplate>*** MY EPO SEARCH ***</searchTemplate>
  <fieldset>
    <input type="text" token="epo_search_term"></input>
    <input type="time">
      <default>Last 7 days</default>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <title>McAfee EPO Results:</title>
        <option name="showPager">true</option>
        <option name="count">20</option>
      </table>
    </panel>
  </row>
</form>
0 Karma
1 Solution

somesoni2
Revered Legend

Each panel can have it's own set of form inputs. You should define unique token for each of them so that they can be differentiated and used in power different visualization elements.

Try like this

 <form>
   <label>DHCP Lookup</label>
   <row>
     <panel>
     <input type="text" token="dhcp_search_term">
       <default>dest_ip=</default>
     </input>
     <input type="time" token="timepanel1">
       <default>Last 7 days</default>
     </input>
       <table>
        <search>
             <query>some query 2</query>
             <earliest>$timepanel1.earliest$</earliest>
             <latest>$timepanel1.latest$</latest>
        </search>
         <title>DHCP Results:</title>
         <option name="showPager">true</option>
         <option name="count">20</option>
       </table>
     </panel>
   </row>
 <row>
     <panel>
     <input type="text" token="epo_search_term"></input>
     <input type="time" token="timepanel2">
       <default>Last 7 days</default>
     </input>
       <table>
         <title>McAfee EPO Results:</title>
        <search>
             <query>some query 2</query>
             <earliest>$timepanel2.earliest$</earliest>
             <latest>$timepanel2.latest$</latest>
        </search>
         <option name="showPager">true</option>
         <option name="count">20</option>
       </table>
     </panel>
   </row>
 </form>

View solution in original post

0 Karma

somesoni2
Revered Legend

Each panel can have it's own set of form inputs. You should define unique token for each of them so that they can be differentiated and used in power different visualization elements.

Try like this

 <form>
   <label>DHCP Lookup</label>
   <row>
     <panel>
     <input type="text" token="dhcp_search_term">
       <default>dest_ip=</default>
     </input>
     <input type="time" token="timepanel1">
       <default>Last 7 days</default>
     </input>
       <table>
        <search>
             <query>some query 2</query>
             <earliest>$timepanel1.earliest$</earliest>
             <latest>$timepanel1.latest$</latest>
        </search>
         <title>DHCP Results:</title>
         <option name="showPager">true</option>
         <option name="count">20</option>
       </table>
     </panel>
   </row>
 <row>
     <panel>
     <input type="text" token="epo_search_term"></input>
     <input type="time" token="timepanel2">
       <default>Last 7 days</default>
     </input>
       <table>
         <title>McAfee EPO Results:</title>
        <search>
             <query>some query 2</query>
             <earliest>$timepanel2.earliest$</earliest>
             <latest>$timepanel2.latest$</latest>
        </search>
         <option name="showPager">true</option>
         <option name="count">20</option>
       </table>
     </panel>
   </row>
 </form>
0 Karma

BernardEAI
Communicator

This works very well, thanks.

Any way we can have a "submit" button for each search as well?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...