summaryrefslogtreecommitdiff
path: root/platform/src/sf_status.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/src/sf_status.cpp')
-rw-r--r--platform/src/sf_status.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/src/sf_status.cpp b/platform/src/sf_status.cpp
index c91cc2f..21a49de 100644
--- a/platform/src/sf_status.cpp
+++ b/platform/src/sf_status.cpp
@@ -58,10 +58,10 @@ struct sf_status *sf_status_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;
@@ -158,9 +158,9 @@ void sf_status_output(struct sf_status *handle)
struct metric *node = NULL;
HASH_ITER(hh, handle->htable, node, temp)
{
- const struct fieldstat_tag tags[] = {
- {"vsys_id", TAG_INTEGER, {.value_longlong = node->key.vsys_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}},
+ {"sf_profile_id", FIELD_VALUE_INTEGER, {.value_longlong = node->key.sf_profile_id}},
};
fieldstat_easy_counter_set(handle->fs, 0, handle->sf_status_idx, tags, sizeof(tags) / sizeof(tags[0]), node->sf_status);