logstash.启动测试数据生产file 和消费数据 file

配置文件:

input {
     file {
          path => "/home/wangshumin/ekl/logstash-5.3.1/data/input/testin1.txt"
          start_position => "beginning"


         }
     }


filter {     }


output {


         file {
           path =>"/home/wangshumin/ekl/logstash-5.3.1/data/input/testout1.txt"
           codec => line { format => "custom format: %{message}"}
             }
}
~                                                                                                                                                                                            
~                                                                                                                                                                                            
~                    




[wangshumin@CentOSNode2 logstash-5.3.1]$ bin/logstash -t myconfig/logstash.conf  
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@CentOSNode2 logstash-5.3.1]$ bin/logstash -f myconfig/logstash.conf  

Sending Logstash's logs to /home/wangshumin/ekl/logstash-5.3.1/logs which is now configured via log4j2.properties
[2018-01-29T13:35:43,683][INFO ][logstash.pipeline        ] Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
[2018-01-29T13:35:44,351][INFO ][logstash.pipeline        ] Pipeline main started
[2018-01-29T13:35:44,510][INFO ][logstash.outputs.file    ] Opening file {:path=>"/home/wangshumin/ekl/logstash-5.3.1/data/input/testout1.txt"}

[2018-01-29T13:35:44,514][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}

[wangshumin@CentOSNode2 input]$ ll
总用量 132
-rw-rw-r--. 1 wangshumin wangshumin   6184 1月  29 13:44 testin1.txt
-rw-rw-r--. 1 wangshumin wangshumin 115424 1月  29 13:44 testout1.txt
-rw-rw-r--. 1 wangshumin wangshumin     92 1月  29 13:45 生产数据的
-rw-rw-r--. 1 wangshumin wangshumin     57 1月  29 12:32 生产数据的shell
[wangshumin@CentOSNode2 input]$ 




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值