Splunk Search

Repeating fields

klaudiac
Path Finder

Hi guys, 

I'm looking to add a new column to my inputlookup. 

The idea is to mark the values that repeat e.g.: 

Email Threat Attachment DeliveredAnalytics
Voice mail spamNetwork
Jira HeartbeatN/A
Voice mail spamNetwork

 

And do something like this: 

NameZoneRepeats
Email Threat Attachment DeliveredAnalyticsNo
Voice mail spamNetworkYes
Jira HeartbeatN/ANo
Voice mail spamNetworkYes

 

I know I can just do a | stats count by Name, but that doesn't solve my problem.

Any hints on how to solve it would be greatly appreciated 🙂 

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why does stats not solve your problem?  Have you tried eventstats?

| makeresults | eval _raw="Name                                Zone
Email Threat Attachment Delivered   Analytics
Voice mail spam	                    Network
Jira Heartbeat	                    N/A
Voice mail spam	                    Network" | multikv forceheader=1
```Above just sets up test data```
| eventstats count as Repeats by Name,Zone
| eval Repeats=if(Repeats=1,"No", "Yes")
| table Name Zone Repeats

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

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