Splunk Search

Is using index=*proxy* really bad?

davidwaugh
Path Finder

Hello

I have a question. We have lots of indexes, and rather than specify each one, I use index=*proxy* to search across index=some_proxy1 and index=some_proxy2

I understand that obviously index=* is a bad thing to do, but does index=*proxy* really cause bad things to happen in Splunk? I've been using syntax like this for several years, and nothing bad has ever happened.

I did a test on one index

with index=*proxy*

This search has completed and has returned 1,000 results by scanning 117,738 events in 7.115 seconds

with index=some_proxy1

This search has completed and has returned 1,000 results by scanning 121,162 events in 7.318 seconds

As you can see in the example using *proxy* over the same time period was actually quicker.

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @davidwaugh ,

as @ITWhisperer said it isn't always a best practice to haveasterisk at the beginning and the end of a field value, but, for the index field isn't a grave sin.

I'm curious to understand why you have so many indexes: indexes aren't database tables, usually in Splunk you use different indexes when you have different retentions or different access grants, so why do you have so many indexes?

Using many indexes you haven't any advantage and many problems in management.

So I hint to redesign your data structure and use some indexes.

You can differentiate data flows using sourcetype and other fields.

Ciao.

Giuseppe

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Using leading wildcards in searches is generally not a good idea, however, since this is on index it won't be searching all events in all indexes to see if the index matches, it will find the indexes from the list of indexes and only search those.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...