Dashboards & Visualizations

Lookup question for dashboard

deepusoundar
Engager

Hi,
I used the below to lookup for a query from a lookup file/table and execute it.

Lookup file - search_queries.csv with Name and Search has two columns.
[where search has the query that has to be selected upon selecting the corresponding Name]

 <form>
 1.   <label>Run Search from Lookup</label>
 2.   <fieldset submitButton="false">
 3.     <input type="time" token="tokTime" searchWhenChanged="true">
 4.       <label>Select Time</label>
 5.       <default>
 6.         <earliest>-24h@h</earliest>
 7.         <latest>now</latest>
 8.       </default>
 9.     </input>
 10.   </fieldset>
 11.   <row>
 12.     <panel>
 13.       <title>Search Based on Lookup</title>
 14.       <input type="dropdown" token="tokSearchQuery" searchWhenChanged="true">
 15.         <label>Select Search Query (from lookup)</label>
 16.         <fieldForLabel>Name</fieldForLabel>
 17.         <fieldForValue>Search</fieldForValue>
 18.         <search>
 19.           <query>| inputlookup search_queries.csv | table Name Search</query>
 20.         </search>
 21.       </input>
 22.       <chart>
 23.         <search>
 24.           <query>$tokSearchQuery$</query>
 25.           <earliest>$tokTime.earliest$</earliest>
 26.           <latest>$tokTime.latest$</latest>
 27.         </search>
 28.         <option name="charting.chart.showDataLabels">minmax</option>
 29.         <option name="charting.chart.stackMode">stacked</option>
 30.         <option name="refresh.display">progressbar</option>
 31.       </chart>
 32.     </panel>
 33.   </row>
 34. </form>
Tags (1)
0 Karma

lakshman239
Influencer

Try changing line 24 to `search $tokSearchQuery$

0 Karma

tiagofbmm
Influencer

where is the question?

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

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...