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.

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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...