Splunk Search

How to filter duplicate KV entries?

RHogg
Engager

Hi guys,

I was wondering if someone could point me in the right direction with an issue I've been having.

Basically I have a search thats set to pull usernames from a KV lookup, the issue is theres "duplicate" entries in the lookup e.g.
Username and Username@email

Is there any way to stop the duplicate users from appearing in the search results? I seem to be at a bit of a dead end.

Thanks

Tags (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Those are not duplicates. If you want to filter out similar results then you need to modify your search to normalize the data. For example:

... | eval username = replace(username, "@.*", "")
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Those are not duplicates. If you want to filter out similar results then you need to modify your search to normalize the data. For example:

... | eval username = replace(username, "@.*", "")
---
If this reply helps you, Karma would be appreciated.

RHogg
Engager

Just what I needed Rich, thanks very much! 🙂

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...