问题:
POST 提示不支持,如下curl -XPOST 192.168.100.121:19101/testaii -d "{'a':'b'}"
{"error":"Incorrect HTTP method for uri [/testaii] and method [POST], allowed: [GET, HEAD, DELETE, PUT]","status":405}
分析过程:
_cat/indics?返回为yellow ,查看master磁盘90%以上使用,
推断: 磁盘问题,调整磁盘上限
调整方式:
curl -H "Content-Type: application/json" -XPUT "192.168.101.121:19101/_cluster/settings" -d '{"transient": {"cluster.routing.allocation.disk.watermark.low": "92%","cluster.info.update.interval": "1m"}}'|jq "."
curl -H "Content-Type: application/json" -XPUT "192.168.101.121:19101/_cluster/settings" -d '{"transient": {"cluster.routing.allocation.disk.watermark.high": "98%","cluster.info.update.interval": "1m"}}'|jq "."
结果:调整后
介绍: _cat/indics? 返回为green , 但post 索引数据还是405 ,解决继续。
_post
https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html
Elasticsearch使用两个配置参数决定分片是否能存放到某个节点上。
cluster.routing.allocation.disk.watermark.low:控制磁盘使用的低水位。默认为85%,意味着如果节点磁盘使用超过85%,则ES不允许在分配新的分片。当配置具体的大小如80MB时,表示如果磁盘空间小于80MB不允许分配分片。
cluster.routing.allocation.disk.watermark.high:控制磁盘使用的高水位。默认为90%,意味着如果磁盘空间使用高于90%时,ES将尝试分配分片到其他节点。
上述两个配置可以使用API动态更新,ES每隔30s获取一次磁盘的使用信息,该值可以通过cluster.info.update.interval来设置。
————————————————
原文链接:https://blog.csdn.net/wangxiaofeng0010/article/details/77977497
cluster.routing.allocation.disk.watermark.low
85%
, meaning
that Elasticsearch will not allocate shards to nodes that have more than
85% disk used. It can also be set to an absolute byte value (like 500mb
)
to prevent Elasticsearch from allocating shards if less than the specified
amount of space is available. This setting has no effect on the primary
shards of newly-created indices but will prevent their replicas from being allocated.cluster.routing.allocation.disk.watermark.high
90%
, meaning that
Elasticsearch will attempt to relocate shards away from a node whose disk
usage is above 90%. It can also be set to an absolute byte value (similarly
to the low watermark) to relocate shards away from a node if it has less
than the specified amount of free space. This setting affects the
allocation of all shards, whether previously allocated or not.
没有评论:
发表评论