Splunk Search

Set operator

ronak
Path Finder

I've tried using SET operator to find all the users who satisfy first condition but are not present in second search with different condition...below is an example query..

given set operator's limit of 10k records, I'm trying to find the best way to implement SET operations especially DIFF

Any pointers would be great

thanks, ronak

| set diff [search  index=mobile   Action_Name=Page_View  OS="*" (app_usage_location=*Stadium* OR app_usage_location=*Park* OR app_usage_location=*Unkno*) | fields user_id] [ search  index=mobile   Action_Name=Page_View  OS="*" NOT(app_usage_location=*Stadium* OR app_usage_location=*Park* OR app_usage_location=*Unkno*) |fields user_id] | stats dc(user_id)
Tags (1)
0 Karma

somesoni2
Revered Legend

Try this

index=mobile Action_Name=Page_View OS="*" | eval temp=if(like(app_usage_location,"%Stadium%") OR like(app_usage_location,"%Park%" OR like(app_usage_location,"%Unkno%"),1,2) | stats values(temp) as temp by user_id | where mvcount(temp)=1 | fields user_id

0 Karma
Get Updates on the Splunk Community!

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 ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...