Splunk Search

Summarize IDs from several log entries

friziqz
New Member

Hey,

i have a Firewall Log and want to count the sending/receiving domains.
My problem is that there is for one email three or more log entrys.
Each message has a uniqe ID, which is available in every associated log entry.
Is it possible to merge these, so that i dont count an email twice or more.

Thank you 🙂

My current search looks like this:

| rex field=_raw "to=<(?[\w\d\.\-]+\@(?[\d\w\.\-]+)\>)" 
| stats count(domain2) AS Anzahl by domain2 
| rename domain2 AS "Domain Outgoing Anzahl" 
| sort - Anzahl 
| head 50
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this query.

| rex field=_raw "to=<(?[\w\d\.\-]+\@(?[\d\w\.\-]+)\>)" 
| dedup uniqueID
| stats count(domain2) AS Anzahl by domain2 
| rename domain2 AS "Domain Outgoing Anzahl" 
| sort 50 - Anzahl 
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...