Dashboards & Visualizations

Based on drop down list value how to change search string in each panel

Jasmine
Path Finder

Based on drop down list value how to change search string in each panel

eg 

for panel to load the search string will vary as below:

index=test (source="/test/log/path/test1.log" $param1$  c="$param2$" $dropdownlistvalue1$ $dropdownlistvalue1$)


As log path is different all my params vary. so how can i change index based of drop down list value?

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You might be able to use the change stanza for the input to set up multiple tokens based on the value selected. For example, your value in the drop down could have 3 parts delimited by some character, e.g. colon. The change stanza would then process the value and set 3 different tokens based on the 3 parts of the value.

0 Karma

Jasmine
Path Finder

can u pls.s give some sample. my requiremnt is i do have two differnt paths

index=test (source="/test/log/path/test1.log" )
index=test (source="/test/log/path/test2.log" )

based on dropdownlist value the above the path should be taken in Search string

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

What do you currently have in your dropdown?

0 Karma

Jasmine
Path Finder

eg. i have in drop down i have server and cloud. 

if i select Server - the path would be 

source="/test/log/path/server1.log"

 

if i select cloud the path would be vary for each region.

for TEST -  source="/test/log/path/testserver1.log"

for QA -   source="/test/log/path/qaserver1.log"

for PROD -   source="/test/log/path/prodserver1.log"

 

so i kept the first drop down list to select server and cloud. And then environment drop down lsit. and remaining panels load based on the server/cloud drop down list and env .drop down list

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Couldn't you just have one drop down?

EnvironmentLog source
Server/test/log/path/server1.log
TEST/test/log/path/testserver1.log
QA/test/log/path/qaserver1.log
PROD/test/log/path/prodserver1.log

 

0 Karma

Jasmine
Path Finder

i want to add  in source

index=test (source="/test/log/path/qaserver1.log")

without showing these path in dropdown list to user.. can we have some other method?.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The dropdown has two fields, the label and the value - it is the label that is shown to the user and the value which is put in the token

When you use the token in a search, the value can be found out by the user if they open the search in another window. There are ways to make this more difficult to find out but do you really need to go that far?

0 Karma

Jasmine
Path Finder

So we have to create two different drop down list for each path and show/hide can be used?

0 Karma
Get Updates on the Splunk Community!

Cloud Platform | Customer Change Announcement: Email Notification Will Be Available ...

The Notification Team is migrating our email service provider from Postmark to AWS Simple Email ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...