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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...