# Issue with Filbeat Config File

**URL:** <https://discuss.elastic.co/t/issue-with-filbeat-config-file/110288>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 5, 2017, 8:44am UTC](https://discuss.elastic.co/t/issue-with-filbeat-config-file/110288 "2017-12-05T08:44:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SJN8](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@SJN8](https://discuss.elastic.co/u/SJN8)\
**Post date:** [December 5, 2017, 8:44am UTC](https://discuss.elastic.co/t/issue-with-filbeat-config-file/110288/1 "2017-12-05T08:44:30Z")

</div>

Hi All,

Below is my configuration file ,

###################### 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](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.

# Paths that should be crawled and fetched. Glob based paths.

# Exclude lines. A list of regular expressions to match. It drops the lines that are

# matching any regular expression from the list.

# Optional additional fields. These field can be freely picked

# to add additional information to the crawled log files for filtering

### Multiline options

# Mutiline can be used for log messages spanning multiple lines. This is common

# for Java Stack Traces or C-Line Continuation

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

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

# multiline.match: 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

- type: log  
enabled: true  
paths:  
- log\_path

#================================ 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.

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

# Configure what outputs to use when sending the data collected by the beat.

# Multiple outputs may be used.

#----------------------------- Logstash output --------------------------------  
output.logstash:

# The Logstash hosts

hosts: ["localhost:port"]  
#================================ 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: ["\*"]

I dont see any issue with file but while executing it getting below error,

filebeat2017/12/05 08:35:01.555174 beat.go:625: CRIT Exiting: error loading config file: yaml: line 35: mapping values are not allowed in this context  
Exiting: error loading config file: yaml: line 35: mapping values are not allowed in this context

please look in to it .

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [December 5, 2017, 1:18pm UTC](https://discuss.elastic.co/t/issue-with-filbeat-config-file/110288/2 "2017-12-05T13:18:52Z")

</div>

1. please properly format logs and config files using the `</>` button. YAML is sensitive to indentation + the forum interpreting the file as Markdown doesn't help in reading the config.

2. The parser is complaining about invalid YAML. Tools like [http://www.yamllint.com](http://www.yamllint.com) help in validating YAML syntax.

---

<div class="post-metadata">

**Author:** ![SJN8](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@SJN8](https://discuss.elastic.co/u/SJN8)\
**Post date:** [December 6, 2017, 6:02am UTC](https://discuss.elastic.co/t/issue-with-filbeat-config-file/110288/3 "2017-12-06T06:02:27Z")

</div>

Thanks , yes it was a indentation issue .

Resolved by using yamllint

---

<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 3, 2018, 6:02am UTC](https://discuss.elastic.co/t/issue-with-filbeat-config-file/110288/4 "2018-01-03T06:02:38Z")

</div>

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