AnyRobot-索引库没有分配新索引
关键字
logstash-filter 、maximum shards open
适用产品
- AnyRobot 3.0.14
问题描述
登录 AnyRobot 搜索日志,无法搜索最近的日志,查看 数据源 > 日志库管理 > 索引库 没有生成新索引,进入 30880 端口查看 logstash-filter 容器日志出现告警:
this action would add total shards, but this cluster currently has maximum shards open.png)
问题影响
无法生成对应的索引,导致无法消费数据,日志就没有存储。
问题原因
Elasticsearch 7.9 版本默认分片为1000,超过不会重新分片。
解决方案
进入 AnyRobot 后台,根据一些步骤修改 Elasticsearch 默认分片数:
1.查找对应 pod ip
kubectl get pod -o wide| grep elasticsearch-master.png)
2.修改默认分片数
curl -XPUT 135.31.77.156:9200/_cluster/settings -H"Content-Type:application/json" -d'{"transient":{"cluster":{"max_shards_per_node":90000}}}'
注意:此处的 pod ip 为 135.31.77.156 ,具体环境的 pod id 不同,请按照实际环境配置。
.png)
更多信息
关于 Elasticsearch 更多说明,请参考 Elasticsearch 官方网站: Elasticsearch