Logstash elasticsearch output plugin: configure retry count

My configuration is the following
java app => log4j2 SocketAppender (tcp) => Logstash: tcp input, es output => elasticsearch

Scenario:
Elasticsearch cluster is red and do not accept indexing by some reason.

Current behavior:
Logstash infinitely retries to index log into elasticsearch. Log4j2 waits for it and the java app simply hangs.

Desired behavior:
Logstash should retry, say, 5 times and then just reply to log4j2 with error somehow. Log4j2 throws an error => it can be logged in file and further investigated.

Is there an option to limit retry count for es output plugin?

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.