1.kibana等都统一版本了,5.4版本的kibana要5.4版本的elasticsearch
2.现有架构:
logstash
logstash读取日志--------》内网redis做队列------------------》写入elasticsearch集群--------》kibana读取集群数据
3.升级版本要求:
Upgrade From Upgrade To Supported Upgrade Type
1.x 5.x Reindex to upgrade
2.x 2.y Rolling upgrade (where y > x)
2.x 5.x Full cluster restart
5.0.0 pre GA 5.x Full cluster restart
5.x 5.y Rolling upgrade (where y > x)
不同主版本之间需要全部关停升级,同一个主版本可以短时间不同小版本es之间运行,高版本的es不会像低版本的同步shards
4.升级注意事项
/etc/sysctl.conf
vm.max_map_count = 262144
 
/etc/security/limits.conf
* soft nofile 655350
* hard nofile 655360
还有应用到的参数,很多改变了,需要提前修改
 
升级步骤:
1.配置项变更
2.禁用自动分片 disabled shard allocation
curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}
'
 
3.将内存数据同步到磁盘
curl -XPOST 'localhost:9200/_flush/synced?pretty'
A synced flush request is a “best effort” operation. It will fail if there are any pending indexing operations, but it is safe to reissue the request multiple times if necessary.
 
4.关闭节点,执行升级
升级详细步骤:
tips:这里是源码包升级
(1)解压到安装目录,不要覆盖原程序目录
(2)从老程序复制config下面的文件到新程序中
  • Either copy the files in the  directory from your old installation to your new installation, or set the environment variable  to the location of the  file and use the  option on the command line to point to an external config directory.
(3)复制老程序/data目录下的数据到新目录到新的数据目录或者改改路径到老目录
  • Either copy the files in the  directory from your old installation to your new installation, or configure the location of the data directory in the  file, with the  setting.
(4)更新所有插件
Elasticsearch plugins must be upgraded when upgrading a node. Use the  script to install the correct version of any plugins that you need.
5.启用节点,开始自动分片(会先变为yellow状态,最后变绿),查看是否加入集群
Start the now upgraded node and confirm that it joins the cluster by checking the log file or by checking the output of this request:
curl -XGET 'localhost:9200/_cat/nodes?pretty'
 
6.重新开始分片Reenable shard allocation
Once the node has joined the cluster, reenable shard allocation to start using the node:
curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'
{
"transient": {
"cluster.routing.allocation.enable": "all"
}
}
'
7.等集群恢复 Wait for the node to recover
ou should wait for the cluster to finish shard allocation before upgrading the next node. You can check on progress with the request。
snapshot and restore官方有提供一个升级兼容性检测工具: https://github.com/elastic/elasticsearch-migration/。 这个工具可以发现不兼容的集群配置项,这些配置项需要在部署5.x的时候按照建议做相应的修改。另外如果集群里有1.x创建的索引,这个工具也会指出来,并且可以直接在界面上点点按钮做reindex。
 
not_analyzed字段升级后依然是string / not_analyzed,并不会自动改成keyword,但是5.x可以兼容这个字段类型,数据写入没问题。
 
迁移帮助工具(elasticsearch-migration)
 
 
参考文档:
 
 

最新文章

  1. line-height不同单位之间的区别
  2. 揭开GrowingIO无埋点的神秘面纱
  3. IAR for msp430 MDK中 warning: #223-D: function "xxx" declared implicitly 解决方法
  4. Microsoft Dynamics CRM 2013 --针对特定实体,取消保存功能(包含自动保存)
  5. linux权限管理_ACL权限
  6. 配置apache虚拟主机的实例总结
  7. P44、面试题4:替换空格
  8. 关于Debug下的Log打印问题
  9. oracle中drop、delete和truncate的区别
  10. matlab中如何求某一个矩阵的标准差和均值
  11. convert 时间转换
  12. 2015 多校联赛 ——HDU5316(线段树)
  13. “等一下,我碰!”——常见的2D碰撞检测
  14. 常见RPC开源框架
  15. Linux----------nfs服务器的搭建及常识
  16. mac上terminal_问题_1117
  17. Eclipse 中 Spring 项目的 XML 配置文件报错 Referenced file contains errors
  18. SpringBoot之打成war包部署到Tomcat
  19. 【学亮IT手记】使用Map代替switch...case语句
  20. JSONModel(I)

热门文章

  1. flume 使用
  2. (33)C#正则表达式
  3. sqlldr control file compare with HEX value
  4. Java里如何判断一个String是空字符串或空格组成的字符串
  5. The expression being assigned to optional parameter `v2' must be a constant or default value
  6. 使用TensorFlow实现神经网络的介绍
  7. debian下QT4编程环境的建立
  8. ArcMAP定义投影坐标
  9. 去除自定义Toolbar中左边距
  10. Makefile学习之通配符和自动变量