sudo service filebeat start
加载配置文件错误:/etc/filebeat/filebeat.yml上的YAML配置解析失败:yaml:第14行:找不到任何令牌的字符。离开。
答案 0 :(得分:2)
我格式化了您在评论中提供的 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。