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中配置相關文檔參考官方文檔

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