Skip to content

Commit 41b90b7

Browse files
cosmo0920edsiper
authored andcommitted
out_splunk: Extend retrying HTTP status code
408 and 429 also should be treated as retry. Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent c3d2417 commit 41b90b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/out_splunk/splunk.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,13 @@ static void cb_splunk_flush(struct flb_event_chunk *event_chunk,
768768
* them:
769769
*
770770
* https://docs.splunk.com/Documentation/Splunk/8.0.5/Data/TroubleshootHTTPEventCollector#Possible_error_codes
771+
* From trouble shoot document on Splunk secure gateway,
772+
* 408 and 429 should be also handled as try again:
773+
*
774+
* https://docs.splunk.com/Documentation/SecureGateway/3.5.15/Admin/TroubleshootGateway#Troubleshoot_error_codes
771775
*/
772-
ret = (c->resp.status < 400 || c->resp.status >= 500) ?
776+
ret = (c->resp.status < 400 || c->resp.status >= 500 ||
777+
c->resp.status == 408 || c->resp.status == 429) ?
773778
FLB_RETRY : FLB_ERROR;
774779

775780

0 commit comments

Comments
 (0)