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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...