How do we escape special characters in grok pattern.
The below fails on this text.
Log Line :
2019-09-03 11:52:56.387 - [INFO] - from [Class:xxx.yyy.CLASSNAME Method:METHOD] in 29 - Invalid Key and Password 1234567XXXXXX YYYYY
Grok Pattern:
%{TIMESTAMP_ISO8601:LogTimestamp} - \[%{LOGLEVEL:Loglevel}\] - from \[Class:%{JAVACLASS:Classname} Method:%{WORD:Method}\] in %{NUMBER:num} - Invalid Key and Password %{WORD:Key} %{WORD:Password}
Whenever there is some special chars in last word ie. $YYYYY or YYY$YY , the grok fails. Can you please help me what should be done here to escape special chars ?