Splunk Search

How to get a dc on 2 fields?

mgao
Engager

I have two fields, "sender" and "recipient". I want to create a table that lists distinct sender-recipient pairs and the corresponding # of events for each pair. I can't think of how to use stats dc or dedup to do this. Any ideas?

Tags (2)
0 Karma
1 Solution

pradeepkumarg
Influencer
| stats count by sender recepient  

or

| eval sender_recepient = sender."-".recepient | stats count by sender_recepient  

View solution in original post

somesoni2
Revered Legend

How about this? This should give you "list of distinct sender-recipient pairs and the corresponding # of events for each pair"

YOur current search with field sender and recipient
| stats count by sender recipient

pradeepkumarg
Influencer
| stats count by sender recepient  

or

| eval sender_recepient = sender."-".recepient | stats count by sender_recepient  
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...