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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...