Dashboards & Visualizations

help on issue with a savedsearch and a token from a dropdown list

jip31
Motivator

Hello

I use the code below in all my dashboard searches in order to filter results by SITE from a dropdown list and it works perfectly

| lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
| search SITE=$tok_filtersite|s$ 

But I need to use savedsearches in my dashboard
So I call a search from my dshboard like this

| loadjob savedsearch="admin:SA_xxxx_xx_xx_xx_xx_sh:Hardware - Battery last 10"   
| search SITE=$tok_filtersite|s$ 

And I keep | lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE in the search
But I have no results only when I delete | search SITE=$tok_filtersite|s$ ...
So there is an issue with this token in the savedsearches
What I have to do please??

Tags (1)
0 Karma
1 Solution

vnravikumar
Champion

Hi

Are you getting SITE info after executing savedsearch

View solution in original post

0 Karma

vnravikumar
Champion

Hi

Are you getting SITE info after executing savedsearch

0 Karma

jip31
Motivator

hi
I dont understand what you mean
what I need is to :
1) execute my search in a savedsearch
2) filter the data by SITE from the dropdown list in the dashboard (tok_filtersite)

0 Karma

jip31
Motivator

if i am doing this I have no results so I ont get the SITE
| loadjob savedsearch="admin:xxxxx:Hardware - Battery last 10"
| search SITE=*

0 Karma

jip31
Motivator

oh I think I have found
its because in the search I rename SITE by Site
so | search SITE=$tok_filtersite|s$ has to be replaced by | search Site=$tok_filtersite|s$

0 Karma

vnravikumar
Champion

Whether it's working now?

0 Karma

jip31
Motivator

Yes
if I do | loadjob savedsearch="admin:xxxxx:Hardware - Battery last 10"
| search Site=* it works

0 Karma

vnravikumar
Champion

Good to know

0 Karma

vnravikumar
Champion

Please accept to close the issue.

0 Karma

vnravikumar
Champion

Please confirm whether are you getting values after executing this statement | loadjob savedsearch="admin:xxxxx:Hardware - Battery last 10" without | search SITE=* if yes, SITE info is there?

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