Elastic Stack
[ logstash ] config.reload.automatic 사용 및 에러
구티맨
2020. 3. 19. 20:26
아래와 같이 config.reload.automatic 옵션을 넣어 logstash 를 실행하면, conf 파일을 변경하여 logstash를 재시작 할 필요 없이 수정된 conf파일을 reload 하여 적용해주는 좋은 옵션이다.
하지만 conf 파일을 수정하고 난 뒤에 간간히 아래와 같은 메시지를 만나는 경우가 있다.
[ERROR] 2020-03-19 20:20:25.482 [Converge PipelineAction::Reload<main>] agent - Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Cannot reload pipeline, because the existing pipeline is not reloadable", :backtrace=>nil}
처음에는 conf 파일을 잘못 작성한 줄 알고, 파일을 다시 봤는데 이상이 없어보였다.
그래서 logstash 를 종료하고 다시 시작하였는데 정상적으로 동작이 되었다.
알아보니, 모든 filter 가 reload를 지원하는 것은 아니라고 한다.
그래서 지원하지 않는 filter 를 추가하게 되면 이렇게 에러가 나는 경우가 있으니 logstash 를 그냥 재시작 해주면 된다.