logstash 多管道

官方文档

配置文件pipelines.yml

#管道1
- pipeline.id: my-pipeline_1
  path.config: "/etc/path/to/p1.config"
  pipeline.workers: 3
#管道2
- pipeline.id: my-other-pipeline
  path.config: "/etc/different/path/p2.cfg"
  queue.type: persisted

启动不带参数的情况下logstash会默认加载pipelines.yml这个配置,并且安装所有配置的管道,当你使用 -e或者-f命令启动logstash的时候,会忽略pipelines.yml这个配置。
关于path.config 里面配置的是一组input{}filter{}output{}配置,如神策埋点日志采集
直接使用file-input

input {
    file {
        path => "/home/sensors/sensor-test/sensorslog/logs.*"
        start_position => beginning
    }
}
filter {
}
output {
    stdout { codec => rubydebug }
    sensors_analytics {
       url => "https://xxxxxxx/sa?project=s2b_test"
    }
}

关于管道的一些属性配置可以在logstash.yml中配置相关文档参考官方文档

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章