启动命令:logstash -f …/config/logstash-sample.conf
因此启动测试配置试一下:logstash -f …/config/logstash-sample.conf --config.test_and_exit
该–config.reload.automatic选项启用自动配置重新加载,因此您不必在每次修改配置文件时停止并重新启动Logstash。
logstash -f ../config/logstash-sample.conf --config.reload.automatic
插件命令参考:https://www.elastic.co/guide/en/logstash/6.8/working-with-plugins.html
获取插件列表:
bin/logstash-plugin list
bin/logstash-plugin list --verbose
bin/logstash-plugin list '*namefragment*'
bin/logstash-plugin list --group output
安装插件:
logstash-plugin install logstash-output-kafka
第三方本地安装:logstash-plugin install /path/to/logstash-output-kafka-1.0.0.gem
加载位于文件系统上的插件源代码:
bin/logstash --path.plugins /opt/shared/lib
/opt/shared/lib该路径下必须是特定格式:
更新插件:
bin/logstash-plugin update
bin/logstash-plugin update logstash-output-kafka
移除插件:
logstash-plugin remove logstash-output-kafka
设置代理(例子):
export http_proxy=http://localhost:3128
export https_proxy=http://localhost:3128
设置代理下载插件(例子):
export HTTP_PROXY=http://127.0.0.1:3128
logstash-plugin install logstash-output-kafka
来源:https://blog.csdn.net/shuaishuai1234/article/details/100079425