Splunk Search

Compare results from day to day

girtsgr
Explorer

Let's assume I have data structured like this:
|timestamp|user|action|
|2019-09-10 13:40|user1|action1|
|2019-09-10 12:40|user2|action2|
|2019-09-09 12:40|user3|action3|
|2019-09-09 13:40|user1|action1|
|2019-09-09 12:40|user3|action4|
|2019-09-09 11:40|user1|action1|
|2019-09-09 09:40|user2|action2|

Now, I would like to search for events where users have performed the same actions, in this case, I would like to have these events in my search:
|2019-09-10 13:40|user1|action1|
|2019-09-09 13:40|user1|action1|
|2019-09-09 11:40|user1|action1|
|2019-09-10 12:40|user2|action2|
|2019-09-09 09:40|user2|action2|

I tried subsearches and selfjoin, but to no avail. In what direction should I look?

0 Karma
1 Solution

ChrisCLewis
Communicator

Hopefully this will give you a new direction

|eval unique=user."".action
|stats dc(unique) as filter values(time) as time by user action |where filter>1 |sort user |fields - filter

View solution in original post

0 Karma

ChrisCLewis
Communicator

Hopefully this will give you a new direction

|eval unique=user."".action
|stats dc(unique) as filter values(time) as time by user action |where filter>1 |sort user |fields - filter

0 Karma

girtsgr
Explorer

Thank you, this seems promising.

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