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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...