Splunk Enterprise Security

Search for common values from 2 different sourcetypes

sumanssah
Communicator

Hello,

I am trying to create an Splunk query to get common username from 2 different sourcetype :

1st Sourcetype :

index=pan_logs sourcetype=pan:threat log_subtype=spyware | stats count by user

2nd Sourcetype:

index=symantec sourcetype=sep12:ids NOT action="blocked"
| stats count by user

As per requirement I want to create a list of common user value from both searches.

Regards
...............SS

0 Karma
1 Solution

somesoni2
Revered Legend

Give this a try

(index=pan_logs sourcetype=pan:threat log_subtype=spyware) OR ( index=symantec sourcetype=sep12:ids NOT action="blocked")
| stats dc(index) as indexes by user | where indexes=2

View solution in original post

somesoni2
Revered Legend

Give this a try

(index=pan_logs sourcetype=pan:threat log_subtype=spyware) OR ( index=symantec sourcetype=sep12:ids NOT action="blocked")
| stats dc(index) as indexes by user | where indexes=2
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...