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!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...