adapt fieldstat_easy: rename 'fieldstat_tag' to 'field'
This commit is contained in:
@@ -120,10 +120,10 @@ struct sf_metrics *sf_metrics_create(const char *profile, struct kafka *kfk)
|
||||
MESA_load_profile_string_def(profile, "metrics", "device_group", handle->cfg.device_group, sizeof(handle->cfg.device_group), "");
|
||||
MESA_load_profile_string_def(profile, "metrics", "device_id", handle->cfg.device_id, sizeof(handle->cfg.device_id), "");
|
||||
|
||||
const struct fieldstat_tag tags[] = {
|
||||
{"data_center", TAG_CSTRING, {.value_str = handle->cfg.data_center}},
|
||||
{"device_group", TAG_CSTRING, {.value_str = handle->cfg.device_group}},
|
||||
{"device_id", TAG_CSTRING, {.value_str = handle->cfg.device_id}},
|
||||
const struct field tags[] = {
|
||||
{"data_center", FIELD_VALUE_CSTRING, {.value_str = handle->cfg.data_center}},
|
||||
{"device_group", FIELD_VALUE_CSTRING, {.value_str = handle->cfg.device_group}},
|
||||
{"device_id", FIELD_VALUE_CSTRING, {.value_str = handle->cfg.device_id}},
|
||||
};
|
||||
|
||||
handle->kfk = kfk;
|
||||
@@ -262,11 +262,11 @@ void sf_metrics_output(struct sf_metrics *handle, uint16_t thr_idx)
|
||||
continue;
|
||||
}
|
||||
|
||||
const struct fieldstat_tag tags[] = {
|
||||
{"vsys_id", TAG_INTEGER, {.value_longlong = node->key.vsys_id}},
|
||||
{"rule_id", TAG_INTEGER, {.value_longlong = (long long)node->key.rule_id}},
|
||||
{"sff_profile_id", TAG_INTEGER, {.value_longlong = node->key.sff_profile_id}},
|
||||
{"sf_profile_id", TAG_INTEGER, {.value_longlong = node->key.sf_profile_id}},
|
||||
const struct field tags[] = {
|
||||
{"vsys_id", FIELD_VALUE_INTEGER, {.value_longlong = node->key.vsys_id}},
|
||||
{"rule_id", FIELD_VALUE_INTEGER, {.value_longlong = (long long)node->key.rule_id}},
|
||||
{"sff_profile_id", FIELD_VALUE_INTEGER, {.value_longlong = node->key.sff_profile_id}},
|
||||
{"sf_profile_id", FIELD_VALUE_INTEGER, {.value_longlong = node->key.sf_profile_id}},
|
||||
};
|
||||
|
||||
fieldstat_easy_counter_incrby(handle->fs, thr_idx, handle->sent_pkts_idx, tags, sizeof(tags) / sizeof(tags[0]), node->sent_pkts);
|
||||
|
||||
Reference in New Issue
Block a user