1
votes

I'm following this documentation https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-apache2.html in order to connect an apache web server access log file using file beat to elasticsearch, everything was ok until I changed the path of apache2.yml I got the following error :

2018-09-22T14:21:55.791+0100    ERROR   instance/beat.go:691    Exiting: 1 error: error
loading config file: invalid config: yaml: line 3: found unknown escape character
Exiting: 1 error: error loading config file: invalid config: yaml: line 3: found unknown escape character

this id apache2.yml configuration file :

    - module: apache2
  access:
    enabled: true
    var.paths: ["‪C:\Program Files\filebeat-6.3.2-windows\logs\Apache\Access.log"]
2
Have you tried to double the backslashes? i.e. \\ instead of \Val
nope I'll try it , I hope it works !Ikbel benab
To use the Apache module have I set up the filebeat.yml too coz in the official documentation, I didn't see any requirement about it???Ikbel benab

2 Answers

1
votes

If you are using double quotes in

"‪C:\Program Files\filebeat-6.3.2-windows\logs\Apache\Access.log"

you need to escape the backslash characters

"‪C:\\Program Files\\filebeat-6.3.2-windows\\logs\\Apache\\Access.log"
1
votes

Use / instead of . \ is used to escape characters. I had the same problem