Splunk Enterprise

how to combine two sources

selvam_sekar
Path Finder

Hi,

I have below spl query and trying to combine them together. please could you suggest?

Expected count is 13919

spl 1:

index=abc sourcetype=123 source="allocation" TERM("1=1") OR TERM("2=2") TERM("3=C") Sender=aaa
TERM("4=region") | dedup ExecId | stats count



## Results Count = 4698

spl 2:

index=abc sourcetype=123 source=*block* TERM("1=1") OR TERM("2=2") | dedup ExecId | stats count

## Results Count = 9221

Labels (1)
Tags (1)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

You should try something like this.

index=abc sourcetype=123 (source="allocation" TERM("1=1") OR TERM("2=2") TERM("3=C") Sender=aaa TERM("4=region")) 
OR 
( source=*block* TERM("1=1") OR TERM("2=2"))
| dedup source ExecId 
| stats count

Just test if dedup is correct for your case.

r. Ismo

View solution in original post

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

You should try something like this.

index=abc sourcetype=123 (source="allocation" TERM("1=1") OR TERM("2=2") TERM("3=C") Sender=aaa TERM("4=region")) 
OR 
( source=*block* TERM("1=1") OR TERM("2=2"))
| dedup source ExecId 
| stats count

Just test if dedup is correct for your case.

r. Ismo

0 Karma
Get Updates on the Splunk Community!

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...

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

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

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

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