bin/logstash -f myconfig/logstash-first.conf -t

-t:测试配置文件是否正确,然后退出。




wangshumin@CentOSNode1 logstash-5.3.1]$  bin/logstash --help

Sending Logstash's logs to /home/wangshumin/ekl/logstash-5.3.1/logs which is now configured via log4j2.properties
ERROR: No configuration file was specified. Perhaps you forgot to provide the '-f yourlogstash.conf' flag?
usage:
  bin/logstash -f CONFIG_PATH [-t] [-r] [] [-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
[wangshumin@CentOSNode1 logstash-5.3.1]$ bin/logstash -f myconfig/logstash-first.conf -t 
Sending Logstash's logs to /home/wangshumin/ekl/logstash-5.3.1/logs which is now configured via log4j2.properties
[2018-04-29T13:21:08,977][FATAL][logstash.runner          ] The given configuration is invalid. Reason: Expected one of #, ", ', } at line 3, column 1 (byte 20) after input {
    file {


[wangshumin@CentOSNode1 logstash-5.3.1]$ vim myconfig/logstash-first.conf
[wangshumin@CentOSNode1 logstash-5.3.1]$ bin/logstash -f myconfig/logstash-first.conf -t 
Sending Logstash's logs to /home/wangshumin/ekl/logstash-5.3.1/logs which is now configured via log4j2.properties
Configuration OK
[2018-04-29T13:22:39,969][INFO ][logstash.runner          ] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
[wangshumin@CentOSNode1 logstash-5.3.1]$ 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值