Skip to content

Commit

Permalink
out_splunk: Extend retrying HTTP status code
Browse files Browse the repository at this point in the history
408 and 429 also should be treated as retry.

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Sep 16, 2024
1 parent c3d2417 commit 41b90b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/out_splunk/splunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down

0 comments on commit 41b90b7

Please sign in to comment.