From 41b90b777c3b83dc1a09299f8ff5147852a82bc0 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Wed, 11 Sep 2024 16:39:26 +0900 Subject: [PATCH] out_splunk: Extend retrying HTTP status code 408 and 429 also should be treated as retry. Signed-off-by: Hiroshi Hatake --- plugins/out_splunk/splunk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/out_splunk/splunk.c b/plugins/out_splunk/splunk.c index a928f52843b..413c1e04036 100644 --- a/plugins/out_splunk/splunk.c +++ b/plugins/out_splunk/splunk.c @@ -768,8 +768,13 @@ static void cb_splunk_flush(struct flb_event_chunk *event_chunk, * them: * * https://docs.splunk.com/Documentation/Splunk/8.0.5/Data/TroubleshootHTTPEventCollector#Possible_error_codes + * From trouble shoot document on Splunk secure gateway, + * 408 and 429 should be also handled as try again: + * + * https://docs.splunk.com/Documentation/SecureGateway/3.5.15/Admin/TroubleshootGateway#Troubleshoot_error_codes */ - ret = (c->resp.status < 400 || c->resp.status >= 500) ? + ret = (c->resp.status < 400 || c->resp.status >= 500 || + c->resp.status == 408 || c->resp.status == 429) ? FLB_RETRY : FLB_ERROR;