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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...