Splunk Search

How to find duplicate field name within event?

dummy1281
Engager

My splunk entry is


firstName="Tom" lastName="Jerry" middleName="TJ" dob="1/1/2023" dept="mice" status="202" dept="house"

In above event, field dept is repeated (with value mice and house). I would like to find all the field names which are duplicated in single event / within the event

Tried dudep and other ways per google suggestion. But not able to get result.

Can you please help me with this. Thanks in advance.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| extract mv_add=t
| foreach *
    [| eval dups=if(mvcount(<<FIELD>>) > 1, if(isnull(dups),"<<FIELD>>",mvappend(dups,"<<FIELD>>")), dups)]
0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...