今天突然發現kibana里面沒有日志展示了,登錄ES服務器發現報錯如下:
[2019-12-19T10:14:00,620][WARN ][o.e.x.m.e.l.LocalExporter] [ws-node1] unexpected error while indexing monitoring document
org.elasticsearch.xpack.monitoring.exporter.ExportException: [.monitoring-es-7-2019.12.19] IndexCreationException[failed to create index [.monitoring-es-7-2019.12.19]]; nested: ValidationException[Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;];
at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$throwExportException$2(LocalBulk.java:125) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_181]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_181]
重點:ValidationException[Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;,ES7以上的版本默認就允許創建1000個分片,所以就報錯了,我們可以在kibana tools上調大分片的配置:
PUT /_cluster/settings
{
"transient": {
"cluster": {
"max_shards_per_node":10000
}
}
}
如下圖:
運行后,分片默認則為10000了,在看kibana面包,日志恢復:
原文鏈接:https://blog.csdn.net/liuxuango/article/details/103609862