diff options
Diffstat (limited to 'aclk/aclk_stats.h')
-rw-r--r-- | aclk/aclk_stats.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/aclk/aclk_stats.h b/aclk/aclk_stats.h index 33d016965..317a34ba4 100644 --- a/aclk/aclk_stats.h +++ b/aclk/aclk_stats.h @@ -3,7 +3,7 @@ #ifndef NETDATA_ACLK_STATS_H #define NETDATA_ACLK_STATS_H -#include "../daemon/common.h" +#include "daemon/common.h" #include "libnetdata/libnetdata.h" #define ACLK_STATS_THREAD_NAME "ACLK_Stats" @@ -13,7 +13,10 @@ extern netdata_mutex_t aclk_stats_mutex; #define ACLK_STATS_LOCK netdata_mutex_lock(&aclk_stats_mutex) #define ACLK_STATS_UNLOCK netdata_mutex_unlock(&aclk_stats_mutex) -extern int aclk_stats_enabled; +// if you change update `cloud_req_http_type_names`. +#define ACLK_STATS_CLOUD_HTTP_REQ_TYPE_CNT 7 + +int aclk_cloud_req_http_type_to_idx(const char *name); struct aclk_stats_thread { netdata_thread_t *thread; @@ -45,6 +48,19 @@ extern struct aclk_metrics_per_sample { volatile uint32_t cloud_req_recvd; volatile uint32_t cloud_req_err; + // request types. + volatile uint32_t cloud_req_type_http; + volatile uint32_t cloud_req_type_alarm_upd; + volatile uint32_t cloud_req_type_metadata_info; + volatile uint32_t cloud_req_type_metadata_alarms; + volatile uint32_t cloud_req_type_chart_new; + volatile uint32_t cloud_req_type_chart_del; + volatile uint32_t cloud_req_type_register_node; + volatile uint32_t cloud_req_type_node_upd; + + // HTTP-specific request types. + volatile uint32_t cloud_req_http_by_type[ACLK_STATS_CLOUD_HTTP_REQ_TYPE_CNT]; + volatile uint32_t cloud_q_process_total; volatile uint32_t cloud_q_process_count; volatile uint32_t cloud_q_process_max; |