temp commit
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "tfe_mgr.h"
|
||||
#include <tsg/tsg_label.h>
|
||||
#include "kni_iouring.h"
|
||||
#include "kni_fieldstat.h"
|
||||
|
||||
#define BURST_MAX 1
|
||||
#define CALLER_SAPP 0
|
||||
@@ -247,6 +248,7 @@ struct kni_handle{
|
||||
struct proxy_tcp_option pxy_tcp_option;
|
||||
// int session_attribute_id;
|
||||
int log_level;
|
||||
struct proxy_fieldstat *proxy_fieldstat;
|
||||
};
|
||||
|
||||
struct traceid2pme_search_cb_args{
|
||||
|
||||
64
entry/include/kni_fieldstat.h
Normal file
64
entry/include/kni_fieldstat.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef _KNI_FIELDSTAT_METRIC_H
|
||||
#define _KNI_FIELDSTAT_METRIC_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <MESA/fieldstat.h>
|
||||
|
||||
|
||||
enum proxy_metrics_column
|
||||
{
|
||||
PROXY_METRIC_COLUMN_HIT_COUNT = 0,
|
||||
PROXY_METRIC_COLUMN_IN_BYTES,
|
||||
PROXY_METRIC_COLUMN_OUT_BYTES,
|
||||
PROXY_METRIC_COLUMN_IN_PKTS,
|
||||
PROXY_METRIC_COLUMN_OUT_PKTS,
|
||||
PROXY_METRIC_COLUMN_MAX
|
||||
};
|
||||
|
||||
|
||||
struct proxy_fieldstat
|
||||
{
|
||||
int table_id;
|
||||
int n_thread;
|
||||
unsigned int column_ids[PROXY_METRIC_COLUMN_MAX];
|
||||
struct fieldstat_dynamic_instance *instance;
|
||||
};
|
||||
|
||||
struct proxy_metric_tag
|
||||
{
|
||||
int vsys_id;
|
||||
uint64_t rule_id;
|
||||
uint8_t action;
|
||||
uint8_t pinning_status;
|
||||
};
|
||||
|
||||
// struct proxy_fieldstat *proxy_fieldstat_new(char *app_name, int n_thread,
|
||||
// int interval_ms,
|
||||
// const char *telegraf_ip,
|
||||
// unsigned short telegraf_port,
|
||||
// void *local_logger);
|
||||
|
||||
// void proxy_fieldstat_free(struct proxy_fieldstat *pxy_fs);
|
||||
|
||||
void proxy_set_metric_value(struct proxy_fieldstat *pxy_fs,
|
||||
struct proxy_metric_tag *metric_tags,
|
||||
enum proxy_metrics_column column,
|
||||
int value, int thread_id);
|
||||
|
||||
struct proxy_fieldstat *proxy_fieldstat_init(const char *profile,
|
||||
const char *section,
|
||||
int n_thread,
|
||||
void *logger);
|
||||
|
||||
void *proxy_fieldstat_destory(struct proxy_fieldstat *pxy_fs, void *logger);
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user