# Filebeat start config wrong

**URL:** <https://discuss.elastic.co/t/filebeat-start-config-wrong/319502>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 22, 2022, 1:54am UTC](https://discuss.elastic.co/t/filebeat-start-config-wrong/319502 "2022-11-22T01:54:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)\
**Post date:** [November 22, 2022, 1:54am UTC](https://discuss.elastic.co/t/filebeat-start-config-wrong/319502/1 "2022-11-22T01:54:53Z")

</div>

I've tried to read my nginx logs trough filebeats on Windows (for test) but something goes wrong. Can You suggest?

```auto
- module: nginx
  # Access logs
  access:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:
     var.paths: 'C:\\Users\\test\\Documents\\elk\\mylog\\nginx_access.log'

# Error logs
  error:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:
     var.paths: 'C:\\Users\\test\\Documents\\elk\\mylog\\nginx_error.log'
  # Ingress-nginx controller logs. This is disabled by default. It could be used in Kubernetes environments to parse ingress-nginx logs
  ingress_controller:
    enabled: false

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:

```

"log.level":"error","@timestamp":"2022-11-22T02:51:12.327+0100","log.origin":{"file.name":"cfgfile/reload.go","file.line":273},"message":"Error loading config from file 'C:\Program Files\Filebeat\modules.d\nginx.yml', error invalid config: yaml: line 11: did not find expected key","service.name":"filebeat","ecs.version":"1.6.0"}`Preformatted text

---

<div class="post-metadata">

**Author:** ![Tetiana\_Kravchenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tetiana_kravchenko/32/102683_2.png) [@Tetiana\_Kravchenko](https://discuss.elastic.co/u/Tetiana_Kravchenko)\
**Post date:** [November 24, 2022, 10:14am UTC](https://discuss.elastic.co/t/filebeat-start-config-wrong/319502/2 "2022-11-24T10:14:22Z")

</div>

Hi @INS

It seems you have wrong indentations:

```auto
- module: nginx
  # Access logs
  access:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:
    var.paths: 'C:\\Users\\test\\Documents\\elk\\mylog\\nginx_access.log' # extra ' ' in this line

# Error logs
  error:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:
    var.paths: 'C:\\Users\\test\\Documents\\elk\\mylog\\nginx_error.log' # extra ' ' in this line
  # Ingress-nginx controller logs. This is disabled by default. It could be used in Kubernetes environments to parse ingress-nginx logs
  ingress_controller:
    enabled: false

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:

```

---

<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:** [December 22, 2022, 12:14pm UTC](https://discuss.elastic.co/t/filebeat-start-config-wrong/319502/3 "2022-12-22T12:14:41Z")

</div>

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