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!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...