logstash 多管道

    技术2022-07-11  129

    官方文档

    配置文件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中配置相关文档参考官方文档

    Processed: 0.011, SQL: 9