@cryptotaxi247 / netdata-1 / commits / 39bb77bfe

Add label for cgroup (#17156)

thiagoftsm committed Mar 29, 2024 at 20:06 UTC 39bb77bfed67330bc7a868d7442a59d535646982
11 files changed +153 -50
src/collectors/ebpf.plugin/ebpf.c
+8 -3
@@ -943,6 +943,13 @@ void ebpf_stop_threads(int sig)
943 }
944 pthread_mutex_unlock(&ebpf_exit_cleanup);
945
946 + for (i = 0; ebpf_modules[i].info.thread_name != NULL; i++) {
947 + if (ebpf_threads[i].thread)
948 + netdata_thread_join(*ebpf_threads[i].thread, NULL);
949 + }
950 +
951 + ebpf_plugin_exit = true;
952 +
953 pthread_mutex_lock(&mutex_cgroup_shm);
954 netdata_thread_cancel(*cgroup_integration_thread.thread);
955 #ifdef NETDATA_DEV_MODE
@@ -950,8 +957,6 @@ void ebpf_stop_threads(int sig)
957 #endif
958 pthread_mutex_unlock(&mutex_cgroup_shm);
959
953 - ebpf_plugin_exit = true;
954 -
960 ebpf_check_before2go();
961
962 pthread_mutex_lock(&ebpf_exit_cleanup);
@@ -4022,7 +4027,7 @@ int main(int argc, char **argv)
4027 st->thread = mallocz(sizeof(netdata_thread_t));
4028 em->enabled = NETDATA_THREAD_EBPF_RUNNING;
4029 em->lifetime = EBPF_NON_FUNCTION_LIFE_TIME;
4025 - netdata_thread_create(st->thread, st->name, NETDATA_THREAD_OPTION_DEFAULT, st->start_routine, em);
4030 + netdata_thread_create(st->thread, st->name, NETDATA_THREAD_OPTION_JOINABLE, st->start_routine, em);
4031 } else {
4032 em->lifetime = EBPF_DEFAULT_LIFETIME;
4033 }
src/collectors/ebpf.plugin/ebpf_cachestat.c
+13 -4
@@ -895,7 +895,7 @@ void ebpf_cachestat_create_apps_charts(struct ebpf_module *em, void *ptr)
895 20260,
896 update_every,
897 NETDATA_EBPF_MODULE_NAME_CACHESTAT);
898 - ebpf_create_chart_labels("app_group", w->name, 1);
898 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
899 ebpf_commit_label();
900 fprintf(stdout, "DIMENSION ratio '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
901
@@ -911,7 +911,7 @@ void ebpf_cachestat_create_apps_charts(struct ebpf_module *em, void *ptr)
911 20261,
912 update_every,
913 NETDATA_EBPF_MODULE_NAME_CACHESTAT);
914 - ebpf_create_chart_labels("app_group", w->name, 1);
914 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
915 ebpf_commit_label();
916 fprintf(stdout, "DIMENSION pages '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
917
@@ -926,7 +926,7 @@ void ebpf_cachestat_create_apps_charts(struct ebpf_module *em, void *ptr)
926 20262,
927 update_every,
928 NETDATA_EBPF_MODULE_NAME_CACHESTAT);
929 - ebpf_create_chart_labels("app_group", w->name, 1);
929 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
930 ebpf_commit_label();
931 fprintf(stdout, "DIMENSION hits '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
932
@@ -941,7 +941,7 @@ void ebpf_cachestat_create_apps_charts(struct ebpf_module *em, void *ptr)
941 20263,
942 update_every,
943 NETDATA_EBPF_MODULE_NAME_CACHESTAT);
944 - ebpf_create_chart_labels("app_group", w->name, 1);
944 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
945 ebpf_commit_label();
946 fprintf(stdout, "DIMENSION misses '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
947 w->charts_created |= 1<<EBPF_MODULE_CACHESTAT_IDX;
@@ -1259,6 +1259,7 @@ static void ebpf_send_specific_cachestat_data(char *type, netdata_publish_caches
1259 */
1260 static void ebpf_create_specific_cachestat_charts(char *type, int update_every)
1261 {
1262 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
1263 ebpf_create_chart(type, NETDATA_CACHESTAT_HIT_RATIO_CHART,
1264 "Hit ratio",
1265 EBPF_COMMON_DIMENSION_PERCENTAGE, NETDATA_CACHESTAT_SUBMENU,
@@ -1266,6 +1267,8 @@ static void ebpf_create_specific_cachestat_charts(char *type, int update_every)
1267 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5200,
1268 ebpf_create_global_dimension,
1269 cachestat_counter_publish_aggregated, 1, update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
1270 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1271 + ebpf_commit_label();
1272
1273 ebpf_create_chart(type, NETDATA_CACHESTAT_DIRTY_CHART,
1274 "Number of dirty pages",
@@ -1275,6 +1278,8 @@ static void ebpf_create_specific_cachestat_charts(char *type, int update_every)
1278 ebpf_create_global_dimension,
1279 &cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_DIRTY], 1,
1280 update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
1281 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1282 + ebpf_commit_label();
1283
1284 ebpf_create_chart(type, NETDATA_CACHESTAT_HIT_CHART,
1285 "Number of accessed files",
@@ -1284,6 +1289,8 @@ static void ebpf_create_specific_cachestat_charts(char *type, int update_every)
1289 ebpf_create_global_dimension,
1290 &cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_HIT], 1,
1291 update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
1292 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1293 + ebpf_commit_label();
1294
1295 ebpf_create_chart(type, NETDATA_CACHESTAT_MISSES_CHART,
1296 "Files out of page cache",
@@ -1293,6 +1300,8 @@ static void ebpf_create_specific_cachestat_charts(char *type, int update_every)
1300 ebpf_create_global_dimension,
1301 &cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_MISS], 1,
1302 update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
1303 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1304 + ebpf_commit_label();
1305 }
1306
1307 /**
src/collectors/ebpf.plugin/ebpf_cgroup.c
+1 -1
@@ -340,7 +340,7 @@ void ebpf_create_charts_on_systemd(ebpf_systemd_args_t *chart)
340 chart->order,
341 chart->update_every,
342 chart->module);
343 - ebpf_create_chart_labels("service_name", chart->id, 0);
343 + ebpf_create_chart_labels("service_name", chart->id, RRDLABEL_SRC_AUTO);
344 ebpf_commit_label();
345 fprintf(stdout, "DIMENSION %s '' %s 1 1\n", chart->dimension, chart->algorithm);
346 }
src/collectors/ebpf.plugin/ebpf_dcstat.c
+13 -4
@@ -696,7 +696,7 @@ void ebpf_dcstat_create_apps_charts(struct ebpf_module *em, void *ptr)
696 20265,
697 update_every,
698 NETDATA_EBPF_MODULE_NAME_DCSTAT);
699 - ebpf_create_chart_labels("app_group", w->name, 1);
699 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
700 ebpf_commit_label();
701 fprintf(stdout, "DIMENSION ratio '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
702
@@ -711,7 +711,7 @@ void ebpf_dcstat_create_apps_charts(struct ebpf_module *em, void *ptr)
711 20266,
712 update_every,
713 NETDATA_EBPF_MODULE_NAME_DCSTAT);
714 - ebpf_create_chart_labels("app_group", w->name, 1);
714 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
715 ebpf_commit_label();
716 fprintf(stdout, "DIMENSION files '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
717
@@ -726,7 +726,7 @@ void ebpf_dcstat_create_apps_charts(struct ebpf_module *em, void *ptr)
726 20267,
727 update_every,
728 NETDATA_EBPF_MODULE_NAME_DCSTAT);
729 - ebpf_create_chart_labels("app_group", w->name, 1);
729 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
730 ebpf_commit_label();
731 fprintf(stdout, "DIMENSION files '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
732
@@ -741,7 +741,7 @@ void ebpf_dcstat_create_apps_charts(struct ebpf_module *em, void *ptr)
741 20268,
742 update_every,
743 NETDATA_EBPF_MODULE_NAME_DCSTAT);
744 - ebpf_create_chart_labels("app_group", w->name, 1);
744 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
745 ebpf_commit_label();
746 fprintf(stdout, "DIMENSION files '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
747
@@ -910,12 +910,15 @@ static void dcstat_send_global(netdata_publish_dcstat_t *publish)
910 */
911 static void ebpf_create_specific_dc_charts(char *type, int update_every)
912 {
913 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
914 ebpf_create_chart(type, NETDATA_DC_HIT_CHART, "Percentage of files inside directory cache",
915 EBPF_COMMON_DIMENSION_PERCENTAGE, NETDATA_DIRECTORY_CACHE_SUBMENU,
916 NETDATA_CGROUP_DC_HIT_RATIO_CONTEXT, NETDATA_EBPF_CHART_TYPE_LINE,
917 NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5700,
918 ebpf_create_global_dimension,
919 dcstat_counter_publish_aggregated, 1, update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
920 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
921 + ebpf_commit_label();
922
923 ebpf_create_chart(type, NETDATA_DC_REFERENCE_CHART, "Count file access",
924 EBPF_COMMON_DIMENSION_FILES, NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -924,6 +927,8 @@ static void ebpf_create_specific_dc_charts(char *type, int update_every)
927 ebpf_create_global_dimension,
928 &dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_REFERENCE], 1,
929 update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
930 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
931 + ebpf_commit_label();
932
933 ebpf_create_chart(type, NETDATA_DC_REQUEST_NOT_CACHE_CHART,
934 "Files not present inside directory cache",
@@ -933,6 +938,8 @@ static void ebpf_create_specific_dc_charts(char *type, int update_every)
938 ebpf_create_global_dimension,
939 &dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_SLOW], 1,
940 update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
941 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
942 + ebpf_commit_label();
943
944 ebpf_create_chart(type, NETDATA_DC_REQUEST_NOT_FOUND_CHART,
945 "Files not found",
@@ -942,6 +949,8 @@ static void ebpf_create_specific_dc_charts(char *type, int update_every)
949 ebpf_create_global_dimension,
950 &dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_MISS], 1,
951 update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
952 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
953 + ebpf_commit_label();
954 }
955
956 /**
src/collectors/ebpf.plugin/ebpf_fd.c
+13 -4
@@ -904,6 +904,7 @@ static void ebpf_fd_sum_cgroup_pids(netdata_fd_stat_t *fd, struct pid_on_target2
904 */
905 static void ebpf_create_specific_fd_charts(char *type, ebpf_module_t *em)
906 {
907 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
908 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_FILE_OPEN, "Number of open files",
909 EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_FILE_GROUP,
910 NETDATA_CGROUP_FD_OPEN_CONTEXT, NETDATA_EBPF_CHART_TYPE_LINE,
@@ -911,6 +912,8 @@ static void ebpf_create_specific_fd_charts(char *type, ebpf_module_t *em)
912 ebpf_create_global_dimension,
913 &fd_publish_aggregated[NETDATA_FD_SYSCALL_OPEN],
914 1, em->update_every, NETDATA_EBPF_MODULE_NAME_FD);
915 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
916 + ebpf_commit_label();
917
918 if (em->mode < MODE_ENTRY) {
919 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR, "Fails to open files",
@@ -921,6 +924,8 @@ static void ebpf_create_specific_fd_charts(char *type, ebpf_module_t *em)
924 &fd_publish_aggregated[NETDATA_FD_SYSCALL_OPEN],
925 1, em->update_every,
926 NETDATA_EBPF_MODULE_NAME_FD);
927 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
928 + ebpf_commit_label();
929 }
930
931 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_FILE_CLOSED, "Files closed",
@@ -930,6 +935,8 @@ static void ebpf_create_specific_fd_charts(char *type, ebpf_module_t *em)
935 ebpf_create_global_dimension,
936 &fd_publish_aggregated[NETDATA_FD_SYSCALL_CLOSE],
937 1, em->update_every, NETDATA_EBPF_MODULE_NAME_FD);
938 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
939 + ebpf_commit_label();
940
941 if (em->mode < MODE_ENTRY) {
942 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR, "Fails to close files",
@@ -940,6 +947,8 @@ static void ebpf_create_specific_fd_charts(char *type, ebpf_module_t *em)
947 &fd_publish_aggregated[NETDATA_FD_SYSCALL_CLOSE],
948 1, em->update_every,
949 NETDATA_EBPF_MODULE_NAME_FD);
950 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
951 + ebpf_commit_label();
952 }
953 }
954
@@ -1263,7 +1272,7 @@ void ebpf_fd_create_apps_charts(struct ebpf_module *em, void *ptr)
1272 20220,
1273 update_every,
1274 NETDATA_EBPF_MODULE_NAME_FD);
1266 - ebpf_create_chart_labels("app_group", w->name, 1);
1275 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1276 ebpf_commit_label();
1277 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1278
@@ -1279,7 +1288,7 @@ void ebpf_fd_create_apps_charts(struct ebpf_module *em, void *ptr)
1288 20221,
1289 update_every,
1290 NETDATA_EBPF_MODULE_NAME_FD);
1282 - ebpf_create_chart_labels("app_group", w->name, 1);
1291 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1292 ebpf_commit_label();
1293 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1294 }
@@ -1295,7 +1304,7 @@ void ebpf_fd_create_apps_charts(struct ebpf_module *em, void *ptr)
1304 20222,
1305 update_every,
1306 NETDATA_EBPF_MODULE_NAME_FD);
1298 - ebpf_create_chart_labels("app_group", w->name, 1);
1307 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1308 ebpf_commit_label();
1309 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1310
@@ -1311,7 +1320,7 @@ void ebpf_fd_create_apps_charts(struct ebpf_module *em, void *ptr)
1320 20223,
1321 update_every,
1322 NETDATA_EBPF_MODULE_NAME_FD);
1314 - ebpf_create_chart_labels("app_group", w->name, 1);
1323 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1324 ebpf_commit_label();
1325 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1326 }
src/collectors/ebpf.plugin/ebpf_oomkill.c
+1 -1
@@ -514,7 +514,7 @@ void ebpf_oomkill_create_apps_charts(struct ebpf_module *em, void *ptr)
514 20072,
515 update_every,
516 NETDATA_EBPF_MODULE_NAME_OOMKILL);
517 - ebpf_create_chart_labels("app_group", w->name, 1);
517 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
518 ebpf_commit_label();
519 fprintf(stdout, "DIMENSION kills '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
520
src/collectors/ebpf.plugin/ebpf_process.c
+16 -5
@@ -357,7 +357,7 @@ void ebpf_process_create_apps_charts(struct ebpf_module *em, void *ptr)
357 20161,
358 update_every,
359 NETDATA_EBPF_MODULE_NAME_PROCESS);
360 - ebpf_create_chart_labels("app_group", w->name, 1);
360 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
361 ebpf_commit_label();
362 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
363
@@ -372,7 +372,7 @@ void ebpf_process_create_apps_charts(struct ebpf_module *em, void *ptr)
372 20162,
373 update_every,
374 NETDATA_EBPF_MODULE_NAME_PROCESS);
375 - ebpf_create_chart_labels("app_group", w->name, 1);
375 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
376 ebpf_commit_label();
377 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
378
@@ -387,7 +387,7 @@ void ebpf_process_create_apps_charts(struct ebpf_module *em, void *ptr)
387 20163,
388 update_every,
389 NETDATA_EBPF_MODULE_NAME_PROCESS);
390 - ebpf_create_chart_labels("app_group", w->name, 1);
390 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
391 ebpf_commit_label();
392 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
393
@@ -402,7 +402,7 @@ void ebpf_process_create_apps_charts(struct ebpf_module *em, void *ptr)
402 20164,
403 update_every,
404 NETDATA_EBPF_MODULE_NAME_PROCESS);
405 - ebpf_create_chart_labels("app_group", w->name, 1);
405 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
406 ebpf_commit_label();
407 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
408
@@ -418,7 +418,7 @@ void ebpf_process_create_apps_charts(struct ebpf_module *em, void *ptr)
418 20165,
419 update_every,
420 NETDATA_EBPF_MODULE_NAME_PROCESS);
421 - ebpf_create_chart_labels("app_group", w->name, 1);
421 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
422 ebpf_commit_label();
423 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
424 }
@@ -820,12 +820,15 @@ static void ebpf_send_specific_process_data(char *type, ebpf_process_stat_t *val
820 */
821 static void ebpf_create_specific_process_charts(char *type, ebpf_module_t *em)
822 {
823 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
824 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_TASK_PROCESS, "Process started",
825 EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP,
826 NETDATA_CGROUP_PROCESS_CREATE_CONTEXT, NETDATA_EBPF_CHART_TYPE_LINE,
827 NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5000,
828 ebpf_create_global_dimension, &process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_FORK],
829 1, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
830 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
831 + ebpf_commit_label();
832
833 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_TASK_THREAD, "Threads started",
834 EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP,
@@ -834,6 +837,8 @@ static void ebpf_create_specific_process_charts(char *type, ebpf_module_t *em)
837 ebpf_create_global_dimension,
838 &process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_CLONE],
839 1, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
840 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
841 + ebpf_commit_label();
842
843 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_TASK_EXIT, "Tasks starts exit process.",
844 EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP,
@@ -842,6 +847,8 @@ static void ebpf_create_specific_process_charts(char *type, ebpf_module_t *em)
847 ebpf_create_global_dimension,
848 &process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_EXIT],
849 1, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
850 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
851 + ebpf_commit_label();
852
853 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_TASK_CLOSE, "Tasks closed",
854 EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP,
@@ -850,6 +857,8 @@ static void ebpf_create_specific_process_charts(char *type, ebpf_module_t *em)
857 ebpf_create_global_dimension,
858 &process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_RELEASE_TASK],
859 1, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
860 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
861 + ebpf_commit_label();
862
863 if (em->mode < MODE_ENTRY) {
864 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_TASK_ERROR, "Errors to create process or threads.",
@@ -859,6 +868,8 @@ static void ebpf_create_specific_process_charts(char *type, ebpf_module_t *em)
868 ebpf_create_global_dimension,
869 &process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_EXIT],
870 1, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
871 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
872 + ebpf_commit_label();
873 }
874 }
875
src/collectors/ebpf.plugin/ebpf_shm.c
+13 -4
@@ -735,6 +735,7 @@ static void ebpf_shm_sum_cgroup_pids(netdata_publish_shm_t *shm, struct pid_on_t
735 */
736 static void ebpf_create_specific_shm_charts(char *type, int update_every)
737 {
738 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
739 ebpf_create_chart(type, NETDATA_SHMGET_CHART,
740 "Calls to syscall shmget(2).",
741 EBPF_COMMON_DIMENSION_CALL,
@@ -747,6 +748,8 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
748 1,
749 update_every,
750 NETDATA_EBPF_MODULE_NAME_SHM);
751 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
752 + ebpf_commit_label();
753
754 ebpf_create_chart(type, NETDATA_SHMAT_CHART,
755 "Calls to syscall shmat(2).",
@@ -760,6 +763,8 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
763 1,
764 update_every,
765 NETDATA_EBPF_MODULE_NAME_SHM);
766 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
767 + ebpf_commit_label();
768
769 ebpf_create_chart(type, NETDATA_SHMDT_CHART,
770 "Calls to syscall shmdt(2).",
@@ -773,6 +778,8 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
778 1,
779 update_every,
780 NETDATA_EBPF_MODULE_NAME_SHM);
781 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
782 + ebpf_commit_label();
783
784 ebpf_create_chart(type, NETDATA_SHMCTL_CHART,
785 "Calls to syscall shmctl(2).",
@@ -786,6 +793,8 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
793 1,
794 update_every,
795 NETDATA_EBPF_MODULE_NAME_SHM);
796 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
797 + ebpf_commit_label();
798 }
799
800 /**
@@ -1168,7 +1177,7 @@ void ebpf_shm_create_apps_charts(struct ebpf_module *em, void *ptr)
1177 20191,
1178 update_every,
1179 NETDATA_EBPF_MODULE_NAME_SHM);
1171 - ebpf_create_chart_labels("app_group", w->name, 1);
1180 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1181 ebpf_commit_label();
1182 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1183
@@ -1183,7 +1192,7 @@ void ebpf_shm_create_apps_charts(struct ebpf_module *em, void *ptr)
1192 20192,
1193 update_every,
1194 NETDATA_EBPF_MODULE_NAME_SHM);
1186 - ebpf_create_chart_labels("app_group", w->name, 1);
1195 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1196 ebpf_commit_label();
1197 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1198
@@ -1198,7 +1207,7 @@ void ebpf_shm_create_apps_charts(struct ebpf_module *em, void *ptr)
1207 20193,
1208 update_every,
1209 NETDATA_EBPF_MODULE_NAME_SHM);
1201 - ebpf_create_chart_labels("app_group", w->name, 1);
1210 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1211 ebpf_commit_label();
1212 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1213
@@ -1213,7 +1222,7 @@ void ebpf_shm_create_apps_charts(struct ebpf_module *em, void *ptr)
1222 20194,
1223 update_every,
1224 NETDATA_EBPF_MODULE_NAME_SHM);
1216 - ebpf_create_chart_labels("app_group", w->name, 1);
1225 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1226 ebpf_commit_label();
1227 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1228
src/collectors/ebpf.plugin/ebpf_socket.c
+28 -9
@@ -1236,7 +1236,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1236 order++,
1237 update_every,
1238 NETDATA_EBPF_MODULE_NAME_SOCKET);
1239 - ebpf_create_chart_labels("app_group", w->name, 1);
1239 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1240 ebpf_commit_label();
1241 fprintf(stdout, "DIMENSION connections '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1242
@@ -1252,7 +1252,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1252 order++,
1253 update_every,
1254 NETDATA_EBPF_MODULE_NAME_SOCKET);
1255 - ebpf_create_chart_labels("app_group", w->name, 1);
1255 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1256 ebpf_commit_label();
1257 fprintf(stdout, "DIMENSION connections '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1258 }
@@ -1268,7 +1268,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1268 order++,
1269 update_every,
1270 NETDATA_EBPF_MODULE_NAME_SOCKET);
1271 - ebpf_create_chart_labels("app_group", w->name, 1);
1271 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1272 ebpf_commit_label();
1273 fprintf(stdout, "DIMENSION bandwidth '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1274
@@ -1283,7 +1283,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1283 order++,
1284 update_every,
1285 NETDATA_EBPF_MODULE_NAME_SOCKET);
1286 - ebpf_create_chart_labels("app_group", w->name, 1);
1286 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1287 ebpf_commit_label();
1288 fprintf(stdout, "DIMENSION bandwidth '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1289
@@ -1298,7 +1298,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1298 order++,
1299 update_every,
1300 NETDATA_EBPF_MODULE_NAME_SOCKET);
1301 - ebpf_create_chart_labels("app_group", w->name, 1);
1301 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1302 ebpf_commit_label();
1303 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1304
@@ -1313,7 +1313,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1313 order++,
1314 update_every,
1315 NETDATA_EBPF_MODULE_NAME_SOCKET);
1316 - ebpf_create_chart_labels("app_group", w->name, 1);
1316 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1317 ebpf_commit_label();
1318 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1319
@@ -1328,7 +1328,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1328 order++,
1329 update_every,
1330 NETDATA_EBPF_MODULE_NAME_SOCKET);
1331 - ebpf_create_chart_labels("app_group", w->name, 1);
1331 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1332 ebpf_commit_label();
1333 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1334
@@ -1343,7 +1343,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1343 order++,
1344 update_every,
1345 NETDATA_EBPF_MODULE_NAME_SOCKET);
1346 - ebpf_create_chart_labels("app_group", w->name, 1);
1346 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1347 ebpf_commit_label();
1348 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1349
@@ -1358,7 +1358,7 @@ void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
1358 order,
1359 update_every,
1360 NETDATA_EBPF_MODULE_NAME_SOCKET);
1361 - ebpf_create_chart_labels("app_group", w->name, 1);
1361 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
1362 ebpf_commit_label();
1363 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
1364
@@ -2108,6 +2108,7 @@ static void ebpf_socket_sum_cgroup_pids(ebpf_socket_publish_apps_t *socket, stru
2108 static void ebpf_create_specific_socket_charts(char *type, int update_every)
2109 {
2110 int order_basis = 5300;
2111 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
2112 ebpf_create_chart(type, NETDATA_NET_APPS_CONNECTION_TCP_V4,
2113 "Calls to tcp_v4_connection",
2114 EBPF_COMMON_DIMENSION_CONNECTIONS, NETDATA_CGROUP_NET_GROUP,
@@ -2117,6 +2118,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2118 ebpf_create_global_dimension,
2119 &socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V4], 1,
2120 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2121 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2122 + ebpf_commit_label();
2123
2124 if (tcp_v6_connect_address.type == 'T') {
2125 ebpf_create_chart(type,
@@ -2132,6 +2135,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2135 1,
2136 update_every,
2137 NETDATA_EBPF_MODULE_NAME_SOCKET);
2138 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2139 + ebpf_commit_label();
2140 }
2141
2142 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_RECV,
@@ -2143,6 +2148,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2148 ebpf_create_global_dimension,
2149 &socket_publish_aggregated[NETDATA_IDX_TCP_CLEANUP_RBUF], 1,
2150 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2151 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2152 + ebpf_commit_label();
2153
2154 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_SENT,
2155 "Bytes sent",
@@ -2153,6 +2160,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2160 ebpf_create_global_dimension,
2161 socket_publish_aggregated, 1,
2162 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2163 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2164 + ebpf_commit_label();
2165
2166 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS,
2167 "Calls to tcp_cleanup_rbuf.",
@@ -2163,6 +2172,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2172 ebpf_create_global_dimension,
2173 &socket_publish_aggregated[NETDATA_IDX_TCP_CLEANUP_RBUF], 1,
2174 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2175 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2176 + ebpf_commit_label();
2177
2178 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS,
2179 "Calls to tcp_sendmsg.",
@@ -2173,6 +2184,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2184 ebpf_create_global_dimension,
2185 socket_publish_aggregated, 1,
2186 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2187 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2188 + ebpf_commit_label();
2189
2190 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT,
2191 "Calls to tcp_retransmit.",
@@ -2183,6 +2196,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2196 ebpf_create_global_dimension,
2197 &socket_publish_aggregated[NETDATA_IDX_TCP_RETRANSMIT], 1,
2198 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2199 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2200 + ebpf_commit_label();
2201
2202 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS,
2203 "Calls to udp_sendmsg",
@@ -2193,6 +2208,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2208 ebpf_create_global_dimension,
2209 &socket_publish_aggregated[NETDATA_IDX_UDP_SENDMSG], 1,
2210 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2211 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2212 + ebpf_commit_label();
2213
2214 ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS,
2215 "Calls to udp_recvmsg",
@@ -2203,6 +2220,8 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
2220 ebpf_create_global_dimension,
2221 &socket_publish_aggregated[NETDATA_IDX_UDP_RECVBUF], 1,
2222 update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
2223 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
2224 + ebpf_commit_label();
2225 }
2226
2227 /**
src/collectors/ebpf.plugin/ebpf_swap.c
+7 -2
@@ -695,6 +695,7 @@ static void ebpf_send_systemd_swap_charts()
695 */
696 static void ebpf_create_specific_swap_charts(char *type, int update_every)
697 {
698 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
699 ebpf_create_chart(type, NETDATA_MEM_SWAP_READ_CHART,
700 "Calls to function swap_readpage.",
701 EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_SWAP_SUBMENU,
@@ -702,6 +703,8 @@ static void ebpf_create_specific_swap_charts(char *type, int update_every)
703 NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5100,
704 ebpf_create_global_dimension,
705 swap_publish_aggregated, 1, update_every, NETDATA_EBPF_MODULE_NAME_SWAP);
706 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
707 + ebpf_commit_label();
708
709 ebpf_create_chart(type, NETDATA_MEM_SWAP_WRITE_CHART,
710 "Calls to function swap_writepage.",
@@ -711,6 +714,8 @@ static void ebpf_create_specific_swap_charts(char *type, int update_every)
714 ebpf_create_global_dimension,
715 &swap_publish_aggregated[NETDATA_KEY_SWAP_WRITEPAGE_CALL], 1,
716 update_every, NETDATA_EBPF_MODULE_NAME_SWAP);
717 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
718 + ebpf_commit_label();
719 }
720
721 /**
@@ -933,7 +938,7 @@ void ebpf_swap_create_apps_charts(struct ebpf_module *em, void *ptr)
938 20070,
939 update_every,
940 NETDATA_EBPF_MODULE_NAME_SWAP);
936 - ebpf_create_chart_labels("app_group", w->name, 1);
941 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
942 ebpf_commit_label();
943 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
944
@@ -948,7 +953,7 @@ void ebpf_swap_create_apps_charts(struct ebpf_module *em, void *ptr)
953 20071,
954 update_every,
955 NETDATA_EBPF_MODULE_NAME_SWAP);
951 - ebpf_create_chart_labels("app_group", w->name, 1);
956 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
957 ebpf_commit_label();
958 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
959
src/collectors/ebpf.plugin/ebpf_vfs.c
+40 -13
@@ -1356,17 +1356,22 @@ static void ebpf_vfs_sum_cgroup_pids(netdata_publish_vfs_t *vfs, struct pid_on_t
1356 */
1357 static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1358 {
1359 + char *label = (!strncmp(type, "cgroup_", 7)) ? &type[7] : type;
1360 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_FILE_DELETED,"Files deleted",
1361 EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP, NETDATA_CGROUP_VFS_UNLINK_CONTEXT,
1362 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5500,
1363 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_UNLINK],
1364 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1365 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1366 + ebpf_commit_label();
1367
1368 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS, "Write to disk",
1369 EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP, NETDATA_CGROUP_VFS_WRITE_CONTEXT,
1370 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5501,
1371 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_WRITE],
1372 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1373 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1374 + ebpf_commit_label();
1375
1376 if (em->mode < MODE_ENTRY) {
1377 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR, "Fails to write",
@@ -1374,6 +1379,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1379 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5502,
1380 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_WRITE],
1381 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1382 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1383 + ebpf_commit_label();
1384 }
1385
1386 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS, "Read from disk",
@@ -1381,6 +1388,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1388 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5503,
1389 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ],
1390 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1391 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1392 + ebpf_commit_label();
1393
1394 if (em->mode < MODE_ENTRY) {
1395 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR, "Fails to read",
@@ -1388,6 +1397,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1397 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5504,
1398 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ],
1399 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1400 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1401 + ebpf_commit_label();
1402 }
1403
1404 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES, "Bytes written on disk",
@@ -1395,18 +1406,24 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1406 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5505,
1407 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_WRITE],
1408 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1409 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1410 + ebpf_commit_label();
1411
1412 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_BYTES, "Bytes read from disk",
1413 EBPF_COMMON_DIMENSION_BYTES, NETDATA_VFS_GROUP, NETDATA_CGROUP_VFS_READ_BYTES_CONTEXT,
1414 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5506,
1415 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ],
1416 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1417 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1418 + ebpf_commit_label();
1419
1420 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC, "Calls to vfs_fsync.",
1421 EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP, NETDATA_CGROUP_VFS_FSYNC_CONTEXT,
1422 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5507,
1423 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_FSYNC],
1424 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1425 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1426 + ebpf_commit_label();
1427
1428 if (em->mode < MODE_ENTRY) {
1429 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR, "Sync error",
@@ -1414,6 +1431,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1431 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5508,
1432 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_FSYNC],
1433 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1434 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1435 + ebpf_commit_label();
1436 }
1437
1438 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN, "Calls to vfs_open.",
@@ -1421,6 +1440,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1440 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5509,
1441 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_OPEN],
1442 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1443 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1444 + ebpf_commit_label();
1445
1446 if (em->mode < MODE_ENTRY) {
1447 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR, "Open error",
@@ -1428,6 +1449,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1449 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5510,
1450 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_OPEN],
1451 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1452 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1453 + ebpf_commit_label();
1454 }
1455
1456 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE, "Calls to vfs_create.",
@@ -1435,6 +1458,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1458 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5511,
1459 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_CREATE],
1460 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1461 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1462 + ebpf_commit_label();
1463
1464 if (em->mode < MODE_ENTRY) {
1465 ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR, "Create error",
@@ -1442,6 +1467,8 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1467 NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5512,
1468 ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_CREATE],
1469 1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
1470 + ebpf_create_chart_labels("cgroup_name", label, RRDLABEL_SRC_AUTO);
1471 + ebpf_commit_label();
1472 }
1473 }
1474
@@ -2305,7 +2332,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2332 order++,
2333 update_every,
2334 NETDATA_EBPF_MODULE_NAME_VFS);
2308 - ebpf_create_chart_labels("app_group", w->name, 1);
2335 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2336 ebpf_commit_label();
2337 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2338
@@ -2320,7 +2347,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2347 order++,
2348 update_every,
2349 NETDATA_EBPF_MODULE_NAME_VFS);
2323 - ebpf_create_chart_labels("app_group", w->name, 1);
2350 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2351 ebpf_commit_label();
2352 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2353
@@ -2336,7 +2363,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2363 order++,
2364 update_every,
2365 NETDATA_EBPF_MODULE_NAME_VFS);
2339 - ebpf_create_chart_labels("app_group", w->name, 1);
2366 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2367 ebpf_commit_label();
2368 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2369 }
@@ -2352,7 +2379,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2379 order++,
2380 update_every,
2381 NETDATA_EBPF_MODULE_NAME_VFS);
2355 - ebpf_create_chart_labels("app_group", w->name, 1);
2382 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2383 ebpf_commit_label();
2384 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2385
@@ -2368,7 +2395,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2395 order++,
2396 update_every,
2397 NETDATA_EBPF_MODULE_NAME_VFS);
2371 - ebpf_create_chart_labels("app_group", w->name, 1);
2398 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2399 ebpf_commit_label();
2400 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2401 }
@@ -2384,7 +2411,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2411 order++,
2412 update_every,
2413 NETDATA_EBPF_MODULE_NAME_VFS);
2387 - ebpf_create_chart_labels("app_group", w->name, 1);
2414 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2415 ebpf_commit_label();
2416 fprintf(stdout, "DIMENSION writes '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2417
@@ -2399,7 +2426,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2426 order++,
2427 update_every,
2428 NETDATA_EBPF_MODULE_NAME_VFS);
2402 - ebpf_create_chart_labels("app_group", w->name, 1);
2429 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2430 ebpf_commit_label();
2431 fprintf(stdout, "DIMENSION reads '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2432
@@ -2414,7 +2441,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2441 order++,
2442 update_every,
2443 NETDATA_EBPF_MODULE_NAME_VFS);
2417 - ebpf_create_chart_labels("app_group", w->name, 1);
2444 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2445 ebpf_commit_label();
2446 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2447
@@ -2430,7 +2457,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2457 order++,
2458 update_every,
2459 NETDATA_EBPF_MODULE_NAME_VFS);
2433 - ebpf_create_chart_labels("app_group", w->name, 1);
2460 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2461 ebpf_commit_label();
2462 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2463 }
@@ -2446,7 +2473,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2473 order++,
2474 update_every,
2475 NETDATA_EBPF_MODULE_NAME_VFS);
2449 - ebpf_create_chart_labels("app_group", w->name, 1);
2476 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2477 ebpf_commit_label();
2478 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2479
@@ -2462,7 +2489,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2489 order++,
2490 update_every,
2491 NETDATA_EBPF_MODULE_NAME_VFS);
2465 - ebpf_create_chart_labels("app_group", w->name, 1);
2492 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2493 ebpf_commit_label();
2494 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2495 }
@@ -2478,7 +2505,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2505 order++,
2506 update_every,
2507 NETDATA_EBPF_MODULE_NAME_VFS);
2481 - ebpf_create_chart_labels("app_group", w->name, 1);
2508 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2509 ebpf_commit_label();
2510 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2511
@@ -2494,7 +2521,7 @@ void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
2521 order++,
2522 update_every,
2523 NETDATA_EBPF_MODULE_NAME_VFS);
2497 - ebpf_create_chart_labels("app_group", w->name, 1);
2524 + ebpf_create_chart_labels("app_group", w->name, RRDLABEL_SRC_AUTO);
2525 ebpf_commit_label();
2526 fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
2527 }