Skip to content

Instantly share code, notes, and snippets.

@clay584
Created September 30, 2014 16:45
Show Gist options
  • Save clay584/d7efed359fa8f12fd897 to your computer and use it in GitHub Desktop.
Save clay584/d7efed359fa8f12fd897 to your computer and use it in GitHub Desktop.
#parse ASA log
grok {
patterns_dir => "/opt/logstash/logstash-1.4.0/patterns"
break_on_match => false
match => [ "raw_message", "%{CISCOFACSEVMNEM} %{WORD:Action} %{WORD:IPProtocol} src %{WORD:SourceZone}:%{IP:SourceAddress}\/%{POSINT:SourcePort} dst %{WORD:DestinationZone}:%{IP:DestinationAddress}\/%{POSINT:DestinationPort} by access-group \"%{NOTSPACE:rule}\"%{GREEDYDATA}",
"raw_message", "%{CISCOFACSEVMNEM} %{WORD:Action} %{IPPROTOCOL:IPProtocol} src %{WORD:SourceZone}:%{IP:SourceAddress} dst %{WORD:DestinationZone}:%{IP:DestinationAddress} %{DATA:icmp_type_code} by access-group \"%{WORD:Rule}\"%{GREEDYDATA}",
"raw_message", "%{CISCOFACSEVMNEM} %{GREEDYDATA:description}" ]
}
mutate {
remove_field => [ "message", "raw_message" ]
add_field => [ "Application", "asa_unknown" ]
lowercase => [ "Action" ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment