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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...