Hi,
I am trying to parse the following message;
##SEVERE 05-Jan-2017 06:02:25.562 Fatal error##
I am using grok in Logstash like below;
filter {
grok {
match => { "message" => "^##(?<severity>(SEVERE|INFO|WARN)) (?:%{SYSLOGTIMESTAMP:timestamp}) %{GREEDYDATA:errorname}##" }
}
}
This gives me a _grokparsefailure
How can I fix this?
Thank you.
SYSLOGTIMESTAMP is defined like this:
DATE %{DATE_US}|%{DATE_EU}
DATESTAMP %{DATE}[- ]%{TIME}
TZ (?:[PMCE][SD]T|UTC)
DATESTAMP_RFC822 %{DAY} %{MONTH} %{MONTHDAY} %{YEAR} %{TIME} %{TZ}
DATESTAMP_RFC2822 %{DAY}, %{MONTHDAY} %{MONTH} %{YEAR} %{TIME} %{ISO8601_TIMEZONE}
DATESTAMP_OTHER %{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{TZ} %{YEAR}
DATESTAMP_EVENTLOG %{YEAR}%{MONTHNUM2}%{MONTHDAY}%{HOUR}%{MINUTE}%{SECOND}
HTTPDERROR_DATE %{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}
# Syslog Dates: Month Day HH:MM:SS
SYSLOGTIMESTAMP %{MONTH} +%{MONTHDAY} %{TIME}
PROG [\x21-\x5a\x5c\x5e-\x7e]+
SYSLOGPROG %{PROG:program}(?:\[%{POSINT:pid}\])?
SYSLOGHOST %{IPORHOST}
SYSLOGFACILITY <%{NONNEGINT:facility}.%{NONNEGINT:priority}>
HTTPDATE %{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME} %{INT}
# Shortcuts
QS %{QUOTEDSTRING}
# Log formats
Your timestamp clearly doesn't match that pattern. Try %{MONTHDAY}-%{MONTH}-%{YEAR} %{TIME}
instead.
WOW.. it worked.. Thank you so much @magnusbaeck
system
(system)
Closed
February 16, 2017, 11:56am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.