Splunk Dev

How to set the default value of a multiselect input box to the results of a search?

coleman07
Path Finder

I want all results from a search to be the default for a multiselect input box. I don't think it can be done with SimpleXML but I suspect it can happen with JavaScript using the val method. How would I run the search from the search manager, retrieve the results and fill in the Multiselect box?

Labels (2)

vaibhavsuneja
New Member

Use following in multiselect:-

All
*

0 Karma

sundareshr
Legend

The multiselect input can be populated with results from a search by defining the search query in the dynamic results. To use * as the default, you can add one static option - name=All value=* and set that as the default.

http://docs.splunk.com/Documentation/Splunk/6.4.0/Viz/PanelreferenceforSimplifiedXML#input_type_.22m...

chuckers
Path Finder

I downvoted this post because using value=* does not quite address the scenario.

imagine a systems with thousands of host values. my dynamic search in the input will find at most only 20 of these thousands of hosts. but on any given day, it will find only a subset of those 20 host values...

if today it finds only 4 host values, i'd like the default value for the input to be only those 4 hosts (not host=*). tomorrow the default might be some set of 7 host values...

i'd find this very useful if there is a way to do it in simple xml. thanks!

akshatprakash
Engager

@chuckers were you able to find how to dynamically populate all in the default value for input as you wanted? i am also looking to do the same.

Purk9
Explorer
i am also looking to do the same......did you find the answer?
0 Karma

coleman07
Path Finder

I would prefer to not use All and, instead, have all the results appear in the multiselect when the dashboard is displayed. I can't seem to assign a search manager to fill the default values.

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...