Splunk Search

1. I am new at splunk and would like to know how to search two separate months in the same search syntax? 2. I would also like to know how to put 2 searches in one search.

GHOST27
Engager

Starting with this:

index=* smtp sourcetype="""""""" email="*" date_month=june

I tried date_month=may AND june and it did not work. I need this:

index=* smtp sourcetype="""""""" email="*" date_month=may 
| table _time sourcetype email src det count src_tags 
| stats count by _time sourcetype src det email  

And:

index=* smtp sourcetype="""""""" email="*" date_month=june 
| table _time sourcetype email src det count src_tags 
| stats count by _time sourcetype src det email

Do I use a I use the join command? Can you provide an example.

Tags (2)
0 Karma
1 Solution

cmerriman
Super Champion

can you try this:

index= smtp sourcetype="""""""" email="" (date_month=may OR date_month=june )
| stats count by _time sourcetype src det email 

View solution in original post

cmerriman
Super Champion

can you try this:

index= smtp sourcetype="""""""" email="" (date_month=may OR date_month=june )
| stats count by _time sourcetype src det email 
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 ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

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

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