elasticsearch - 达到1000个最大碎片。我想增加或清除现有内容,然后重新开始。我有5台服务器正在监视

标签 elasticsearch logstash wazuh

我试图以此增加碎片...但无济于事。

 curl -XPUT 'http://206.189.196.214:9200/_cluster/settings -H 'Content-type: application/json' --data-binary $'{"transient":{"cluster.max_shards_per_node":5100}}'`
我在上面有错字...它返回以下错误:

"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid version format: -H CONTENT-TYPE: HTTP/1.1"}],"type":"illegal_argument_exception","reason":"invalid version format: -H CONTENT-TYPE: HTTP/1.1"},"status":400}curl: (3) [globbing] nested brace in column 44


请指教。的想法。 Elasticsearch正在运行,Zabbix正在运行,logstash正在运行,所有这些看起来都很高兴,但是达到了1000/1000碎片的限制。

最佳答案

如果将此限制设置到elasticserch.yml文件中,将是一个更好的选择。因为如果重新启动群集,将会丢失这些配置。但是您的请求将如下所示:

curl -XPUT "http://elasticsearch_host:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "transient": {
    "cluster.routing.allocation.total_shards_per_node": 5100
  }
}'

关于elasticsearch - 达到1000个最大碎片。我想增加或清除现有内容,然后重新开始。我有5台服务器正在监视,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64394003/

相关文章:

elasticsearch - 创建索引时无法设置字段类型

elasticsearch - has_parent查询如何与Elasticsearch中的join数据类型一起使用?

elasticsearch - filebeat到logstash或elasticsearch

ssl - 使用 apache2 ssl 代理的 Elasticsearch

elasticsearch - 无法访问 Kibana 站点

ossec - Wazuh 代理连接不上

elasticsearch - 如何编写在Elasticsearch中执行多个任务的搜索查询?

elasticsearch - 带有开始字符串的Elasticsearch搜索模式

logstash - 为什么 Logstash 每次重新启动时都会导入相同的文件?

ubuntu - gpg : no valid OpenPGP data found while adding Wazuh repository