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
Get Updates on the Splunk Community!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...