離線安裝
下載插件包:
例如需要下載exec包岂座,在github網(wǎng)站 https://github.com/logstash-plugins/logstash-output-exec 下載 exec包绿语。
logstash-output-exec-master.zip
安裝:
將exec包上傳到Logstash所在的服務(wù)器并解壓到目錄:/opt/logstash/plugins下
修改Logstash的Gemfile文件异希,再最后添加一行:gem "logstash-output-exec", :path => "/opt/logstash/plugins"
最后執(zhí)行安裝:bin/logstash-plugin install --no-verify
Installing...
Installation successful
OK......
測(cè)試:
省略斗锭。腾誉。躯概。
在線安裝
需要修改為國內(nèi)的源:
$ vim /opt/logstash-5.1.1/Gemfile
# This is a Logstash generated Gemfile.
# If you modify this file manually all comments and formatting will be lost.
source "https://rubygems.org"
gem "logstash-core", :path => "./logstash-core"
gem "logstash-core-queue-jruby", :path => "./logstash-core-queue-jruby"
gem "logstash-core-event-java", :path => "./logstash-core-event-java"
gem "logstash-core-plugin-api", :path => "./logstash-core-plugin-api"
保存并執(zhí)行:bin/logstash-plugin install logstash-output-exec