# 升级原因

安全问题,3 个 security bug

# 波及版本和升级版本

Affected Versions:
Grafana 9.x prior to 9.2.4
Grafana 8.x prior to 8.5.15

# 官方解释

Grafana Security Advisory

Grafana has released patch to address the vulnerability. For more information please refer to:

https://grafana.com/blog/2022/11/08/security-release-new-versions-of-grafana-with-critical-and-moderate-fixes-for-cve-2022-39328-cve-2022-39307-and-cve-2022-39306/

# 升级步骤

参考:

https://grafana.com/docs/grafana/latest/setup-grafana/upgrade-grafana/

https://grafana.com/grafana/download/9.2.4

https://raghavendar-d.medium.com/upgrade-grafana-to-letest-version-5a17c37b4c18

老版本: v8.4.4

备份:

# 备份 grafana db 和 plugins
[root@xxx-sj-job-3 jalchu]# tar -zcvf /users/jalchu/varlibgrafana.tar.gz /var/lib/grafana
# 备份 grafana 配置
[root@xxx-sj-job-3 jalchu]# tar -zcvf /users/jalchu/etcgrafana.tar.gz /etc/grafana
# 停止服务
[root@xxx-sj-job-3 jalchu]# systemctl stop grafana-server
# 获取老版本备用,方便 rollback
[root@xxx-sj-job-3 jalchu]# wget https://dl.grafana.com/enterprise/release/grafana-enterprise-8.4.4-1.x86_64.rpm
[root@xxx-sj-job-3 jalchu]# sudo yum install grafana-enterprise-8.4.4-1.x86_64.rpm 
# 获取推荐升级的最新版本 9
[root@xxx-sj-job-3 jalchu]# wget https://dl.grafana.com/enterprise/release/grafana-enterprise-9.2.4-1.x86_64.rpm
[root@xxx-sj-job-3 jalchu]# sudo yum install grafana-enterprise-9.2.4-1.x86_64.rpm
# 获取推荐升级的最新版本 8
[root@xxx-sj-job-3 jalchu]# wget https://dl.grafana.com/enterprise/release/grafana-enterprise-8.5.15-1.x86_64.rpm
[root@xxx-sj-job-3 jalchu]# sudo yum install grafana-enterprise-8.5.15-1.x86_64.rpm
# 升级 9 版本后发现不支持 es7,版本 rollback
[root@xxx-sj-job-3 jalchu]# rpm -qa|grep grafana
[root@xxx-sj-job-3 jalchu]# rpm -e grafana-enterprise-9.2.4-1.x86_64
[root@xxx-sj-job-3 jalchu]# sudo yum install grafana-enterprise-8.4.4-1.x86_64.rpm 
[root@xxx-sj-job-3 jalchu]# systemctl status grafana-server
[root@xxx-sj-job-3 jalchu]# sudo yum install grafana-enterprise-8.5.15-1.x86_64.rpm
[root@xxx-sj-job-3 jalchu]# sudo yum install grafana-enterprise-8.5.15-1.x86_64.rpm
[root@xxx-sj-job-3 jalchu]# systemctl restart grafana-server

升级后发现 es 的密码都无效了,需更新下密码

长期计划,升级 es,参考

https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Jalen Chu 微信支付

微信支付

Jalen Chu 支付宝

支付宝

Jalen Chu 公众号

公众号