TIL
TIL copied to clipboard
Logstash에서 ilm 관련 Failed to install template 에러 처리 방안
Logstash에서 ilm template 관련 Failed to install template 에러 처리 방안
증상
- Elasticsearch를 6.3.1 버전과 7.5.0-OSS를 섞어 쓰고 있었고 Logstash는 6.3.2를 사용하고 있었음
- 이후 Logstash를 7.5.2 로 올리고 실행하였더니, 자동으로
Index Lifecycle Management is set to 'auto'를 적용함-
[2020-02-07T15:15:21,283][INFO ][logstash.outputs.elasticsearch][my_pipeline] Index Lifecycle Management is set to 'auto', but will be disabled - Your Elasticsearch cluster is before 7.0.0, which is the minimum version required to automatically run Index Lifecycle Management
-
- 7.0.0 버전 이전인 6.3.1 버전은 ilm 기능이 없기 때문에 무시하고 그냥 실행해서 이상없음
- [2020-02-07T15:15:21,281][WARN ][logstash.outputs.elasticsearch][my_pipeline] Detected a 6.x and above cluster: the
typeevent field won't be used to determine the document _type {:es_version=>6}
- [2020-02-07T15:15:21,281][WARN ][logstash.outputs.elasticsearch][my_pipeline] Detected a 6.x and above cluster: the
- 그러나 7.5.0 버전의 ES 클러스터엔 자동으로 ILM Policy 를 기본값인 auto 로 잡고 실행함
-
[2020-02-07T15:15:21,288][INFO ][logstash.outputs.elasticsearch][my_pipeline] Attempting to install template {:manage_template=> ...
-
- 그런데 문제는 7.5.0-OSS 는 xpack 이 없으므로 적용하려던 기본 ILM template 이 적용 안되고 에러가 나서 Logstash 가 종료됨
-
[2020-02-07T15:15:21,313][ERROR][logstash.outputs.elasticsearch][my_pipeline] Failed to install template. {:message=>"Got response code '500' contacting Elasticsearch at URL ...
-
해결방안
- Logstash pipeline 의 Elasticsearch output에
ilm_enabled => false를 추가
elasticsearch {
hosts => [ "http://localhost:9200" ]
index => "%{topic}-%{[@metadata][yymmdd]}"
document_id => "%{[@metadata][document_id]}"
ilm_enabled => false
}
참고
- https://discuss.opendistrocommunity.dev/t/logstash-oss-with-non-removable-x-pack/655/3
성준님 잘보고가요.. 덕분에 pod 띄울수있게됐네요 ...ㅎ
@taeun0 ㅋㅋㅋ 영광입니다