Splunk Search

How to set up a limit to max no of events to be searched

tmuthuk
Path Finder

Is there anyway to restrict the max no of events to be searched in an index irrespective of the time chosen the time picker ?

Example : i have 100000 events in a index. But i want the queries executed by users to search only latest 50000 records , irrespective the of the time chosen by the user

Tags (3)

somesoni2
Revered Legend

There is not way to limit the no of events returned by a search, by applying implicit restriction.

For specific searches, you can use "| head X" to limit the no of rows to latest 'X' results, but this is just that particular search level, not the user level or global.

Other restriction that you can apply to limit the no of rows accessed by users is by limiting the time window that they can use. This can be done at Role level (from Splunk UI-> Access Controls -> Roles -> Restrict search time range (value in second), from authorize.conf file in $SPLUNK_HOME/etc/system/local (create if not exists -> Under specific Role -> srchTimeWin stanza)

tmuthuk
Path Finder

Thanks for your reply.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

No, but there is a way to limit the max time range a user can select in the role configuration parameters, which should have a similar effect.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

The setting on on the role definition manager screen.

0 Karma

tmuthuk
Path Finder

Thanks for your Reply .

Could you please explain me how could we set the maximum time range ?

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...