Splunk Enterprise

Cisco ASA Deny Stats

mitcht
New Member

I want to build a query that pulls Cisco ASA events based on a particular syslog message ID which shows denied traffic. I dedup the information for events that have the same source ip, destination ip, destination port and action. 

It seems to work well however now I would like to have a count added for each time that unique combination is seen.

Query is:

index=cisco sourctype=cisco:asa message_id=XXXXXX |
dedup host, src_ip, dest_ip, dest_port, action |
table host, src_ip, dest_ip, dest_port, action |
sort host, src_ip, dest_ip, dest_port, action

That query gives me a table that appears to be dedup'ed however I would like to add a column that shows how many times each entry is seen.

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

To get a count, replace the dedup command with stats.  Since the stats command sorts it results, you don't need the separate sort command.

index=cisco sourctype=cisco:asa message_id=XXXXXX 
| stats count by host, src_ip, dest_ip, dest_port, action 
| table host, src_ip, dest_ip, dest_port, action count

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...

Get ready to show some Splunk Certification swagger at .conf24!

Dive into the deep end of data by earning a Splunk Certification at .conf24. We're enticing you again this ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Now On-Demand Join us to learn more about how you can leverage Service Level Objectives (SLOs) and the new ...