From 7769413d7555d0c2df1150c2d74eabe72fe7a10b Mon Sep 17 00:00:00 2001 From: fengweihao Date: Tue, 30 May 2023 15:46:34 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8Dproxy=5Frule=5Fhits?= =?UTF-8?q?=E4=B8=ADmetric=E4=B8=8Baction=E5=8A=A8=E4=BD=9C=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/business/tsg-http/src/tsg_http.cpp | 2 +- plugin/business/tsg-http/src/tsg_logger.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/business/tsg-http/src/tsg_http.cpp b/plugin/business/tsg-http/src/tsg_http.cpp index 1640414..84303e0 100644 --- a/plugin/business/tsg-http/src/tsg_http.cpp +++ b/plugin/business/tsg-http/src/tsg_http.cpp @@ -3272,7 +3272,7 @@ void proxy_send_metric_log(const struct tfe_stream * stream, struct proxy_http_c { fieldstat->tags[thread_id][TAG_VSYS_ID].value_int = ctx->enforce_rules[i].vsys_id; fieldstat->tags[thread_id][TAG_RULE_ID].value_int = ctx->enforce_rules[i].config_id; - fieldstat->tags[thread_id][TAG_ACTION].value_int = ctx->enforce_rules[i].action; + fieldstat->tags[thread_id][TAG_ACTION].value_int = PX_ACTION_MANIPULATE; if(ctx->enforce_rules[i].action == PX_ACTION_MANIPULATE) { fieldstat->tags[thread_id][TAG_SUB_ACTION].value_str = manipulate_action_map[ctx->param->action]; diff --git a/plugin/business/tsg-http/src/tsg_logger.cpp b/plugin/business/tsg-http/src/tsg_logger.cpp index 4c15200..b438d3a 100644 --- a/plugin/business/tsg-http/src/tsg_logger.cpp +++ b/plugin/business/tsg-http/src/tsg_logger.cpp @@ -165,7 +165,7 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg) ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_COMMON_DIRECTION, (unsigned char *)&common_direction, sizeof(common_direction), &opt_out_size); if (ret==0) { - cJSON_AddNumberToObject(common_obj, "common_direction", common_direction); //0:域内->域外,1:域外->域内,描述的是CLIENT_IP信息 + cJSON_AddNumberToObject(common_obj, "common_direction", common_direction); //69:域内->域外,73:域外->域内,描述的是CLIENT_IP信息 } ret = proxy_log_get_fqdn_cat(cmsg, category_id_val, sizeof(category_id_val)); if (ret>0)