[Prometheus] Metricbeat로 remote write 시 Failed to send batch 에러 발생
Updated:
개요
- Prometheus(remote write) -> Metricbeat -> Elasticsearch 구성
- 어느 순간부터 Elasticsearch에 document 증가폭이 매우 작아지고 Prometheus 로그에 Failed to send batch 에러 출력
해결 과정
- document 증가 폭이 작고 Prometheus를 재기동 하면 정상화되므로 Metricbeat가 병목일꺼라 예상
- metricbeat.yml의 output.elasticsearch 설정 중에 worker, bulk_max_size, compression_level 값 조정
- document 증가폭이 증가하다가 멈춤
- Prometheus의 remote_write 설정 중에 capacity, minShards, maxShards, maxSamplesPerSend, batchSendDeadline 값 조정
- 2 ~ 4 반복
- metricbeat 로그에서 bulk timeout 발생
- elasticsearch의 ES_JAVA_OPTS 값 조정