diff --git a/plugins/in_splunk/splunk.c b/plugins/in_splunk/splunk.c index 6c6555083f6..b10dfa8f00e 100644 --- a/plugins/in_splunk/splunk.c +++ b/plugins/in_splunk/splunk.c @@ -238,7 +238,7 @@ static struct flb_config_map config_map[] = { { FLB_CONFIG_MAP_BOOL, "store_token_in_metadata", "true", - 0, FLB_TRUE, offsetof(struct flb_splunk, store_token_to_metadata), + 0, FLB_TRUE, offsetof(struct flb_splunk, store_token_in_metadata), "Store Splunk HEC tokens in matadata. If set as false, they will be stored into records." }, diff --git a/plugins/in_splunk/splunk.h b/plugins/in_splunk/splunk.h index 3e795cc0484..e72905b5a80 100644 --- a/plugins/in_splunk/splunk.h +++ b/plugins/in_splunk/splunk.h @@ -48,7 +48,7 @@ struct flb_splunk { /* Token Auth */ struct mk_list auth_tokens; flb_sds_t ingested_auth_header; - int store_token_to_metadata; + int store_token_in_metadata; flb_sds_t store_token_key; struct flb_log_event_encoder log_encoder; diff --git a/plugins/in_splunk/splunk_prot.c b/plugins/in_splunk/splunk_prot.c index fee39e8ea9e..513ea41d340 100644 --- a/plugins/in_splunk/splunk_prot.c +++ b/plugins/in_splunk/splunk_prot.c @@ -226,7 +226,7 @@ static int process_raw_payload_pack(struct flb_splunk *ctx, flb_sds_t tag, char ret = flb_log_event_encoder_set_current_timestamp(&ctx->log_encoder); } - if (ctx->store_token_to_metadata == FLB_TRUE) { + if (ctx->store_token_in_metadata == FLB_TRUE) { if (ret == FLB_EVENT_ENCODER_SUCCESS) { ret = flb_log_event_encoder_append_body_values( &ctx->log_encoder, @@ -235,7 +235,7 @@ static int process_raw_payload_pack(struct flb_splunk *ctx, flb_sds_t tag, char } } - if (ctx->store_token_to_metadata == FLB_TRUE) { + if (ctx->store_token_in_metadata == FLB_TRUE) { if (ctx->ingested_auth_header != NULL) { if (ret == FLB_EVENT_ENCODER_SUCCESS) { ret = flb_log_event_encoder_append_metadata_values( @@ -303,7 +303,7 @@ static void process_flb_log_append(struct flb_splunk *ctx, msgpack_object *recor &tm); } - if (ctx->store_token_to_metadata == FLB_TRUE) { + if (ctx->store_token_in_metadata == FLB_TRUE) { if (ret == FLB_EVENT_ENCODER_SUCCESS) { ret = flb_log_event_encoder_set_body_from_msgpack_object( &ctx->log_encoder,