Splunk Search

What is the best way to search email subjects by "is" or "contains"?

packet_hunter
Contributor

Scenarios:

1) searching email logs for an exact subject so I use quotes

index=mail sourcetype=xemail subject = "exact subject"

2) searching email logs for subjects that contains [blah blah] so I use *

index=mail sourcetype=xemail subject = *blah blah*

But what about * "blah blah" or * "blah blah" * or "blah blah" * ?

Can anyone explain the best way to search by "is" or "contains" ?

Thank you

0 Karma
1 Solution

somesoni2
Revered Legend

It should be "blah blah" , preferably inside double quotes, for 'contains'. For 'is', subject="Full exact string" shoud work fine.

View solution in original post

0 Karma

somesoni2
Revered Legend

It should be "blah blah" , preferably inside double quotes, for 'contains'. For 'is', subject="Full exact string" shoud work fine.

0 Karma

packet_hunter
Contributor

Thank you, you are correct, I was just wondering about the * because that works too but I will use your method 🙂

0 Karma
Get Updates on the Splunk Community!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...