Splunk Search

saved searches

Siddharthnegi
Communicator

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

Labels (1)
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!

Cloud Platform | Customer Change Announcement: Email Notification Will Be Available ...

The Notification Team is migrating our email service provider since currently there’s no support ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...