All Apps and Add-ons

Restricting searches that are too open

mkarimi
Path Finder

In order to lower the IOPS, I would like to restrict a specifc user role to search by index AND source type. in addition I would like to restrict things like "all time" searches to only power users. not sure what to put in the "Restrict search terms" field of the role. can someone help or point me in the right direction?

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can restrict roles to a certain time span by setting "Restrict search time range" to a number of seconds. Say you set that to 864000 (ten days) and someone selects "All time" the search will cut off at May 11th, 14:40 UTC - ten days into the past. If someone selects "past year" it will load December 22nd 00:00 through December 31st 24:00.

If you visually want to remove the "All time" shortcut from the time range picker you can always restrict its visibility to certain roles only (Settings -> User interface -> Time ranges), but that alone isn't going to stop anyone from launching an all time search manually by setting earliest=0 latest=now in the search.

0 Karma

aelliott
Motivator

Indexes you can select farther down the form

Here is an example of restricting to 2 sourcetypes
"sourcetype=mySourceType OR sourcetype=myothersourcetype"

Here is a post with someone having a similar request:
http://answers.splunk.com/answers/75912/restrict-search-terms-conditionally-depending-on-the-index-b...

mkarimi
Path Finder

is it possible to take away the "all time" away?

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...