Skip to content

Commit

Permalink
Allow optional space between sysloghost and colon.
Browse files Browse the repository at this point in the history
Closes elastic/logstash#2101. If a Cisco ASA has a logging
device-id set, the syslog message emitted contains an additional space
after the device-id and therefore does not match the grok pattern
CISCO_TAGGED_SYSLOG. An optional space should be allowed by the pattern
between the device-id (which is captured as sysloghost) and the colon
character.
  • Loading branch information
Rod Montgomery authored and Pere Urbon-Bayes committed Sep 9, 2015
1 parent 969cc77 commit 0f077c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patterns/firewalls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
NETSCREENSESSIONLOG %{SYSLOGTIMESTAMP:date} %{IPORHOST:device} %{IPORHOST}: NetScreen device_id=%{WORD:device_id}%{DATA}: start_time=%{QUOTEDSTRING:start_time} duration=%{INT:duration} policy_id=%{INT:policy_id} service=%{DATA:service} proto=%{INT:proto} src zone=%{WORD:src_zone} dst zone=%{WORD:dst_zone} action=%{WORD:action} sent=%{INT:sent} rcvd=%{INT:rcvd} src=%{IPORHOST:src_ip} dst=%{IPORHOST:dst_ip} src_port=%{INT:src_port} dst_port=%{INT:dst_port} src-xlated ip=%{IPORHOST:src_xlated_ip} port=%{INT:src_xlated_port} dst-xlated ip=%{IPORHOST:dst_xlated_ip} port=%{INT:dst_xlated_port} session_id=%{INT:session_id} reason=%{GREEDYDATA:reason}

#== Cisco ASA ==
CISCO_TAGGED_SYSLOG ^<%{POSINT:syslog_pri}>%{CISCOTIMESTAMP:timestamp}( %{SYSLOGHOST:sysloghost})?: %%{CISCOTAG:ciscotag}:
CISCO_TAGGED_SYSLOG ^<%{POSINT:syslog_pri}>%{CISCOTIMESTAMP:timestamp}( %{SYSLOGHOST:sysloghost})? ?: %%{CISCOTAG:ciscotag}:
CISCOTIMESTAMP %{MONTH} +%{MONTHDAY}(?: %{YEAR})? %{TIME}
CISCOTAG [A-Z0-9]+-%{INT}-(?:[A-Z0-9_]+)
# Common Particles
Expand Down

0 comments on commit 0f077c1

Please sign in to comment.