summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_socket.c
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2021-02-25 16:17:36 +0000
committerGitHub <noreply@github.com>2021-02-25 16:17:36 +0000
commit2bddc7a0f4ad406bf45f526a853b3d025839bc3b (patch)
tree88d38e782653dea812965005f993fc6cca4cb116 /collectors/ebpf.plugin/ebpf_socket.c
parent01a978b1b64491ce65843624450aae7bc9da714e (diff)
Ebpf support new collectors (#10680)
Extend original support from kprobe for all available eBPF programs and allow `eBPF.plugin` to use some Netdata features.
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_socket.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_socket.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/collectors/ebpf.plugin/ebpf_socket.c b/collectors/ebpf.plugin/ebpf_socket.c
index 7fbc244217..9776fb7cdc 100644
--- a/collectors/ebpf.plugin/ebpf_socket.c
+++ b/collectors/ebpf.plugin/ebpf_socket.c
@@ -427,6 +427,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
"Calls to internal functions",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_GROUP,
+ NULL,
21070,
ebpf_create_global_dimension,
socket_publish_aggregated,
@@ -435,6 +436,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
ebpf_create_chart(NETDATA_EBPF_FAMILY, NETDATA_TCP_FUNCTION_BITS,
"TCP bandwidth", EBPF_COMMON_DIMENSION_BITS,
NETDATA_SOCKET_GROUP,
+ NULL,
21071,
ebpf_create_global_dimension,
socket_publish_aggregated,
@@ -446,6 +448,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
"TCP errors",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_GROUP,
+ NULL,
21072,
ebpf_create_global_dimension,
socket_publish_aggregated,
@@ -457,6 +460,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
"Packages retransmitted",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_GROUP,
+ NULL,
21073,
ebpf_create_global_dimension,
&socket_publish_aggregated[NETDATA_RETRANSMIT_START],
@@ -467,6 +471,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
"UDP calls",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_GROUP,
+ NULL,
21074,
ebpf_create_global_dimension,
&socket_publish_aggregated[NETDATA_UDP_START],
@@ -475,6 +480,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
ebpf_create_chart(NETDATA_EBPF_FAMILY, NETDATA_UDP_FUNCTION_BITS,
"UDP bandwidth", EBPF_COMMON_DIMENSION_BITS,
NETDATA_SOCKET_GROUP,
+ NULL,
21075,
ebpf_create_global_dimension,
&socket_publish_aggregated[NETDATA_UDP_START],
@@ -486,6 +492,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
"UDP errors",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_GROUP,
+ NULL,
21076,
ebpf_create_global_dimension,
&socket_publish_aggregated[NETDATA_UDP_START],
@@ -498,11 +505,13 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
*
* Call ebpf_create_chart to create the charts on apps submenu.
*
- * @param em a pointer to the structure with the default values.
+ * @param em a pointer to the structure with the default values.
+ * @param ptr a pointer for targets
*/
-void ebpf_socket_create_apps_charts(ebpf_module_t *em, struct target *root)
+void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
{
UNUSED(em);
+ struct target *root = ptr;;
ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_SENT,
"Bytes sent", EBPF_COMMON_DIMENSION_BITS,
NETDATA_APPS_NET_GROUP,
@@ -581,6 +590,7 @@ static void ebpf_socket_create_nv_chart(char *id, char *title, char *units,
units,
family,
"stacked",
+ NULL,
order);
uint32_t i;
@@ -617,6 +627,7 @@ static void ebpf_socket_create_nv_retransmit(char *id, char *title, char *units,
units,
family,
"stacked",
+ NULL,
order);
uint32_t i;