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