bugfix:修复管控策略Policy Hits Metrics误发送pinning_status,根据route_dir发送字节数

This commit is contained in:
fengweihao
2023-05-10 17:51:57 +08:00
parent 542f4cbdfa
commit 2a55a2be75
4 changed files with 68 additions and 14 deletions

View File

@@ -23,9 +23,9 @@ enum metric_tags_index
{
TAG_VSYS_ID = 0,
TAG_RULE_ID,
TAG_PINNING_STATUS,
TAG_ACTION,
TAG_SUB_ACTION,
TAG_PINNING_STATUS,
TAG_MAX
};
@@ -39,7 +39,7 @@ struct tfe_fieldstat_metric_t
};
void tfe_set_intercept_metric(struct tfe_stream *stream, int hit_count, int downstream_rx_pkts, int downstream_rx_bytes, int upstream_rx_pkts, int upstream_rx_bytes);
int tfe_fieldstat_metric_incrby(struct tfe_fieldstat_metric_t *fieldstat, unsigned int column_id, long long value, const struct fieldstat_tag tags[], int thread_id);
int tfe_fieldstat_metric_incrby(struct tfe_fieldstat_metric_t *fieldstat, unsigned int column_id, long long value, const struct fieldstat_tag tags[], int n_tags, int thread_id);
struct tfe_fieldstat_metric_t *tfe_fieldstat_metric_create(char *telegraf_ip, int telegraf_port, char *app_name, int cycle, int max_thread, void *local_logger);
void tfe_fieldstat_metric_destroy(struct tfe_fieldstat_metric_t *fieldstat);