Dashboards & Visualizations

Filter results while Populating Drop down box

karthikbalakris
Explorer

hi all,
i have a drop down list box which displays the host names. but i want to filter the hosts that are displayed based on the host names.
For Ex: I have hosts named
ABC_1
ABC_2
DEF_1
DEF_2
Now i want the drop down bow to display only ABC_* Is this possible?
My current xml code is

"populatingSearch fieldForValue= "host" fieldForLabel="host">
| metadata type=hosts | hosts = "ABC_*"
/populatingSearch>"

But this is not working as expected. Kindly help.

Tags (2)
0 Karma
1 Solution

MHibbin
Influencer

Try:

| metadata type=hosts | search hosts="ABC_*"

View solution in original post

MHibbin
Influencer

Cool, glad it helped, can you mark the answer as accepted then please to let the community know, that no further help is required. Thanks

0 Karma

karthikbalakris
Explorer

@MHibbin

Your idea worked, with a very small correction though. Here is teh one that worked:

| metadata type=hosts | search host="HPSM_QA_*"

Its search hosts and not search hosts

anyway the idea is your and all the credit is to you.
Thanks So much

0 Karma

MHibbin
Influencer

Try:

| metadata type=hosts | search hosts="ABC_*"

karthikbalakris
Explorer

TYPO
Its search host and not search hosts

0 Karma

karthikbalakris
Explorer

@MHibbin

Your idea worked, with a very small correction though. Here is teh one that worked:

| metadata type=hosts | search host="HPSM_QA_*"

Its search hosts and not search hosts

anyway the idea is your and all the credit is to you.
Thanks So much

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