Subject: | support more syslog formats |
After switching Message::Passing::Input::Syslog to Parse::Syslog::Line instead of parsing the syslogs myself, I found that some messages aren't fully parsed in regard to the program_ fields.
This are two example formats, note the additional ': ' between hostname and program in the second message which isn't parsed correctly:
# Cisco ASA firewall without 'logging device-id hostname'
# <163>Jun 7 18:39:00 hostname.domain.tld %ASA-3-313001: Denied ICMP type=5, code=1 from 1.2.3.4 on interface inside
# Cisco ASA firewall with 'logging device-id hostname' or 'logging device-id string $hostname'
# <161>Jun 7 18:39:00 hostname : %ASA-3-313001: Denied ICMP type=5, code=1 from 1.2.3.4 on interface inside
So far the priority and datetime parsing succeeds for the log formats I've encountered, only the program parsing fails for some.
It might be a good idea to make the parsing of the parts configurable.