Splunk Search

How to search for two groups of field values?

arrowecssupport
Communicator

So I've got 2 different values I'm trying to use; letters & numbers. I want to be able to say

If letters = a b or c & numbers = 1 2 or 3

index = test letters = "a" OR letters = "b" OR letters = "c" AND numbers = "1" or numbers = "2" OR numbers = "3"

I don't think this is quite right. Any ideas?

0 Karma

woodcock
Esteemed Legend

You need parentheses:

 index = test (letters = "a" OR letters = "b" OR letters = "c") AND (numbers = "1" or numbers = "2" OR numbers = "3")
0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...