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!

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