Filebeat apache2 module

I'm currently trying to send apache2 logs using filebeat to elasticsearch. I've got the following at the end of my filebeat.yml file:

filebeat.modules:
- module: apache2
      access:
          var.paths = ["/var/log/apache2/access.log*"]
 - module: system

But when i start filebeat, i get the following error:
Exiting: Error unpacking module config: Error creating config from fileset apache2/access: type 'string' is not supported on top level of config, only dictionary or list

Any idea on how to solve this? I have copied this code from the documentation (https://www.elastic.co/guide/en/beats/filebeat/current/_tutorial.html) and changed nginx to apache2

Hi @nbrys, the YAML isn't valid due to indentation issues. Try yours at http://www.yamllint.com/. Then compare that again to what's on the page you linked.

Hi @andrewkroh, i've copied the config section from https://www.elastic.co/guide/en/beats/filebeat/current/_tutorial.html

If you paste it in http://codebeautify.org/yaml-validator you get:

Error : Unable to parse.
Line : 4 var.paths = ["/var/log/nginx/access.log*"]

I should have noticed that equals sign. It should not be there. Replace it with a : like

filebeat.modules:
- module: nginx
  access:
    var.paths: ["/var/log/nginx/access.log*"]

Can you please open an issue in the Github repo for the documentation bug in the file.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.