logstash自动重新加载配置文件以及自定义检测间隔时间

问题

       修改pipelines.yml和pipelines.yml对应的config文件时,logstash自动重新加载配置文件,并自定义检测配置文件是否有修改的间隔时间


解决方法

       使用 --config.reload.automatic --config.reload.interval参数
       --config.reload.automatic    参数设置为自动检测和重新加载配置更改
       --config.reload.interval      参数指定 Logstash 检查配置文件更改的间隔,默认为3秒检测一次,该参数的单位为秒,设置的参数单位s一定要写上


例子

       执行命令:bin/logstash --config.reload.automatic --config.reload.interval 60s
       设置为自动重新加载配置文件,并每60秒检测一次配置文件是否有修改




参考文档:https://www.elastic.co/guide/en/logstash/current/reloading-config.html