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!

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 ...