# Filebeat fail to start

**URL:** <https://discuss.elastic.co/t/filebeat-fail-to-start/111305>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 12, 2017, 10:45am UTC](https://discuss.elastic.co/t/filebeat-fail-to-start/111305 "2017-12-12T10:45:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![teejayuu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teejayuu/32/18356_2.png) [@teejayuu](https://discuss.elastic.co/u/teejayuu)\
**Post date:** [December 12, 2017, 10:45am UTC](https://discuss.elastic.co/t/filebeat-fail-to-start/111305/1 "2017-12-12T10:45:32Z")

</div>

Trying to ingest IIS logs to logstash. Have installed filebeat 5.3.2 on an IIS server and modified filebeat.yml as below:  
###################### Filebeat Configuration Example #########################

```
# This file is an example configuration file highlighting only the most common
# options. The filebeat.full.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html

#=========================== Filebeat prospectors =============================

filebeat.prospectors:

# Each - is a prospector. Most options can be set at the prospector level, so
# you can use different prospectors for various configurations.
# Below are the prospector specific configurations.

- input_type: log

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    #- /var/log/*.log
    # Add the path to IIS Logs
    - d:\Inetpub\logs\logfiles\*\*
    document_type: iis

  # Exclude lines. A list of regular expressions to match. It drops the lines that are
  # matching any regular expression from the list.
  #exclude_lines: ["^DBG"]

  # Include lines. A list of regular expressions to match. It exports the lines that are
  # matching any regular expression from the list.
  #include_lines: ["^ERR", "^WARN"]

  # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  # are matching any regular expression from the list. By default, no files are dropped.
  #exclude_files: [".gz$"]

  # Optional additional fields. These field can be freely picked
  # to add additional information to the crawled log files for filtering
  #fields:
  # level: debug
  # review: 1

  ### Multiline options

  # Mutiline can be used for log messages spanning multiple lines. This is common
  # for Java Stack Traces or C-Line Continuation

  # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  #multiline.pattern: ^\[

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  #multiline.negate: false

  # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  #multiline.match: after

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging

#================================ Outputs =====================================

# Configure what outputs to use when sending the data collected by the beat.
# Multiple outputs may be used.

#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:
  # Array of hosts to connect to.
  #hosts: ["localhost:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["10.20.0.29:5044"]

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications
  #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

  # Certificate for SSL client authentication
  #ssl.certificate: "/etc/pki/client/cert.pem"

  # Client Certificate Key
  #ssl.key: "/etc/pki/client/cert.key"

#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: critical, error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]

```

When I start filebeat.exe -e I get:

```
PS D:\Program Files\filebeat-5.3.2> .\filebeat.exe -e
filebeat2017/12/12 10:38:28.624103 beat.go:339: CRIT Exiting: error loading config file: yaml: line 24: did not find expected '-' indicator
Exiting: error loading config file: yaml: line 24: did not find expected '-' indicator

```

Line 24 is:  
`- d:\Inetpub\logs\logfiles\*\*`  
so there is a '-'.

Why doesn't this work?  
Thanks

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [December 12, 2017, 11:01am UTC](https://discuss.elastic.co/t/filebeat-fail-to-start/111305/2 "2017-12-12T11:01:24Z")

</div>

I think the issue is actually in the next line: `document_type` is not correctly indented, it should be at the same level than `paths`, like:

```auto
paths:
    #- /var/log/*.log
    # Add the path to IIS Logs
    - d:\Inetpub\logs\logfiles\*\*
document_type: iis

```

Best regards

---

<div class="post-metadata">

**Author:** ![teejayuu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teejayuu/32/18356_2.png) [@teejayuu](https://discuss.elastic.co/u/teejayuu)\
**Post date:** [December 12, 2017, 11:03am UTC](https://discuss.elastic.co/t/filebeat-fail-to-start/111305/3 "2017-12-12T11:03:45Z")

</div>

Thanks. It worked

---

<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:** [January 9, 2018, 11:10am UTC](https://discuss.elastic.co/t/filebeat-fail-to-start/111305/4 "2018-01-09T11:10:31Z")

</div>

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