Logstash start with error: Pipelines YAML file is empty
Logstash start with error: Pipelines YAML file is empty
当我尝试在我的机器上启动 logstash 服务器时,出现此错误:
Sending Logstash's logs to D:/kibana/logstash-6.3.2/logs which is now configured
via log4j2.properties
ERROR: Pipelines YAML file is empty. Location: D:/kibana/logstash-6.3.2/config/p
ipelines.yml
usage:
bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]
bin/logstash --modules MODULE_NAME [-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAM
E.VARIABLE_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]
bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace
] [-w COUNT] [-l LOG]
bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]
bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]
bin/logstash --help
[2018-12-14T16:16:10,809][ERROR][org.logstash.Logstash ] java.lang.IllegalSta
teException: Logstash stopped processing because of an error: (SystemExit) exit
我删除了所有内容并提取了新代码(默认配置),但仍然出现此错误。
看起来您正在尝试使用多个管道配置启动 Logstash:
When you start Logstash without arguments, it will read the
pipelines.yml file and instantiate all pipelines specified in the
file. On the other hand, when you use -e or -f, Logstash ignores the
pipelines.yml file and logs a warning about it.
您可以启动 Logstash 指定配置文件位置:
logstash -f mypipeline.conf
或者您可以只配置 pipelines.yml
文件。我强烈建议使用管道配置,因为将来扩展 Logstash 会更容易,并且您可以为每个管道指定资源。
pipelines.yml
的示例配置:
- pipeline.id: my_pipeline_name
path.config: "/path/to/your/config/file.cfg"
queue.type: persisted
如果最近使用 brew
安装了 logstash,请尝试前往
cd /usr/local/logstash/{version-number}
和运行
bin/logstash -f "/path/to/your/pipeline/config.conf" --config.reload.automatic
brew service restart logstash
来源:https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html
当我尝试在我的机器上启动 logstash 服务器时,出现此错误:
Sending Logstash's logs to D:/kibana/logstash-6.3.2/logs which is now configured
via log4j2.properties
ERROR: Pipelines YAML file is empty. Location: D:/kibana/logstash-6.3.2/config/p
ipelines.yml
usage:
bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]
bin/logstash --modules MODULE_NAME [-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAM
E.VARIABLE_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]
bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace
] [-w COUNT] [-l LOG]
bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]
bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]
bin/logstash --help
[2018-12-14T16:16:10,809][ERROR][org.logstash.Logstash ] java.lang.IllegalSta
teException: Logstash stopped processing because of an error: (SystemExit) exit
我删除了所有内容并提取了新代码(默认配置),但仍然出现此错误。
看起来您正在尝试使用多个管道配置启动 Logstash:
When you start Logstash without arguments, it will read the pipelines.yml file and instantiate all pipelines specified in the file. On the other hand, when you use -e or -f, Logstash ignores the pipelines.yml file and logs a warning about it.
您可以启动 Logstash 指定配置文件位置:
logstash -f mypipeline.conf
或者您可以只配置 pipelines.yml
文件。我强烈建议使用管道配置,因为将来扩展 Logstash 会更容易,并且您可以为每个管道指定资源。
pipelines.yml
的示例配置:
- pipeline.id: my_pipeline_name
path.config: "/path/to/your/config/file.cfg"
queue.type: persisted
如果最近使用 brew
安装了 logstash,请尝试前往
cd /usr/local/logstash/{version-number}
和运行
bin/logstash -f "/path/to/your/pipeline/config.conf" --config.reload.automatic
brew service restart logstash
来源:https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html