Splunk Search

Elimination of duplicate logins over time

DonDandrea
Path Finder

My problem is that in my data source, when a user logs on there can be a single entry or multiple entries. I need to eliminate the duplicates for each time interval but allow for future events by that User ID. I have tried dedup and distinct count. Does anyone have any suggestions?

index=* prdwfcs*/88 WFCSUID=UserID | stats count dc(WFCSUID)

index=* prdwfcs*/88 WFCSUID=UserID | dedup WFCSUID
Tags (2)
1 Solution

somesoni2
SplunkTrust
SplunkTrust

If the duplicates have same timestamp and other entries from that User Id are different, dedup of _time should do the job for you.

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

If the duplicates have same timestamp and other entries from that User Id are different, dedup of _time should do the job for you.

ppablo
Retired

Just took care of it @Jeff_Lightly_Splunk 🙂

0 Karma

Jeff_Lightly_Sp
Communicator

If possible, consider marking somesoni2's comment as an answer and accepting that answer. This will help others who may have similar issues in the future and it helps spread karma 🙂

DonDandrea
Path Finder

Thank you somesoni2. dedup by _time did solve my issue.

0 Karma

DonDandrea
Path Finder

Yes, they have the same time stamp. I had not thought of it from that aspect. Thank you!

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Does the multiple/duplicate login entries have same time stamp? Could you post some sample of duplicate entries?

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...