Splunk Search

How to force my user to specify an index

llacoste
Path Finder

Hi,

So I've been facing some challenges with some of my users and I don't really know exactly how to tackle this.

Despite common sense and explaining them on a "welcoming page" on their app how to search with index="theirIndex" sourcetype="blabla" ...

 

They keep on not using index="", because you know, it works... they are searching all the indexes they've got access to with their roles and it's quite annoying when they should really specify an index there.

Do you have any advice on how to introduce that? I read about some filter that could be applied in the past with srchFilter or even thought of removing the Default indexes from their roles but not really sure which work best.

 

Thank you all, sorry if it's an easy question.

 

Ps: yes, my users are quite stubborn sometimes, I already won the "all time" challenge  😉 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I recommend removing the default indexes from their roles.  Once searches stop working they'll learn to use index=.

---
If this reply helps you, Karma would be appreciated.

llacoste
Path Finder

Thought I would do that but I don't really know if that's the best "splunky" way of dealing with it as there is always 10 ways of doing things with Splunk ahah.

 

I'll try it thank you. I'm sure they'll love it 😄

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That is the best way, IMO.  Search filters may be able to accomplish the goal, but they tend to be easy to work around and a challenge to manage.

Workload Management's "Admission Rules" feature has the potential for doing this very well, but lacks the ability to test for the absence of something.  You can block "index=*", for example, but can't determine if an index was not specified.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...