Issue with Filbeat Config File

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

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

  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 help in validating YAML syntax.

Thanks , yes it was a indentation issue .

Resolved by using yamllint

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