Splunk Search

How can I compare a list of users to another set?

daniel333
Builder

All,

Say I query Splunk and get a list of 1000 users today. And tomomorrow I do the same thing and get 1002 users. How can I get the 2 new users appeared over night? Basically diff the results of two searches?

0 Karma

somesoni2
Revered Legend

Try like this

your base search ran with time-range for last two days (yesterday and day before yesterday) earliest=-2d@d latest=@d| eval day=strftime(_time,"%m/%d/%Y") | stats values(day) as days by user | where mvcount(days)=1  AND days=strftime(relative_time(now(),"-1d@d"),"%m/%d/%Y") 
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...