# Filebeat apache2 module

**URL:** https://discuss.elastic.co/t/filebeat-apache2-module/82406
**Category:** Beats
**Tags:** filebeat
**Created:** [April 14, 2017, 12:22pm UTC](https://discuss.elastic.co/t/filebeat-apache2-module/82406 "2017-04-14T12:22:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nbrys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nbrys/32/17374_2.png) [@nbrys](https://discuss.elastic.co/u/nbrys)
#### Post date: [April 14, 2017, 12:22pm UTC](https://discuss.elastic.co/t/filebeat-apache2-module/82406/1 "2017-04-14T12:22:21Z")

</div>

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](https://www.elastic.co/guide/en/beats/filebeat/current/_tutorial.html)) and changed nginx to apache2

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [April 14, 2017, 2:26pm UTC](https://discuss.elastic.co/t/filebeat-apache2-module/82406/2 "2017-04-14T14:26:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nbrys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nbrys/32/17374_2.png) [@nbrys](https://discuss.elastic.co/u/nbrys)
#### Post date: [April 18, 2017, 7:07am UTC](https://discuss.elastic.co/t/filebeat-apache2-module/82406/3 "2017-04-18T07:07:41Z")

</div>

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

If you paste it in [http://codebeautify.org/yaml-validator](http://codebeautify.org/yaml-validator) you get:

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

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [April 19, 2017, 1:03pm UTC](https://discuss.elastic.co/t/filebeat-apache2-module/82406/4 "2017-04-19T13:03:23Z")

</div>

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

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

```

Can you please open an [issue](https://github.com/elastic/beats/issues/new) in the Github repo for the documentation bug in the [file](https://github.com/elastic/beats/blob/master/filebeat/docs/modules-overview.asciidoc#variable-overrides).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 17, 2017, 1:11pm UTC](https://discuss.elastic.co/t/filebeat-apache2-module/82406/5 "2017-05-17T13:11:30Z")

</div>

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