File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
plugins/out_prometheus_remote_write Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ static int http_post(struct prometheus_remote_write_context *ctx,
183183 * - 200: OK
184184 * - 201: Created
185185 * - 202: Accepted
186- * - 203: no authorative resp
186+ * - 203: no authoritative resp
187187 * - 204: No Content
188188 * - 205: Reset content
189189 *
@@ -200,10 +200,16 @@ static int http_post(struct prometheus_remote_write_context *ctx,
200200 flb_plg_error (ctx -> ins , "%s:%i, HTTP status=%i" ,
201201 ctx -> host , ctx -> port , c -> resp .status );
202202 }
203+ #if defined(FLB_HAVE_SIGNV4 ) && defined(FLB_HAVE_AWS )
204+ if (c -> resp .status == 403 && ctx -> has_aws_auth == FLB_TRUE ) {
205+ flb_plg_info (ctx -> ins , "auth error, refreshing creds" );
206+ ctx -> aws_provider -> provider_vtable -> refresh (ctx -> aws_provider );
207+ }
208+ #endif
203209 out_ret = FLB_RETRY ;
204210 }
205211 else if (c -> resp .status == 400 ) {
206- /* Returned 400 status means unrecoverable. Immidiately
212+ /* Returned 400 status means unrecoverable. Immediately
207213 * returning as a error. */
208214 if (ctx -> log_response_payload &&
209215 c -> resp .payload && c -> resp .payload_size > 0 ) {
You can’t perform that action at this time.
0 commit comments