Splunk Search

saved searches

Siddharthnegi
Contributor

can I find all the saved searches which are using index=* rather than giving specific name. And all the saved searches which are not using (index) in their search

0 Karma

yuanliu
SplunkTrust
SplunkTrust

Something like

| rest /services/saved/searches
| where match(search, "\bindex *= *(\* |\*$)")
  OR NOT match(search, "\bindex *=")
| fields title search
Tags (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

This will get you the saved searches

| rest "/servicesNS/-/-/saved/searches" splunk_server=local 

and it will return a field called 'search' - you can then look in that to see what search statements are being used. Note that if your search contains macros you will also have to expand the macros too and search those.

 

0 Karma
Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk + Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...