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!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...