Splunk Search

Create report for different fields

ttrumm
New Member

Hi,
I have a search:

source="/var/log/mail.log" to="*mail.com"  OR from="*@mail.com"

How can i build report where i can see columns what show count of emails in day/hour, but the column has two colours, one colour for sent emails and other colour for recived emails.
And some statistics that in that day there were 100 emails 40of them recived and 60 sent.

Tags (2)
0 Karma

kristian_kolb
Ultra Champion

Perhaps something like this could do. The visualization part is left as an exercise to the reader.

your_search | timechart span=1h c as total c(eval(like(to, "%mail.com"))) as sent_count c(eval(like(from, "%mail.com"))) as received_count 

/K

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 ...