elk重启记录

重启前:

检查elk进程

ps -ef|grep elk

netstat -antp|grep LISTEN

curl 172.18.233.71:9200/_cat/nodes?v

curl 172.18.233.71:9200/_cat/health?v

以上检查elk进程号与端口匹配入主节点在哪个位置,还有elk是否正常

 

开始重启:

关闭自动平衡

curl -XPUT -H 'Content-Type: application/json' "172.18.233.71:9200/_cluster/settings" -d '

{

"transient" : {

"cluster.routing.allocation.enable" : "none"

}

}'

 

kill 对应进程

kill -9 pid

启动

/opt/elk/elasticsearch/bin/elasticsearch -d

开启自动 平衡

curl -XPUT -H 'Content-Type: application/json' "172.18.233.71:9200/_cluster/settings" -d '

{

"transient" : {

"cluster.routing.allocation.enable" : "all"

}

}'

检查健康状态

curl 172.18.233.71:9200/_cat/health?v

主节点是否漂移

curl 172.18.233.71:9200/_cat/nodes?v

 

说明:

启动后,elk状态为red,查看索引也是red,把自动平衡开启以后,逐步会变也yellow --green,慢慢等即可。

 

posted @ 2020-08-10 09:31  winss  阅读(326)  评论(0)    收藏  举报