elk-RPM升级
升级原因
由于前段时间的log4j2(2.0~2.11)的jar包引起的漏洞问题
elk从7.5.1跨度到7.16.1
1.下载新版本包
losgtash
https://artifacts.elastic.co/downloads/logstash/logstash-7.16.1-x86_64.rpm
kibana
https://artifacts.elastic.co/downloads/kibana/kibana-7.16.1-x86_64.rpm
es
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.1-x86_64.rpm
2停止,卸载,安装服务
(由于log4j2的问题,不卸载担心会有部分遗留问题)
#停止logstash (redis此时还在写数据,我们日志量小,忽略不计)
systemctl stop logstash
#卸载
rpm -e --nodeps logstash
#安装
rpm -ivh logstash-7.16.1-x86_64.rpm
或者
yum -y localinstall logstash-7.16.1-x86_64.rpm
es 操作和kibana同上
es不要同时卸载就好防止丢数据.
3.logstash排错
安装时出现了以下错误
Using provided startup.options file: /etc/logstash/startup.options
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/platform/base.rb:112: warning: constant ::Fixnum is deprecated
排错过程
当时日志里logstash stoping process 字样。网上查找资料 /var/lib/logstash/下产生的.lock文件需要删除。
没卸载干净
4.解决
#删掉/var/lib/下的logstash目录
rm -rf /var/lib/logstash