Splunk Search

based on drop down list value

Jasmine
Path Finder

the below are two different drop down list as we have different host and index.
Based on the index selection i do set/unset -show/hide - can we make as single query with single drop down list  based on the value of the dropdownlist which is visible?

 

 

1)  index=aaa (source="/log/test.log"  $host1$ )
          | rex field=name "(?<DB>[^\.]*)"
          | rename DB AS "Database"
		 | table  Database | dedup Database

2) index=bbb (source="/log/test.log"  $host2$ )
          | rex field=name "(?<DB>[^\.]*)"
          | rename DB AS "Database"
		 | table  Database | dedup Database

 

 

 if ddl1 is visible fetch the value and pass to $host1$ to the  query

if ddl2 is visible fetch the value and pass $host2$ to the query

or based on the drop down list value selected can we set value and pass to query to avoid multiple queries for only differnt host/index?

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

I don't quite follow you. but it seems like you only need a single drop down

index=$index$ (source="/log/test.log"  $host$ )
  | rex field=name "(?<DB>[^\.]*)"
  | stats count by DB

What is selecting your index and host fields

Can you share more of your dashboard XML. 

Note that the above doesn't do the rename or table, as they are not necessary - just use DB as the fields for label/value rather than Database.

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!

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

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...