Dashboards & Visualizations

how to fulfill a drop-down list automtically

jip31
Motivator

hello

I want to know if its possible to fullfill a drop down list automatically?
I want to retrieve the field SITE in my drop down list

| inputlookup x.csv| lookup x.csv HOSTNAME as host output SITE

another question
when I add a field manually, if there is a space in the field I cant use it
for example, in the static option if I add a name field like "toto - tutu" and I put the same name in the value field I have no results for this field even if the name if correct
I am obliged to do "toto*" in the value field for having results but its not correct because I have to use the exact name
what can I do please??

thanks

Tags (1)
0 Karma
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

Hi @jip31,

I think these steps might help.

  • Edit your dashboard
  • Add an Input (Drop-down)
  • Edit the input
  • Give token name
  • Scroll down to "Dynamic Options"
  • Paste your search there ( | inputlookup x.csv)
  • Field For Label - Give SITE
  • Field For Value - Give value SITE
  • Apply
  • Save the dashboard

For your second question where you have some value with spaces. You can search that in your search like: | search field=$your_dropdown_token_name|s$
Basically, |s will add quotes on both side as well as if your value itself contents quotes this will escape those. Hence you will be able to search full value.
Hope this helps!!!

View solution in original post

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hi @jip31,

I think these steps might help.

  • Edit your dashboard
  • Add an Input (Drop-down)
  • Edit the input
  • Give token name
  • Scroll down to "Dynamic Options"
  • Paste your search there ( | inputlookup x.csv)
  • Field For Label - Give SITE
  • Field For Value - Give value SITE
  • Apply
  • Save the dashboard

For your second question where you have some value with spaces. You can search that in your search like: | search field=$your_dropdown_token_name|s$
Basically, |s will add quotes on both side as well as if your value itself contents quotes this will escape those. Hence you will be able to search full value.
Hope this helps!!!

0 Karma

jip31
Motivator

perfect all is working!

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...