由于磁盘的空间太小,被强制只读了
治病还是要治根
org.elasticsearch.xpack.monitoring.exporter.ExportException: ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]
解决
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
es查看和删除索引
查看索引
curl localhost:9200/_cat/indices?v
删除索引,通配符形式
curl -XDELETE localhost:9200/索引*
索引起别名
curl -XPUT localhost:9200/索引/_alias/别名
查看别名
curl -XPUT localhost:9200/_cat/aliases?v
单机状态下显示yellow
调整副本数
curl -XPUT 'http://localhost:9200/_settings' -H 'Content-Type: application/json' -d '
{
"index" : {
"number_of_replicas" : 0
}
}'
Kibana控制台下这样执行:
PUT _settings
{
"index" : {
"number_of_replicas" : 0
}
}