사용중인 노드 제거 방법
ELK2022. 7. 28. 22:34
728x90
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html
PUT _cluster/settings
{
"persistent" : {
"cluster.routing.allocation.exclude._name" : "타깃노드네임"
}
}
해당을 입력하면 데이터노드의 경우 가지고 있는 샤드가 다른 데이터 노드로 자동 이동 된다고 하나 자동으로 안될 경우
수동 이동을 하도록 하자.
POST _cluster/reroute
{
"commands": [
{
"move": {
"index": "인덱스명",
"shard": "보낼샤드넘버,
"from_node": "현재노드명",
"to_node": "타겟노드명"
}
}
]
}
노드타입을 hot warm등 다양 하게 사용 중이라면 잠시 hot -> warm, warm -> hot 등등 이동이 크게 무리가 안가는 상황이라면 exclude대상 노드가 가진 인덱스에 대해서 해당 사용시 reroute보단 편하게 이동 가능
PUT targetindex
{
"settings": {
"index.routing.allocation.require.box_type": "hot"
}
}
'ELK' 카테고리의 다른 글
Elasticsearch node 영구 제거시 명령어 (0) | 2022.08.21 |
---|---|
테스트 데이터 날짜 변경 ingest pipeline (0) | 2022.08.04 |
logstash 이용 ELK 데이터 json으로 받는 방법 (0) | 2022.08.01 |
노드롤 설정 (0) | 2022.07.20 |
elasticsearch.yml 주요 설정 (1) | 2022.07.20 |
댓글()