I'm configuring filebeat to multiline any line not containing a date in 3 formats as shown below in the configuration snippet.
# Date with hyphen seperator.
pattern: "^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])"
negate: true
match: after
# Date without seperator.
pattern: "^(19|20)\d\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])"
negate: true
match: after
# Syslog date.
pattern: "^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d"
negate: true
match: after
This results in the following message:
Loading config file error: YAML config parsing failed on C:/Programs/elastic/filebeat-1.1.0-windows/cdc.yml: yaml: line 138: found unknown escape character. Exiting.
If I remove the double quotes from the first regular expression, the error jumps to the second expression:
Loading config file error: YAML config parsing failed on C:/Programs/elastic/filebeat-1.1.0-windows/cdc.yml: yaml: line 143: found unknown escape character. Exiting.
And so on, until I remve from the final expression and get the following:
2016/02/03 13:51:44.614181 geolite.go:61: INFO Loaded GeoIP data from: C:/Programs/elastic/filebeat-1.1.0-windows/GeoLiteCity.dat
2016/02/03 13:51:44.615181 logstash.go:106: INFO Max Retries set to: 3
2016/02/03 13:51:44.623181 outputs.go:119: INFO Activated logstash as output plugin.
2016/02/03 13:51:44.623181 publish.go:288: INFO Publisher name: NODE-1
2016/02/03 13:51:44.629182 async.go:78: INFO Flush Interval set to: 1s
2016/02/03 13:51:44.630182 async.go:84: INFO Max Bulk Size set to: 2048
2016/02/03 13:51:44.630182 beat.go:147: INFO Init Beat: filebeat; Version: 1.1.0
2016/02/03 13:51:44.632182 beat.go:173: INFO filebeat sucessfully setup. Start running.
2016/02/03 13:51:44.632182 registrar.go:66: INFO Registry file set to: C:\ProgramData\filebeat\registry
2016/02/03 13:51:44.632182 registrar.go:76: INFO Loading registrar data from C:\ProgramData\filebeat\registry
2016/02/03 13:51:44.633182 prospector.go:127: INFO Set ignore_older duration to 8760h0m0s
2016/02/03 13:51:44.633182 prospector.go:127: INFO Set scan_frequency duration to 10s
2016/02/03 13:51:44.633182 prospector.go:87: INFO Input type set to: log
2016/02/03 13:51:44.633182 prospector.go:127: INFO Set backoff duration to 1s
2016/02/03 13:51:44.633182 prospector.go:127: INFO Set max_backoff duration to 10s
2016/02/03 13:51:44.633182 prospector.go:107: INFO force_close_file is disabled
2016/02/03 13:51:44.633182 prospector.go:137: INFO Starting prospector of type: log
2016/02/03 13:51:44.634182 spooler.go:77: INFO Starting spooler: spool_size: 2048; idle_timeout: 5s
2016/02/03 13:51:44.634182 crawler.go:78: INFO All prospectors initialised with 0 states to persist
2016/02/03 13:51:44.634182 registrar.go:83: INFO Starting Registrar
2016/02/03 13:51:44.634182 log.go:113: INFO Harvester started for file: C:/Programs/elastic/logs/artifactory/server.log
2016/02/03 13:51:44.634182 log.go:135: ERR Stop Harvesting. Unexpected encoding line reader error: error parsing regexp: invalid escape sequence: \d
I know all the expressions are good as they have been tested elsewhere. Does anyone know how to overcome this?
Thanks,