1、前提条件
(1)、在能上网的服务器上不是logstash,将需要安装的插件安装在该服务器的logstash上。
(2)、利用该服务器上的logstash-plugin程序,生成指定插件离线的zip安装包。
(3)、将离线安装包拷贝到指定服务器上(无法上网的服务器),运行logstash-plugin命令完成安装。
2、生成离线zip安装包
[root@bogon logstash]# ./bin/logstash-plugin prepare-offline-pack logstash-filter-lynis
Offline package created at: /opt/logstash/logstash-offline-plugins-5.6.1.zip
You can install it with this command `bin/logstash-plugin install file:///opt/logstash/logstash-offline-plugins-5.6.1.zip`
3、安装离线包
[root@t0-secure-log2 u01]# ./logstash/bin/logstash-plugin install file:///u01/logstash-filter-lynis-offline.zip
Installing file: /u01/logstash-filter-lynis-offline.zip
Install successful
4、查看安装效果
[root@t0-secure-log2 u01]# /u01/logstash/bin/logstash-plugin list
logstash-codec-cef
logstash-codec-collectd
logstash-codec-dots
logstash-codec-edn
logstash-codec-edn_lines
logstash-codec-es_bulk
logstash-codec-fluent
logstash-filter-clone
logstash-filter-csv
logstash-filter-date
logstash-filter-dissect
logstash-filter-dns
logstash-filter-drop
logstash-filter-fingerprint
logstash-filter-geoip
logstash-filter-grok
logstash-filter-json
logstash-filter-kv
logstash-filter-lynis #新安装的logstash插件
logstash-filter-metrics
logstash-filter-mutate
logstash-input-beats
logstash-input-couchdb_changes