我格式化YAML您在評論規定:
filebeat:
# List of prospectors to fetch data.
prospectors:
# Each - is a prospector. Below are the prospector specific configurations
-
# Paths that should be crawled and fetched. Glob based paths.
# To fetch all ".log" files from a specific level of subdirectories
# /var/log/*/*.log can be used.
# For each file found under this path, a harvester is started.
# Make sure not file is defined twice as this can lead to unexpected behaviour.
paths:
- /var/log/auth.log
- /var/log/syslog
#- /var/log/*.log
沒有註釋相應的配置是:
filebeat:
prospectors:
-
paths:
- /var/log/auth.log
- /var/log/syslog
嘗試清理後的配置。我想你對禁止的字符有問題。請記住tabs are not allowed in YAML.你是否在第14行有一個製表符或另一個禁止的字符?請致電Filebeat Configuration Options。
請幫我解決這個問題... –
你看過filebeat.yml中的第14行嗎? –
是的,它只包含那邊的路徑 –