diff options
| -rw-r--r-- | src/tsg_rule.cpp | 8 | ||||
| -rw-r--r-- | src/tsg_stat.cpp | 4 | ||||
| -rw-r--r-- | src/tsg_stat.h | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index ec16fc8..e5cd335 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -2442,23 +2442,23 @@ int srt_attribute_set_dynamic_ipport_mapping(const struct streaminfo *a_stream, if(*dest_mapping==NULL) { - tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_QUERY_METRICS, 1); + tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_S_QUERY_METRICS, 1); int n_ex_data=maat_ipport_plugin_table_get_ex_data(feather, g_tsg_maat_rt_para.plugin_dyn_mapping_tb.id, &dest_ip, dest_port, (void **)dest_mapping, 1); if(n_ex_data>0) { - tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_RESPONSE_METRICS, 1); + tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_S_RESPONSE_METRICS, 1); } } if(*source_mapping==NULL) { - tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_QUERY_METRICS, 1); + tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_C_QUERY_METRICS, 1); int n_ex_data=maat_ipport_plugin_table_get_ex_data(feather, g_tsg_maat_rt_para.plugin_dyn_mapping_tb.id, &source_ip, source_port, (void **)source_mapping, 1); if(n_ex_data>0) { - tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_RESPONSE_METRICS, 1); + tsg_stat_dyn_ipport_mapping_metrics_update(a_stream->threadnum, THREAD_DYN_IPPORT_MAPPING_C_RESPONSE_METRICS, 1); } } diff --git a/src/tsg_stat.cpp b/src/tsg_stat.cpp index 57fc447..2c0f812 100644 --- a/src/tsg_stat.cpp +++ b/src/tsg_stat.cpp @@ -365,8 +365,8 @@ int tsg_stat_init(void) g_rt_stat_para.sendlog.table_id=fieldstat_register_table(g_rt_stat_para.fs_instance, "sendlog", sendlog_column_name, sendlog_column_type, LOG_STATUS_MAX); char fs3_table_name[128]={0}; - enum field_type thread_metrics_column_type[THREAD_METRICS_MAX]={FIELD_TYPE_GAUGE, FIELD_TYPE_GAUGE, FIELD_TYPE_GAUGE}; - const char *thread_metrics_column_name[THREAD_METRICS_MAX]={"app_metric_cnt", "dyn_mapping_Q", "dyn_mapping_R"}; + enum field_type thread_metrics_column_type[THREAD_METRICS_MAX]={FIELD_TYPE_GAUGE, FIELD_TYPE_GAUGE, FIELD_TYPE_GAUGE, FIELD_TYPE_GAUGE, FIELD_TYPE_GAUGE}; + const char *thread_metrics_column_name[THREAD_METRICS_MAX]={"app_metric_cnt", "dyn_mapping_C_Q", "dyn_mapping_C_R", "dyn_mapping_S_Q", "dyn_mapping_S_R"}; g_rt_stat_para.thread_metrics.table_id=fieldstat_register_table(g_rt_stat_para.fs_instance, "thread", thread_metrics_column_name, thread_metrics_column_type, THREAD_METRICS_MAX); int thread_count=get_thread_count(); diff --git a/src/tsg_stat.h b/src/tsg_stat.h index 453b5f7..d6deb68 100644 --- a/src/tsg_stat.h +++ b/src/tsg_stat.h @@ -122,8 +122,10 @@ enum CTRL_SERVICE enum THREAD_METRICS { THREAD_APP_METRICS_COUNT=0, - THREAD_DYN_IPPORT_MAPPING_QUERY_METRICS, - THREAD_DYN_IPPORT_MAPPING_RESPONSE_METRICS, + THREAD_DYN_IPPORT_MAPPING_C_QUERY_METRICS, + THREAD_DYN_IPPORT_MAPPING_C_RESPONSE_METRICS, + THREAD_DYN_IPPORT_MAPPING_S_QUERY_METRICS, + THREAD_DYN_IPPORT_MAPPING_S_RESPONSE_METRICS, THREAD_METRICS_MAX }; |
