Splunk Enterprise Security

How to make a graph of the following query

christianubeda
Path Finder

Hi team!

It's my very first time with Splunk and I need help.

This is my query and I would like to make a graph that will tell me the number of events per day during a week

index=xxx_paloalto sourcetype="pan:traffic" type=TRAFFIC
(src_zone!="Inet-WAN1" AND src_zone!="Inet-WAN2")
(dest_zone!="Inet-WAN1" AND dest_zone!="Inet-WAN2") | bin _time span=20s

| stats values(src_zone) as src_zone,count, values(dest_ip) as dest_ip,values(dest_zone) as dest_zone, values(user) as User, values(vendor_action) as Action by src_ip, generated_time | where (mvcount(dest_ip) >= 10)

I want to transform this number into a count.
alt text

Thank you!

0 Karma

Ayn
Legend

Add a | stats count to the end. 🙂

christianubeda
Path Finder

Perfect! Now I have a number!

Just one more thing. How can I do now a grafh? I need events per day in 7 days.

I mean L 8 events, M 4 events, X 9 eventes...

Thanks!

0 Karma

DalJeanis
Legend

instead of

| stats count

do

| bin  generated_time as _time span=1d
| stats count by _time  
0 Karma

niketn
Legend

@christianubeda, instead of you could do dc(dest_ip) as unique_dest_ip_count in your stats itself. Then use | where unique_dest_ip_count >= 10. Finally add | stats count as suggested by Ayn

index=xxx_paloalto sourcetype="pan:traffic" type=TRAFFIC 
(src_zone!="Inet-WAN1" AND src_zone!="Inet-WAN2")
(dest_zone!="Inet-WAN1" AND dest_zone!="Inet-WAN2") 
| bin _time span=20s
| stats dc(dest_ip) as unique_dest_ip_count by src_ip, generated_time
| where unique_dest_ip_count >= 10
| stats count
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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