summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /collectors/ebpf.plugin
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/ebpf.plugin')
-rw-r--r--collectors/ebpf.plugin/ebpf.c163
-rw-r--r--collectors/ebpf.plugin/ebpf.h61
-rw-r--r--collectors/ebpf.plugin/ebpf_apps.c17
-rw-r--r--collectors/ebpf.plugin/ebpf_apps.h7
-rw-r--r--collectors/ebpf.plugin/ebpf_cachestat.c303
-rw-r--r--collectors/ebpf.plugin/ebpf_cgroup.c2
-rw-r--r--collectors/ebpf.plugin/ebpf_dcstat.c313
-rw-r--r--collectors/ebpf.plugin/ebpf_dcstat.h2
-rw-r--r--collectors/ebpf.plugin/ebpf_disk.c3
-rw-r--r--collectors/ebpf.plugin/ebpf_fd.c290
-rw-r--r--collectors/ebpf.plugin/ebpf_filesystem.c30
-rw-r--r--collectors/ebpf.plugin/ebpf_functions.c6
-rw-r--r--collectors/ebpf.plugin/ebpf_hardirq.c5
-rw-r--r--collectors/ebpf.plugin/ebpf_mdflush.c5
-rw-r--r--collectors/ebpf.plugin/ebpf_mount.c2
-rw-r--r--collectors/ebpf.plugin/ebpf_oomkill.c89
-rw-r--r--collectors/ebpf.plugin/ebpf_process.c369
-rw-r--r--collectors/ebpf.plugin/ebpf_shm.c312
-rw-r--r--collectors/ebpf.plugin/ebpf_socket.c824
-rw-r--r--collectors/ebpf.plugin/ebpf_socket.h4
-rw-r--r--collectors/ebpf.plugin/ebpf_softirq.c5
-rw-r--r--collectors/ebpf.plugin/ebpf_swap.c163
-rw-r--r--collectors/ebpf.plugin/ebpf_sync.c26
-rw-r--r--collectors/ebpf.plugin/ebpf_vfs.c911
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_cachestat.md33
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_dcstat.md33
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_disk.md7
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_filedescriptor.md33
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_filesystem.md17
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_hardirq.md7
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_mdflush.md7
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_mount.md11
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_oomkill.md9
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_process.md1
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_processes.md35
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_shm.md41
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_socket.md50
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_softirq.md7
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_swap.md29
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_sync.md31
-rw-r--r--collectors/ebpf.plugin/integrations/ebpf_vfs.md51
-rw-r--r--collectors/ebpf.plugin/metadata.yaml290
42 files changed, 2562 insertions, 2042 deletions
diff --git a/collectors/ebpf.plugin/ebpf.c b/collectors/ebpf.plugin/ebpf.c
index 834808fa5..a8e621643 100644
--- a/collectors/ebpf.plugin/ebpf.c
+++ b/collectors/ebpf.plugin/ebpf.c
@@ -1060,25 +1060,6 @@ collected_number get_value_from_structure(char *basis, size_t offset)
}
/**
- * Write begin command on standard output
- *
- * @param family the chart family name
- * @param name the chart name
- */
-void write_begin_chart(char *family, char *name)
-{
- printf("BEGIN %s.%s\n", family, name);
-}
-
-/**
- * Write END command on stdout.
- */
-inline void write_end_chart()
-{
- printf("END\n");
-}
-
-/**
* Write set command on standard output
*
* @param dim the dimension name
@@ -1101,7 +1082,7 @@ void write_chart_dimension(char *dim, long long value)
*/
void write_count_chart(char *name, char *family, netdata_publish_syscall_t *move, uint32_t end)
{
- write_begin_chart(family, name);
+ ebpf_write_begin_chart(family, name, "");
uint32_t i = 0;
while (move && i < end) {
@@ -1111,7 +1092,7 @@ void write_count_chart(char *name, char *family, netdata_publish_syscall_t *move
i++;
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1124,7 +1105,7 @@ void write_count_chart(char *name, char *family, netdata_publish_syscall_t *move
*/
void write_err_chart(char *name, char *family, netdata_publish_syscall_t *move, int end)
{
- write_begin_chart(family, name);
+ ebpf_write_begin_chart(family, name, "");
int i = 0;
while (move && i < end) {
@@ -1134,7 +1115,7 @@ void write_err_chart(char *name, char *family, netdata_publish_syscall_t *move,
i++;
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1149,11 +1130,11 @@ void write_err_chart(char *name, char *family, netdata_publish_syscall_t *move,
*/
void ebpf_one_dimension_write_charts(char *family, char *chart, char *dim, long long v1)
{
- write_begin_chart(family, chart);
+ ebpf_write_begin_chart(family, chart, "");
write_chart_dimension(dim, v1);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1170,19 +1151,20 @@ void ebpf_one_dimension_write_charts(char *family, char *chart, char *dim, long
*/
void write_io_chart(char *chart, char *family, char *dwrite, long long vwrite, char *dread, long long vread)
{
- write_begin_chart(family, chart);
+ ebpf_write_begin_chart(family, chart, "");
write_chart_dimension(dwrite, vwrite);
write_chart_dimension(dread, vread);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
* Write chart cmd on standard output
*
* @param type chart type
- * @param id chart id
+ * @param id chart id (the apps group name).
+ * @param suffix suffix to differentiate charts
* @param title chart title
* @param units units label
* @param family group name used to attach the chart on dashboard
@@ -1192,12 +1174,13 @@ void write_io_chart(char *chart, char *family, char *dwrite, long long vwrite, c
* @param update_every update interval used by plugin
* @param module chart module name, this is the eBPF thread.
*/
-void ebpf_write_chart_cmd(char *type, char *id, char *title, char *units, char *family,
+void ebpf_write_chart_cmd(char *type, char *id, char *suffix, char *title, char *units, char *family,
char *charttype, char *context, int order, int update_every, char *module)
{
- printf("CHART %s.%s '' '%s' '%s' '%s' '%s' '%s' %d %d '' 'ebpf.plugin' '%s'\n",
+ printf("CHART %s.%s%s '' '%s' '%s' '%s' '%s' '%s' %d %d '' 'ebpf.plugin' '%s'\n",
type,
id,
+ suffix,
title,
units,
(family)?family:"",
@@ -1213,6 +1196,7 @@ void ebpf_write_chart_cmd(char *type, char *id, char *title, char *units, char *
*
* @param type chart type
* @param id chart id
+ * @param suffix add suffix to obsolete charts.
* @param title chart title
* @param units units label
* @param family group name used to attach the chart on dashboard
@@ -1221,12 +1205,13 @@ void ebpf_write_chart_cmd(char *type, char *id, char *title, char *units, char *
* @param order chart order
* @param update_every value to overwrite the update frequency set by the server.
*/
-void ebpf_write_chart_obsolete(char *type, char *id, char *title, char *units, char *family,
+void ebpf_write_chart_obsolete(char *type, char *id, char *suffix, char *title, char *units, char *family,
char *charttype, char *context, int order, int update_every)
{
- printf("CHART %s.%s '' '%s' '%s' '%s' '%s' '%s' %d %d 'obsolete'\n",
+ printf("CHART %s.%s%s '' '%s' '%s' '%s' '%s' '%s' %d %d 'obsolete'\n",
type,
id,
+ suffix,
title,
units,
(family)?family:"",
@@ -1298,7 +1283,7 @@ void ebpf_create_chart(char *type,
int update_every,
char *module)
{
- ebpf_write_chart_cmd(type, id, title, units, family, charttype, context, order, update_every, module);
+ ebpf_write_chart_cmd(type, id, "", title, units, family, charttype, context, order, update_every, module);
if (ncd) {
ncd(move, end);
@@ -1306,33 +1291,6 @@ void ebpf_create_chart(char *type,
}
/**
- * Create charts on apps submenu
- *
- * @param id the chart id
- * @param title the value displayed on vertical axis.
- * @param units the value displayed on vertical axis.
- * @param family Submenu that the chart will be attached on dashboard.
- * @param charttype chart type
- * @param order the chart order
- * @param algorithm the algorithm used by dimension
- * @param root structure used to create the dimensions.
- * @param update_every update interval used by plugin
- * @param module chart module name, this is the eBPF thread.
- */
-void ebpf_create_charts_on_apps(char *id, char *title, char *units, char *family, char *charttype, int order,
- char *algorithm, struct ebpf_target *root, int update_every, char *module)
-{
- struct ebpf_target *w;
- ebpf_write_chart_cmd(NETDATA_APPS_FAMILY, id, title, units, family, charttype, NULL, order,
- update_every, module);
-
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed))
- fprintf(stdout, "DIMENSION %s '' %s 1 1\n", w->name, algorithm);
- }
-}
-
-/**
* Call the necessary functions to create a name.
*
* @param family family name
@@ -1345,14 +1303,14 @@ void ebpf_create_charts_on_apps(char *id, char *title, char *units, char *family
*/
void write_histogram_chart(char *family, char *name, const netdata_idx_t *hist, char **dimensions, uint32_t end)
{
- write_begin_chart(family, name);
+ ebpf_write_begin_chart(family, name, "");
uint32_t i;
for (i = 0; i < end; i++) {
write_chart_dimension(dimensions[i], (long long) hist[i]);
}
- write_end_chart();
+ ebpf_write_end_chart();
fflush(stdout);
}
@@ -1377,6 +1335,7 @@ int ebpf_statistic_create_aral_chart(char *name, ebpf_module_t *em)
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
em->memory_usage,
+ "",
"Bytes allocated for ARAL.",
"bytes",
NETDATA_EBPF_FAMILY,
@@ -1392,6 +1351,7 @@ int ebpf_statistic_create_aral_chart(char *name, ebpf_module_t *em)
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
em->memory_allocations,
+ "",
"Calls to allocate memory.",
"calls",
NETDATA_EBPF_FAMILY,
@@ -1421,6 +1381,7 @@ void ebpf_statistic_obsolete_aral_chart(ebpf_module_t *em, int prio)
{
ebpf_write_chart_obsolete(NETDATA_MONITORING_FAMILY,
em->memory_allocations,
+ "",
"Calls to allocate memory.",
"calls",
NETDATA_EBPF_FAMILY,
@@ -1431,6 +1392,7 @@ void ebpf_statistic_obsolete_aral_chart(ebpf_module_t *em, int prio)
ebpf_write_chart_obsolete(NETDATA_MONITORING_FAMILY,
em->memory_allocations,
+ "",
"Calls to allocate memory.",
"calls",
NETDATA_EBPF_FAMILY,
@@ -1455,13 +1417,13 @@ void ebpf_send_data_aral_chart(ARAL *memory, ebpf_module_t *em)
struct aral_statistics *stats = aral_statistics(memory);
- write_begin_chart(NETDATA_MONITORING_FAMILY, em->memory_usage);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, em->memory_usage, "");
write_chart_dimension(mem, (long long)stats->structures.allocated_bytes);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, em->memory_allocations);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, em->memory_allocations, "");
write_chart_dimension(aral, (long long)stats->structures.allocations);
- write_end_chart();
+ ebpf_write_end_chart();
}
/*****************************************************************
@@ -3442,7 +3404,7 @@ static char *hash_table_core[NETDATA_EBPF_LOAD_STAT_END] = {"per_core", "unique"
static inline void ebpf_send_hash_table_pid_data(char *chart, uint32_t idx)
{
int i;
- write_begin_chart(NETDATA_MONITORING_FAMILY, chart);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, chart, "");
for (i = 0; i < EBPF_MODULE_FUNCTION_IDX; i++) {
ebpf_module_t *wem = &ebpf_modules[i];
if (wem->functions.apps_routine)
@@ -3451,7 +3413,7 @@ static inline void ebpf_send_hash_table_pid_data(char *chart, uint32_t idx)
wem->hash_table_stats[idx]:
0);
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -3463,13 +3425,13 @@ static inline void ebpf_send_hash_table_pid_data(char *chart, uint32_t idx)
static inline void ebpf_send_global_hash_table_data()
{
int i;
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_HASH_TABLES_GLOBAL_ELEMENTS);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_HASH_TABLES_GLOBAL_ELEMENTS, "");
for (i = 0; i < EBPF_MODULE_FUNCTION_IDX; i++) {
ebpf_module_t *wem = &ebpf_modules[i];
write_chart_dimension((char *)wem->info.thread_name,
(wem->enabled < NETDATA_THREAD_EBPF_STOPPING) ? NETDATA_CONTROLLER_END: 0);
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -3482,7 +3444,7 @@ void ebpf_send_statistic_data()
if (!publish_internal_metrics)
return;
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_THREADS);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_THREADS, "");
int i;
for (i = 0; i < EBPF_MODULE_FUNCTION_IDX; i++) {
ebpf_module_t *wem = &ebpf_modules[i];
@@ -3491,9 +3453,9 @@ void ebpf_send_statistic_data()
write_chart_dimension((char *)wem->info.thread_name, (wem->enabled < NETDATA_THREAD_EBPF_STOPPING) ? 1 : 0);
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_LIFE_TIME);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_LIFE_TIME, "");
for (i = 0; i < EBPF_MODULE_FUNCTION_IDX ; i++) {
ebpf_module_t *wem = &ebpf_modules[i];
// Threads like VFS is slow to load and this can create an invalid number, this is the motive
@@ -3506,25 +3468,25 @@ void ebpf_send_statistic_data()
(long long) (wem->lifetime - wem->running_time):
0) ;
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_LOAD_METHOD);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_LOAD_METHOD, "");
write_chart_dimension(load_event_stat[NETDATA_EBPF_LOAD_STAT_LEGACY], (long long)plugin_statistics.legacy);
write_chart_dimension(load_event_stat[NETDATA_EBPF_LOAD_STAT_CORE], (long long)plugin_statistics.core);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_KERNEL_MEMORY);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_KERNEL_MEMORY, "");
write_chart_dimension(memlock_stat, (long long)plugin_statistics.memlock_kern);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_HASH_TABLES_LOADED);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_HASH_TABLES_LOADED, "");
write_chart_dimension(hash_table_stat, (long long)plugin_statistics.hash_tables);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_HASH_TABLES_PER_CORE);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, NETDATA_EBPF_HASH_TABLES_PER_CORE, "");
write_chart_dimension(hash_table_core[NETDATA_EBPF_THREAD_PER_CORE], (long long)plugin_statistics.hash_percpu);
write_chart_dimension(hash_table_core[NETDATA_EBPF_THREAD_UNIQUE], (long long)plugin_statistics.hash_unique);
- write_end_chart();
+ ebpf_write_end_chart();
ebpf_send_global_hash_table_data();
@@ -3536,16 +3498,16 @@ void ebpf_send_statistic_data()
if (!wem->functions.fnct_routine)
continue;
- write_begin_chart(NETDATA_MONITORING_FAMILY, (char *)wem->functions.fcnt_thread_chart_name);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, (char *)wem->functions.fcnt_thread_chart_name, "");
write_chart_dimension((char *)wem->info.thread_name, (wem->enabled < NETDATA_THREAD_EBPF_STOPPING) ? 1 : 0);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_MONITORING_FAMILY, (char *)wem->functions.fcnt_thread_lifetime_name);
+ ebpf_write_begin_chart(NETDATA_MONITORING_FAMILY, (char *)wem->functions.fcnt_thread_lifetime_name, "");
write_chart_dimension((char *)wem->info.thread_name,
(wem->lifetime && wem->enabled < NETDATA_THREAD_EBPF_STOPPING) ?
(long long) (wem->lifetime - wem->running_time):
0) ;
- write_end_chart();
+ ebpf_write_end_chart();
}
}
@@ -3586,6 +3548,7 @@ static void ebpf_create_thread_chart(char *name,
// common call for specific and all charts.
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
name,
+ "",
title,
units,
NETDATA_EBPF_FAMILY,
@@ -3625,6 +3588,7 @@ static inline void ebpf_create_statistic_load_chart(int update_every)
{
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
NETDATA_EBPF_LOAD_METHOD,
+ "",
"Load info.",
"methods",
NETDATA_EBPF_FAMILY,
@@ -3654,6 +3618,7 @@ static inline void ebpf_create_statistic_kernel_memory(int update_every)
{
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
NETDATA_EBPF_KERNEL_MEMORY,
+ "",
"Memory allocated for hash tables.",
"bytes",
NETDATA_EBPF_FAMILY,
@@ -3679,6 +3644,7 @@ static inline void ebpf_create_statistic_hash_tables(int update_every)
{
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
NETDATA_EBPF_HASH_TABLES_LOADED,
+ "",
"Number of hash tables loaded.",
"hash tables",
NETDATA_EBPF_FAMILY,
@@ -3704,6 +3670,7 @@ static inline void ebpf_create_statistic_hash_per_core(int update_every)
{
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
NETDATA_EBPF_HASH_TABLES_PER_CORE,
+ "",
"How threads are loading hash/array tables.",
"threads",
NETDATA_EBPF_FAMILY,
@@ -3733,6 +3700,7 @@ static void ebpf_create_statistic_hash_global_elements(int update_every)
{
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
NETDATA_EBPF_HASH_TABLES_GLOBAL_ELEMENTS,
+ "",
"Controllers inside global table",
"rows",
NETDATA_EBPF_FAMILY,
@@ -3764,6 +3732,7 @@ static void ebpf_create_statistic_hash_pid_table(int update_every, char *id, cha
{
ebpf_write_chart_cmd(NETDATA_MONITORING_FAMILY,
id,
+ "",
title,
"rows",
NETDATA_EBPF_FAMILY,
@@ -3834,7 +3803,7 @@ static void ebpf_create_statistic_charts(int update_every)
continue;
em->functions.order_thread_chart = j;
- snprintfz(name, 255,"%s_%s", NETDATA_EBPF_THREADS, em->info.thread_name);
+ snprintfz(name, sizeof(name) - 1, "%s_%s", NETDATA_EBPF_THREADS, em->info.thread_name);
em->functions.fcnt_thread_chart_name = strdupz(name);
ebpf_create_thread_chart(name,
"Threads running.",
@@ -3847,7 +3816,7 @@ static void ebpf_create_statistic_charts(int update_every)
#endif
em->functions.order_thread_lifetime = j;
- snprintfz(name, 255,"%s_%s", NETDATA_EBPF_LIFE_TIME, em->info.thread_name);
+ snprintfz(name, sizeof(name) - 1, "%s_%s", NETDATA_EBPF_LIFE_TIME, em->info.thread_name);
em->functions.fcnt_thread_lifetime_name = strdupz(name);
ebpf_create_thread_chart(name,
"Time remaining for thread.",
@@ -4055,11 +4024,9 @@ static void ebpf_manage_pid(pid_t pid)
*/
int main(int argc, char **argv)
{
- stderror = stderr;
-
- log_set_global_severity_for_external_plugins();
-
clocks_init();
+ nd_log_initialize_for_external_plugins("ebpf.plugin");
+
main_thread_id = gettid();
set_global_variables();
@@ -4069,16 +4036,6 @@ int main(int argc, char **argv)
if (ebpf_check_conditions())
return 2;
- // set name
- program_name = "ebpf.plugin";
-
- // disable syslog
- error_log_syslog = 0;
-
- // set errors flood protection to 100 logs per hour
- error_log_errors_per_period = 100;
- error_log_throttle_period = 3600;
-
if (ebpf_adjust_memory_limit())
return 3;
@@ -4090,7 +4047,7 @@ int main(int argc, char **argv)
ebpf_start_pthread_variables();
netdata_configured_host_prefix = getenv("NETDATA_HOST_PREFIX");
- if(verify_netdata_host_prefix() == -1) ebpf_exit(6);
+ if(verify_netdata_host_prefix(true) == -1) ebpf_exit(6);
ebpf_allocate_common_vectors();
diff --git a/collectors/ebpf.plugin/ebpf.h b/collectors/ebpf.plugin/ebpf.h
index d52ea5a4a..ad7c5a94c 100644
--- a/collectors/ebpf.plugin/ebpf.h
+++ b/collectors/ebpf.plugin/ebpf.h
@@ -238,6 +238,7 @@ void ebpf_global_labels(netdata_syscall_stat_t *is,
void ebpf_write_chart_cmd(char *type,
char *id,
+ char *suffix,
char *title,
char *units,
char *family,
@@ -265,8 +266,6 @@ void ebpf_create_chart(char *type,
int update_every,
char *module);
-void write_begin_chart(char *family, char *name);
-
void write_chart_dimension(char *dim, long long value);
void write_count_chart(char *name, char *family, netdata_publish_syscall_t *move, uint32_t end);
@@ -276,18 +275,47 @@ void write_err_chart(char *name, char *family, netdata_publish_syscall_t *move,
void write_io_chart(char *chart, char *family, char *dwrite, long long vwrite,
char *dread, long long vread);
-void ebpf_create_charts_on_apps(char *name,
- char *title,
- char *units,
- char *family,
- char *charttype,
- int order,
- char *algorithm,
- struct ebpf_target *root,
- int update_every,
- char *module);
-
-void write_end_chart();
+/**
+ * Create Chart labels
+ *
+ * @param name the label name.
+ * @param value the label value.
+ * @param origin the labeel source.
+ */
+static inline void ebpf_create_chart_labels(char *name, char *value, int source)
+{
+ fprintf(stdout, "CLABEL '%s' '%s' %d\n", name, value, source);
+}
+
+/**
+ * Commit label
+ *
+ * Write commit label to stdout
+ */
+static inline void ebpf_commit_label()
+{
+ fprintf(stdout, "CLABEL_COMMIT\n");
+}
+
+/**
+ * Write begin command on standard output
+ *
+ * @param family the chart family name
+ * @param name the chart name
+ * @param metric the chart suffix (used with apps and cgroups)
+ */
+static inline void ebpf_write_begin_chart(char *family, char *name, char *metric)
+{
+ printf("BEGIN %s.%s%s\n", family, name, metric);
+}
+
+/**
+ * Write END command on stdout.
+ */
+static inline void ebpf_write_end_chart()
+{
+ printf("END\n");
+}
int ebpf_enable_tracepoint(ebpf_tracepoint_t *tp);
int ebpf_disable_tracepoint(ebpf_tracepoint_t *tp);
@@ -298,6 +326,9 @@ void ebpf_pid_file(char *filename, size_t length);
#define EBPF_PROGRAMS_SECTION "ebpf programs"
#define EBPF_COMMON_DIMENSION_PERCENTAGE "%"
+#define EBPF_PROGRAMS_SECTION "ebpf programs"
+
+#define EBPF_COMMON_DIMENSION_PERCENTAGE "%"
#define EBPF_COMMON_DIMENSION_CALL "calls/s"
#define EBPF_COMMON_DIMENSION_CONNECTIONS "connections/s"
#define EBPF_COMMON_DIMENSION_BITS "kilobits/s"
@@ -334,7 +365,7 @@ void ebpf_cachestat_create_apps_charts(struct ebpf_module *em, void *root);
void ebpf_one_dimension_write_charts(char *family, char *chart, char *dim, long long v1);
collected_number get_value_from_structure(char *basis, size_t offset);
void ebpf_update_pid_table(ebpf_local_maps_t *pid, ebpf_module_t *em);
-void ebpf_write_chart_obsolete(char *type, char *id, char *title, char *units, char *family,
+void ebpf_write_chart_obsolete(char *type, char *id, char *suffix, char *title, char *units, char *family,
char *charttype, char *context, int order, int update_every);
void write_histogram_chart(char *family, char *name, const netdata_idx_t *hist, char **dimensions, uint32_t end);
void ebpf_update_disabled_plugin_stats(ebpf_module_t *em);
diff --git a/collectors/ebpf.plugin/ebpf_apps.c b/collectors/ebpf.plugin/ebpf_apps.c
index b1b42c8d8..10c452267 100644
--- a/collectors/ebpf.plugin/ebpf_apps.c
+++ b/collectors/ebpf.plugin/ebpf_apps.c
@@ -132,16 +132,6 @@ ebpf_socket_publish_apps_t *ebpf_socket_stat_get(void)
return target;
}
-/**
- * eBPF socket release
- *
- * @param stat Release a target after usage.
- */
-void ebpf_socket_release(ebpf_socket_publish_apps_t *stat)
-{
- aral_freez(ebpf_aral_socket_pid, stat);
-}
-
/*****************************************************************
*
* CACHESTAT ARAL FUNCTIONS
@@ -512,6 +502,13 @@ struct ebpf_target *get_apps_groups_target(struct ebpf_target **agrt, const char
// copy the id
strncpyz(w->name, nid, EBPF_MAX_NAME);
+ strncpyz(w->clean_name, w->name, EBPF_MAX_NAME);
+ netdata_fix_chart_name(w->clean_name);
+ for (char *d = w->clean_name; *d; d++) {
+ if (*d == '.')
+ *d = '_';
+ }
+
strncpyz(w->compare, nid, EBPF_MAX_COMPARE_NAME);
size_t len = strlen(w->compare);
if (w->compare[len - 1] == '*') {
diff --git a/collectors/ebpf.plugin/ebpf_apps.h b/collectors/ebpf.plugin/ebpf_apps.h
index 5ae5342dd..258091507 100644
--- a/collectors/ebpf.plugin/ebpf_apps.h
+++ b/collectors/ebpf.plugin/ebpf_apps.h
@@ -10,11 +10,13 @@
#include "libnetdata/ebpf/ebpf.h"
#define NETDATA_APPS_FAMILY "apps"
+#define NETDATA_APP_FAMILY "app"
#define NETDATA_APPS_FILE_GROUP "file_access"
+#define NETDATA_APPS_FILE_FDS "fds"
#define NETDATA_APPS_FILE_CGROUP_GROUP "file_access (eBPF)"
#define NETDATA_APPS_PROCESS_GROUP "process (eBPF)"
#define NETDATA_APPS_NET_GROUP "net"
-#define NETDATA_APPS_IPC_SHM_GROUP "ipc shm (eBPF)"
+#define NETDATA_APPS_IPC_SHM_GROUP "ipc shm"
#include "ebpf_process.h"
#include "ebpf_dcstat.h"
@@ -47,8 +49,10 @@ struct ebpf_target {
char id[EBPF_MAX_NAME + 1];
uint32_t idhash;
+ uint32_t charts_created;
char name[EBPF_MAX_NAME + 1];
+ char clean_name[EBPF_MAX_NAME + 1]; // sanitized name used in chart id (need to replace at least dots)
// Changes made to simplify integration between apps and eBPF.
netdata_publish_cachestat_t cachestat;
@@ -218,7 +222,6 @@ extern ebpf_process_stat_t *process_stat_vector;
extern ARAL *ebpf_aral_socket_pid;
void ebpf_socket_aral_init();
ebpf_socket_publish_apps_t *ebpf_socket_stat_get(void);
-void ebpf_socket_release(ebpf_socket_publish_apps_t *stat);
extern ARAL *ebpf_aral_cachestat_pid;
void ebpf_cachestat_aral_init();
diff --git a/collectors/ebpf.plugin/ebpf_cachestat.c b/collectors/ebpf.plugin/ebpf_cachestat.c
index 890600696..d9f8f7b06 100644
--- a/collectors/ebpf.plugin/ebpf_cachestat.c
+++ b/collectors/ebpf.plugin/ebpf_cachestat.c
@@ -353,6 +353,7 @@ static void ebpf_obsolete_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_CACHESTAT_HIT_RATIO_CHART,
+ "",
"Hit ratio",
EBPF_COMMON_DIMENSION_PERCENTAGE,
NETDATA_CACHESTAT_SUBMENU,
@@ -363,6 +364,7 @@ static void ebpf_obsolete_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_CACHESTAT_DIRTY_CHART,
+ "",
"Number of dirty pages",
EBPF_CACHESTAT_DIMENSION_PAGE,
NETDATA_CACHESTAT_SUBMENU,
@@ -373,6 +375,7 @@ static void ebpf_obsolete_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_CACHESTAT_HIT_CHART,
+ "",
"Number of accessed files",
EBPF_CACHESTAT_DIMENSION_HITS,
NETDATA_CACHESTAT_SUBMENU,
@@ -383,6 +386,7 @@ static void ebpf_obsolete_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_CACHESTAT_MISSES_CHART,
+ "",
"Files out of page cache",
EBPF_CACHESTAT_DIMENSION_MISSES,
NETDATA_CACHESTAT_SUBMENU,
@@ -425,6 +429,7 @@ static void ebpf_obsolete_cachestat_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_CACHESTAT_HIT_RATIO_CHART,
+ "",
"Hit ratio",
EBPF_COMMON_DIMENSION_PERCENTAGE,
NETDATA_CACHESTAT_SUBMENU,
@@ -435,6 +440,7 @@ static void ebpf_obsolete_cachestat_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_CACHESTAT_DIRTY_CHART,
+ "",
"Number of dirty pages",
EBPF_CACHESTAT_DIMENSION_PAGE,
NETDATA_CACHESTAT_SUBMENU,
@@ -445,6 +451,7 @@ static void ebpf_obsolete_cachestat_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_CACHESTAT_HIT_CHART,
+ "",
"Number of accessed files",
EBPF_CACHESTAT_DIMENSION_HITS,
NETDATA_CACHESTAT_SUBMENU,
@@ -455,6 +462,7 @@ static void ebpf_obsolete_cachestat_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_CACHESTAT_MISSES_CHART,
+ "",
"Files out of page cache",
EBPF_CACHESTAT_DIMENSION_MISSES,
NETDATA_CACHESTAT_SUBMENU,
@@ -473,44 +481,57 @@ static void ebpf_obsolete_cachestat_global(ebpf_module_t *em)
*/
void ebpf_obsolete_cachestat_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_CACHESTAT_HIT_RATIO_CHART,
- "Hit ratio",
- EBPF_COMMON_DIMENSION_PERCENTAGE,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_LINE,
- NULL,
- 20090,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_CACHESTAT_IDX))))
+ continue;
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_CACHESTAT_DIRTY_CHART,
- "Number of dirty pages",
- EBPF_CACHESTAT_DIMENSION_PAGE,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20091,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_hit_ratio",
+ "Hit ratio",
+ EBPF_COMMON_DIMENSION_PERCENTAGE,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ "app.ebpf_cachestat_hit_ratio",
+ 20260,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY, NETDATA_CACHESTAT_HIT_CHART,
- "Number of accessed files",
- EBPF_CACHESTAT_DIMENSION_HITS,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20092,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_dirty_pages",
+ "Number of dirty pages",
+ EBPF_CACHESTAT_DIMENSION_PAGE,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_cachestat_dirty_pages",
+ 20261,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_CACHESTAT_MISSES_CHART,
- "Files out of page cache",
- EBPF_CACHESTAT_DIMENSION_MISSES,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20093,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_access",
+ "Number of accessed files",
+ EBPF_CACHESTAT_DIMENSION_HITS,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_cachestat_access",
+ 20262,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_misses",
+ "Files out of page cache",
+ EBPF_CACHESTAT_DIMENSION_MISSES,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_cachestat_misses",
+ 20263,
+ update_every);
+ w->charts_created &= ~(1<<EBPF_MODULE_CACHESTAT_IDX);
+ }
}
/**
@@ -804,41 +825,74 @@ static void ebpf_update_cachestat_cgroup(int maps_per_core)
void ebpf_cachestat_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_CACHESTAT_HIT_RATIO_CHART,
- "Hit ratio",
- EBPF_COMMON_DIMENSION_PERCENTAGE,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_LINE,
- 20090,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
-
- ebpf_create_charts_on_apps(NETDATA_CACHESTAT_DIRTY_CHART,
- "Number of dirty pages",
- EBPF_CACHESTAT_DIMENSION_PAGE,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20091,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
-
- ebpf_create_charts_on_apps(NETDATA_CACHESTAT_HIT_CHART,
- "Number of accessed files",
- EBPF_CACHESTAT_DIMENSION_HITS,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20092,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
-
- ebpf_create_charts_on_apps(NETDATA_CACHESTAT_MISSES_CHART,
- "Files out of page cache",
- EBPF_CACHESTAT_DIMENSION_MISSES,
- NETDATA_CACHESTAT_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20093,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_CACHESTAT);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_hit_ratio",
+ "Hit ratio",
+ EBPF_COMMON_DIMENSION_PERCENTAGE,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ "app.ebpf_cachestat_hit_ratio",
+ 20260,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_CACHESTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION ratio '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_dirty_pages",
+ "Number of dirty pages",
+ EBPF_CACHESTAT_DIMENSION_PAGE,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ "app.ebpf_cachestat_dirty_pages",
+ 20261,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_CACHESTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION pages '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_access",
+ "Number of accessed files",
+ EBPF_CACHESTAT_DIMENSION_HITS,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_cachestat_access",
+ 20262,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_CACHESTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION hits '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_cachestat_misses",
+ "Files out of page cache",
+ EBPF_CACHESTAT_DIMENSION_MISSES,
+ NETDATA_CACHESTAT_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_cachestat_misses",
+ 20263,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_CACHESTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION misses '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+ w->charts_created |= 1<<EBPF_MODULE_CACHESTAT_IDX;
+ }
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
}
@@ -939,53 +993,42 @@ void ebpf_cache_send_apps_data(struct ebpf_target *root)
struct ebpf_target *w;
collected_number value;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_CACHESTAT_HIT_RATIO_CHART);
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- ebpf_cachestat_sum_pids(&w->cachestat, w->root_pid);
- netdata_cachestat_pid_t *current = &w->cachestat.current;
- netdata_cachestat_pid_t *prev = &w->cachestat.prev;
-
- uint64_t mpa = current->mark_page_accessed - prev->mark_page_accessed;
- uint64_t mbd = current->mark_buffer_dirty - prev->mark_buffer_dirty;
- w->cachestat.dirty = mbd;
- uint64_t apcl = current->add_to_page_cache_lru - prev->add_to_page_cache_lru;
- uint64_t apd = current->account_page_dirtied - prev->account_page_dirtied;
-
- cachestat_update_publish(&w->cachestat, mpa, mbd, apcl, apd);
- value = (collected_number) w->cachestat.ratio;
- // Here we are using different approach to have a chart more smooth
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_CACHESTAT_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_CACHESTAT_DIRTY_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = (collected_number) w->cachestat.dirty;
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ ebpf_cachestat_sum_pids(&w->cachestat, w->root_pid);
+ netdata_cachestat_pid_t *current = &w->cachestat.current;
+ netdata_cachestat_pid_t *prev = &w->cachestat.prev;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_CACHESTAT_HIT_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = (collected_number) w->cachestat.hit;
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ uint64_t mpa = current->mark_page_accessed - prev->mark_page_accessed;
+ uint64_t mbd = current->mark_buffer_dirty - prev->mark_buffer_dirty;
+ w->cachestat.dirty = mbd;
+ uint64_t apcl = current->add_to_page_cache_lru - prev->add_to_page_cache_lru;
+ uint64_t apd = current->account_page_dirtied - prev->account_page_dirtied;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_CACHESTAT_MISSES_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = (collected_number) w->cachestat.miss;
- write_chart_dimension(w->name, value);
- }
+ cachestat_update_publish(&w->cachestat, mpa, mbd, apcl, apd);
+
+ value = (collected_number) w->cachestat.ratio;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_cachestat_hit_ratio");
+ write_chart_dimension("ratio", value);
+ ebpf_write_end_chart();
+
+ value = (collected_number) w->cachestat.dirty;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_cachestat_dirty_pages");
+ write_chart_dimension("pages", value);
+ ebpf_write_end_chart();
+
+ value = (collected_number) w->cachestat.hit;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_cachestat_access");
+ write_chart_dimension("hits", value);
+ ebpf_write_end_chart();
+
+ value = (collected_number) w->cachestat.miss;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_cachestat_misses");
+ write_chart_dimension("misses", value);
+ ebpf_write_end_chart();
}
- write_end_chart();
}
/**
@@ -1087,37 +1130,37 @@ static void ebpf_send_systemd_cachestat_charts()
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_HIT_RATIO_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_HIT_RATIO_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_cachestat.ratio);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_DIRTY_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_DIRTY_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_cachestat.dirty);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_HIT_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_HIT_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_cachestat.hit);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_MISSES_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_CACHESTAT_MISSES_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_cachestat.miss);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1127,21 +1170,21 @@ static void ebpf_send_systemd_cachestat_charts()
*/
static void ebpf_send_specific_cachestat_data(char *type, netdata_publish_cachestat_t *npc)
{
- write_begin_chart(type, NETDATA_CACHESTAT_HIT_RATIO_CHART);
+ ebpf_write_begin_chart(type, NETDATA_CACHESTAT_HIT_RATIO_CHART, "");
write_chart_dimension(cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_RATIO].name, (long long)npc->ratio);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_CACHESTAT_DIRTY_CHART);
+ ebpf_write_begin_chart(type, NETDATA_CACHESTAT_DIRTY_CHART, "");
write_chart_dimension(cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_DIRTY].name, (long long)npc->dirty);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_CACHESTAT_HIT_CHART);
+ ebpf_write_begin_chart(type, NETDATA_CACHESTAT_HIT_CHART, "");
write_chart_dimension(cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_HIT].name, (long long)npc->hit);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_CACHESTAT_MISSES_CHART);
+ ebpf_write_begin_chart(type, NETDATA_CACHESTAT_MISSES_CHART, "");
write_chart_dimension(cachestat_counter_publish_aggregated[NETDATA_CACHESTAT_IDX_MISS].name, (long long)npc->miss);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1201,24 +1244,28 @@ static void ebpf_create_specific_cachestat_charts(char *type, int update_every)
static void ebpf_obsolete_specific_cachestat_charts(char *type, int update_every)
{
ebpf_write_chart_obsolete(type, NETDATA_CACHESTAT_HIT_RATIO_CHART,
+ "",
"Hit ratio",
EBPF_COMMON_DIMENSION_PERCENTAGE, NETDATA_CACHESTAT_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_CACHESTAT_HIT_RATIO_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5200, update_every);
ebpf_write_chart_obsolete(type, NETDATA_CACHESTAT_DIRTY_CHART,
+ "",
"Number of dirty pages",
EBPF_CACHESTAT_DIMENSION_PAGE, NETDATA_CACHESTAT_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_CACHESTAT_MODIFIED_CACHE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5201, update_every);
ebpf_write_chart_obsolete(type, NETDATA_CACHESTAT_HIT_CHART,
+ "",
"Number of accessed files",
EBPF_CACHESTAT_DIMENSION_HITS, NETDATA_CACHESTAT_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_CACHESTAT_HIT_FILES_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5202, update_every);
ebpf_write_chart_obsolete(type, NETDATA_CACHESTAT_MISSES_CHART,
+ "",
"Files out of page cache",
EBPF_CACHESTAT_DIMENSION_MISSES, NETDATA_CACHESTAT_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_CACHESTAT_MISS_FILES_CONTEXT,
diff --git a/collectors/ebpf.plugin/ebpf_cgroup.c b/collectors/ebpf.plugin/ebpf_cgroup.c
index b1e2c0746..1aadfbaf8 100644
--- a/collectors/ebpf.plugin/ebpf_cgroup.c
+++ b/collectors/ebpf.plugin/ebpf_cgroup.c
@@ -331,7 +331,7 @@ void ebpf_create_charts_on_systemd(char *id, char *title, char *units, char *fam
char *algorithm, char *context, char *module, int update_every)
{
ebpf_cgroup_target_t *w;
- ebpf_write_chart_cmd(NETDATA_SERVICE_FAMILY, id, title, units, family, charttype, context,
+ ebpf_write_chart_cmd(NETDATA_SERVICE_FAMILY, id, "", title, units, family, charttype, context,
order, update_every, module);
for (w = ebpf_cgroup_pids; w; w = w->next) {
diff --git a/collectors/ebpf.plugin/ebpf_dcstat.c b/collectors/ebpf.plugin/ebpf_dcstat.c
index 8c6f60133..4ff6c82ab 100644
--- a/collectors/ebpf.plugin/ebpf_dcstat.c
+++ b/collectors/ebpf.plugin/ebpf_dcstat.c
@@ -302,6 +302,7 @@ static void ebpf_obsolete_dc_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_DC_HIT_CHART,
+ "",
"Percentage of files inside directory cache",
EBPF_COMMON_DIMENSION_PERCENTAGE,
NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -312,6 +313,7 @@ static void ebpf_obsolete_dc_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_DC_REFERENCE_CHART,
+ "",
"Count file access",
EBPF_COMMON_DIMENSION_FILES,
NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -322,6 +324,7 @@ static void ebpf_obsolete_dc_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_DC_REQUEST_NOT_CACHE_CHART,
+ "",
"Files not present inside directory cache",
EBPF_COMMON_DIMENSION_FILES,
NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -332,6 +335,7 @@ static void ebpf_obsolete_dc_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_DC_REQUEST_NOT_FOUND_CHART,
+ "",
"Files not found",
EBPF_COMMON_DIMENSION_FILES,
NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -372,45 +376,58 @@ static inline void ebpf_obsolete_dc_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_obsolete_dc_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_DC_HIT_CHART,
- "Percentage of files inside directory cache",
- EBPF_COMMON_DIMENSION_PERCENTAGE,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_LINE,
- NULL,
- 20100,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_DCSTAT_IDX))))
+ continue;
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_DC_REFERENCE_CHART,
- "Count file access",
- EBPF_COMMON_DIMENSION_FILES,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20101,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_dc_hit",
+ "Percentage of files inside directory cache.",
+ EBPF_COMMON_DIMENSION_PERCENTAGE,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ "app.ebpf_dc_hit",
+ 20265,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_DC_REQUEST_NOT_CACHE_CHART,
- "Files not present inside directory cache",
- EBPF_COMMON_DIMENSION_FILES,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20102,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_dc_reference",
+ "Count file access.",
+ EBPF_COMMON_DIMENSION_FILES,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_dc_reference",
+ 20266,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_DC_REQUEST_NOT_FOUND_CHART,
- "Files not found",
- EBPF_COMMON_DIMENSION_FILES,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20103,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_not_cache",
+ "Files not present inside directory cache.",
+ EBPF_COMMON_DIMENSION_FILES,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_dc_not_cache",
+ 20267,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_not_found",
+ "Files not found.",
+ EBPF_COMMON_DIMENSION_FILES,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_dc_not_found",
+ 20268,
+ update_every);
+
+ w->charts_created &= ~(1<<EBPF_MODULE_DCSTAT_IDX);
+ }
}
/**
@@ -424,6 +441,7 @@ static void ebpf_obsolete_dc_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_DC_HIT_CHART,
+ "",
"Percentage of files inside directory cache",
EBPF_COMMON_DIMENSION_PERCENTAGE,
NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -434,6 +452,7 @@ static void ebpf_obsolete_dc_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_DC_REFERENCE_CHART,
+ "",
"Variables used to calculate hit ratio.",
EBPF_COMMON_DIMENSION_FILES,
NETDATA_DIRECTORY_CACHE_SUBMENU,
@@ -513,41 +532,74 @@ static void ebpf_dcstat_exit(void *ptr)
void ebpf_dcstat_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_DC_HIT_CHART,
- "Percentage of files inside directory cache",
- EBPF_COMMON_DIMENSION_PERCENTAGE,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_LINE,
- 20100,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
-
- ebpf_create_charts_on_apps(NETDATA_DC_REFERENCE_CHART,
- "Count file access",
- EBPF_COMMON_DIMENSION_FILES,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20101,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
-
- ebpf_create_charts_on_apps(NETDATA_DC_REQUEST_NOT_CACHE_CHART,
- "Files not present inside directory cache",
- EBPF_COMMON_DIMENSION_FILES,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20102,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
-
- ebpf_create_charts_on_apps(NETDATA_DC_REQUEST_NOT_FOUND_CHART,
- "Files not found",
- EBPF_COMMON_DIMENSION_FILES,
- NETDATA_DIRECTORY_CACHE_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20103,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_DCSTAT);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_dc_hit",
+ "Percentage of files inside directory cache.",
+ EBPF_COMMON_DIMENSION_PERCENTAGE,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ "app.ebpf_dc_hit",
+ 20265,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_DCSTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION ratio '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_dc_reference",
+ "Count file access.",
+ EBPF_COMMON_DIMENSION_FILES,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_dc_reference",
+ 20266,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_DCSTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION files '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_not_cache",
+ "Files not present inside directory cache.",
+ EBPF_COMMON_DIMENSION_FILES,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_dc_not_cache",
+ 20267,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_DCSTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION files '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_not_found",
+ "Files not found.",
+ EBPF_COMMON_DIMENSION_FILES,
+ NETDATA_DIRECTORY_CACHE_SUBMENU,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_dc_not_found",
+ 20268,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_DCSTAT);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION files '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ w->charts_created |= 1<<EBPF_MODULE_DCSTAT_IDX;
+ }
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
}
@@ -746,64 +798,53 @@ void ebpf_dcache_send_apps_data(struct ebpf_target *root)
struct ebpf_target *w;
collected_number value;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_DC_HIT_CHART);
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- ebpf_dcstat_sum_pids(&w->dcstat, w->root_pid);
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_DCSTAT_IDX))))
+ continue;
- uint64_t cache = w->dcstat.curr.cache_access;
- uint64_t not_found = w->dcstat.curr.not_found;
+ ebpf_dcstat_sum_pids(&w->dcstat, w->root_pid);
- dcstat_update_publish(&w->dcstat, cache, not_found);
- value = (collected_number) w->dcstat.ratio;
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ uint64_t cache = w->dcstat.curr.cache_access;
+ uint64_t not_found = w->dcstat.curr.not_found;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_DC_REFERENCE_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- if (w->dcstat.curr.cache_access < w->dcstat.prev.cache_access) {
- w->dcstat.prev.cache_access = 0;
- }
+ dcstat_update_publish(&w->dcstat, cache, not_found);
+
+ value = (collected_number) w->dcstat.ratio;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_dc_hit");
+ write_chart_dimension("ratio", value);
+ ebpf_write_end_chart();
- w->dcstat.cache_access = (long long)w->dcstat.curr.cache_access - (long long)w->dcstat.prev.cache_access;
- value = (collected_number) w->dcstat.cache_access;
- write_chart_dimension(w->name, value);
- w->dcstat.prev.cache_access = w->dcstat.curr.cache_access;
+ if (w->dcstat.curr.cache_access < w->dcstat.prev.cache_access) {
+ w->dcstat.prev.cache_access = 0;
}
- }
- write_end_chart();
+ w->dcstat.cache_access = (long long)w->dcstat.curr.cache_access - (long long)w->dcstat.prev.cache_access;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_DC_REQUEST_NOT_CACHE_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- if (w->dcstat.curr.file_system < w->dcstat.prev.file_system) {
- w->dcstat.prev.file_system = 0;
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_dc_reference");
+ value = (collected_number) w->dcstat.cache_access;
+ write_chart_dimension("files", value);
+ ebpf_write_end_chart();
+ w->dcstat.prev.cache_access = w->dcstat.curr.cache_access;
- value = (collected_number) (!w->dcstat.cache_access) ? 0 :
- (long long )w->dcstat.curr.file_system - (long long)w->dcstat.prev.file_system;
- write_chart_dimension(w->name, value);
- w->dcstat.prev.file_system = w->dcstat.curr.file_system;
+ if (w->dcstat.curr.file_system < w->dcstat.prev.file_system) {
+ w->dcstat.prev.file_system = 0;
}
- }
- write_end_chart();
-
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_DC_REQUEST_NOT_FOUND_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- if (w->dcstat.curr.not_found < w->dcstat.prev.not_found) {
- w->dcstat.prev.not_found = 0;
- }
- value = (collected_number) (!w->dcstat.cache_access) ? 0 :
- (long long)w->dcstat.curr.not_found - (long long)w->dcstat.prev.not_found;
- write_chart_dimension(w->name, value);
- w->dcstat.prev.not_found = w->dcstat.curr.not_found;
+ value = (collected_number) (!w->dcstat.cache_access) ? 0 :
+ (long long )w->dcstat.curr.file_system - (long long)w->dcstat.prev.file_system;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_not_cache");
+ write_chart_dimension("files", value);
+ ebpf_write_end_chart();
+ w->dcstat.prev.file_system = w->dcstat.curr.file_system;
+
+ if (w->dcstat.curr.not_found < w->dcstat.prev.not_found) {
+ w->dcstat.prev.not_found = 0;
}
+ value = (collected_number) (!w->dcstat.cache_access) ? 0 :
+ (long long)w->dcstat.curr.not_found - (long long)w->dcstat.prev.not_found;
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_not_found");
+ write_chart_dimension("files", value);
+ ebpf_write_end_chart();
+ w->dcstat.prev.not_found = w->dcstat.curr.not_found;
}
- write_end_chart();
}
/**
@@ -898,24 +939,28 @@ static void ebpf_create_specific_dc_charts(char *type, int update_every)
static void ebpf_obsolete_specific_dc_charts(char *type, int update_every)
{
ebpf_write_chart_obsolete(type, NETDATA_DC_HIT_CHART,
+ "",
"Percentage of files inside directory cache",
EBPF_COMMON_DIMENSION_PERCENTAGE, NETDATA_DIRECTORY_CACHE_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_DC_HIT_RATIO_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5700, update_every);
ebpf_write_chart_obsolete(type, NETDATA_DC_REFERENCE_CHART,
+ "",
"Count file access",
EBPF_COMMON_DIMENSION_FILES, NETDATA_DIRECTORY_CACHE_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_DC_REFERENCE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5701, update_every);
ebpf_write_chart_obsolete(type, NETDATA_DC_REQUEST_NOT_CACHE_CHART,
+ "",
"Files not present inside directory cache",
EBPF_COMMON_DIMENSION_FILES, NETDATA_DIRECTORY_CACHE_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_DC_NOT_CACHE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5702, update_every);
ebpf_write_chart_obsolete(type, NETDATA_DC_REQUEST_NOT_FOUND_CHART,
+ "",
"Files not found",
EBPF_COMMON_DIMENSION_FILES, NETDATA_DIRECTORY_CACHE_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_DC_NOT_FOUND_CONTEXT,
@@ -1029,23 +1074,23 @@ static void ebpf_send_systemd_dc_charts()
{
collected_number value;
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_HIT_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_HIT_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long) ect->publish_dc.ratio);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_REFERENCE_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_REFERENCE_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long) ect->publish_dc.cache_access);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_REQUEST_NOT_CACHE_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_REQUEST_NOT_CACHE_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
value = (collected_number) (!ect->publish_dc.cache_access) ? 0 :
@@ -1055,9 +1100,9 @@ static void ebpf_send_systemd_dc_charts()
write_chart_dimension(ect->name, (long long) value);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_REQUEST_NOT_FOUND_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_DC_REQUEST_NOT_FOUND_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
value = (collected_number) (!ect->publish_dc.cache_access) ? 0 :
@@ -1068,7 +1113,7 @@ static void ebpf_send_systemd_dc_charts()
write_chart_dimension(ect->name, (long long) value);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1080,31 +1125,31 @@ static void ebpf_send_systemd_dc_charts()
static void ebpf_send_specific_dc_data(char *type, netdata_publish_dcstat_t *pdc)
{
collected_number value;
- write_begin_chart(type, NETDATA_DC_HIT_CHART);
+ ebpf_write_begin_chart(type, NETDATA_DC_HIT_CHART, "");
write_chart_dimension(dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_RATIO].name,
(long long) pdc->ratio);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_DC_REFERENCE_CHART);
+ ebpf_write_begin_chart(type, NETDATA_DC_REFERENCE_CHART, "");
write_chart_dimension(dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_REFERENCE].name,
(long long) pdc->cache_access);
- write_end_chart();
+ ebpf_write_end_chart();
value = (collected_number) (!pdc->cache_access) ? 0 :
(long long )pdc->curr.file_system - (long long)pdc->prev.file_system;
pdc->prev.file_system = pdc->curr.file_system;
- write_begin_chart(type, NETDATA_DC_REQUEST_NOT_CACHE_CHART);
+ ebpf_write_begin_chart(type, NETDATA_DC_REQUEST_NOT_CACHE_CHART, "");
write_chart_dimension(dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_SLOW].name, (long long) value);
- write_end_chart();
+ ebpf_write_end_chart();
value = (collected_number) (!pdc->cache_access) ? 0 :
(long long)pdc->curr.not_found - (long long)pdc->prev.not_found;
pdc->prev.not_found = pdc->curr.not_found;
- write_begin_chart(type, NETDATA_DC_REQUEST_NOT_FOUND_CHART);
+ ebpf_write_begin_chart(type, NETDATA_DC_REQUEST_NOT_FOUND_CHART, "");
write_chart_dimension(dcstat_counter_publish_aggregated[NETDATA_DCSTAT_IDX_MISS].name, (long long) value);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
diff --git a/collectors/ebpf.plugin/ebpf_dcstat.h b/collectors/ebpf.plugin/ebpf_dcstat.h
index 845b65908..4d6aff12e 100644
--- a/collectors/ebpf.plugin/ebpf_dcstat.h
+++ b/collectors/ebpf.plugin/ebpf_dcstat.h
@@ -13,7 +13,7 @@
#define NETDATA_DC_REQUEST_NOT_CACHE_CHART "dc_not_cache"
#define NETDATA_DC_REQUEST_NOT_FOUND_CHART "dc_not_found"
-#define NETDATA_DIRECTORY_CACHE_SUBMENU "directory cache (eBPF)"
+#define NETDATA_DIRECTORY_CACHE_SUBMENU "directory cache"
// configuration file
#define NETDATA_DIRECTORY_DCSTAT_CONFIG_FILE "dcstat.conf"
diff --git a/collectors/ebpf.plugin/ebpf_disk.c b/collectors/ebpf.plugin/ebpf_disk.c
index 9dce8dd18..466c2e3bb 100644
--- a/collectors/ebpf.plugin/ebpf_disk.c
+++ b/collectors/ebpf.plugin/ebpf_disk.c
@@ -485,6 +485,7 @@ static void ebpf_obsolete_disk_global(ebpf_module_t *em)
if (flags & NETDATA_DISK_CHART_CREATED) {
ebpf_write_chart_obsolete(ned->histogram.name,
ned->family,
+ "",
"Disk latency",
EBPF_COMMON_DIMENSION_CALL,
ned->family,
@@ -655,7 +656,7 @@ static void read_hard_disk_tables(int table, int maps_per_core)
*/
static void ebpf_obsolete_hd_charts(netdata_ebpf_disks_t *w, int update_every)
{
- ebpf_write_chart_obsolete(w->histogram.name, w->family, w->histogram.title, EBPF_COMMON_DIMENSION_CALL,
+ ebpf_write_chart_obsolete(w->histogram.name, w->family, "", w->histogram.title, EBPF_COMMON_DIMENSION_CALL,
w->family, NETDATA_EBPF_CHART_TYPE_STACKED, "disk.latency_io",
w->histogram.order, update_every);
diff --git a/collectors/ebpf.plugin/ebpf_fd.c b/collectors/ebpf.plugin/ebpf_fd.c
index 49c19ca77..3c8f30d3e 100644
--- a/collectors/ebpf.plugin/ebpf_fd.c
+++ b/collectors/ebpf.plugin/ebpf_fd.c
@@ -386,45 +386,49 @@ static void ebpf_obsolete_fd_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_FILE_OPEN,
+ "",
"Number of open files",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_FILE_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
NETDATA_CGROUP_FD_OPEN_CONTEXT,
- 20061,
+ 20270,
em->update_every);
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR,
+ "",
"Fails to open files",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_FILE_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
NETDATA_CGROUP_FD_OPEN_ERR_CONTEXT,
- 20062,
+ 20271,
em->update_every);
}
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_FILE_CLOSED,
+ "",
"Files closed",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_FILE_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
NETDATA_CGROUP_FD_CLOSE_CONTEXT,
- 20063,
+ 20272,
em->update_every);
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR,
+ "",
"Fails to close files",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_FILE_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
NETDATA_CGROUP_FD_CLOSE_ERR_CONTEXT,
- 20064,
+ 20273,
em->update_every);
}
}
@@ -460,48 +464,60 @@ static inline void ebpf_obsolete_fd_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_obsolete_fd_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_FILE_OPEN,
- "Number of open files",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20061,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_FD_IDX))))
+ continue;
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR,
- "Fails to open files",
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_file_open",
+ "Number of open files",
EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
+ NETDATA_APPS_FILE_FDS,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20062,
- em->update_every);
- }
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_FILE_CLOSED,
- "Files closed",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20063,
- em->update_every);
+ "app.ebpf_file_open",
+ 20220,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_file_open_error",
+ "Fails to open files.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_FILE_FDS,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_file_open_error",
+ 20221,
+ update_every);
+ }
- if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR,
- "Fails to close files",
+ w->clean_name,
+ "_ebpf_file_closed",
+ "Files closed.",
EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
+ NETDATA_APPS_FILE_FDS,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20064,
- em->update_every);
+ "app.ebpf_file_closed",
+ 20222,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
+ w->clean_name,
+ "_ebpf_file_close_error",
+ "Fails to close files.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_FILE_FDS,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_fd_close_error",
+ 20223,
+ update_every);
+ }
+ w->charts_created &= ~(1<<EBPF_MODULE_FD_IDX);
}
}
@@ -516,6 +532,7 @@ static void ebpf_obsolete_fd_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_FILE_OPEN_CLOSE_COUNT,
+ "",
"Open and close calls",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_FILE_GROUP,
@@ -527,6 +544,7 @@ static void ebpf_obsolete_fd_global(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_FILE_OPEN_ERR_COUNT,
+ "",
"Open fails",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_FILE_GROUP,
@@ -802,45 +820,30 @@ void ebpf_fd_send_apps_data(ebpf_module_t *em, struct ebpf_target *root)
{
struct ebpf_target *w;
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- ebpf_fd_sum_pids(&w->fd, w->root_pid);
- }
- }
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_FD_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_FILE_OPEN);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->fd.open_call);
- }
- }
- write_end_chart();
+ ebpf_fd_sum_pids(&w->fd, w->root_pid);
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->fd.open_err);
- }
- }
- write_end_chart();
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_file_open");
+ write_chart_dimension("calls", w->fd.open_call);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_FILE_CLOSED);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->fd.close_call);
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_file_open_error");
+ write_chart_dimension("calls", w->fd.open_err);
+ ebpf_write_end_chart();
}
- }
- write_end_chart();
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->fd.close_err);
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_file_closed");
+ write_chart_dimension("calls", w->fd.close_call);
+ ebpf_write_end_chart();
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_file_close_error");
+ write_chart_dimension("calls", w->fd.close_err);
+ ebpf_write_end_chart();
}
- write_end_chart();
}
}
@@ -933,25 +936,25 @@ static void ebpf_create_specific_fd_charts(char *type, ebpf_module_t *em)
*/
static void ebpf_obsolete_specific_fd_charts(char *type, ebpf_module_t *em)
{
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_OPEN, "Number of open files",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_OPEN, "", "Number of open files",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_FILE_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_FD_OPEN_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5400, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR, "Fails to open files",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR, "", "Fails to open files",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_FILE_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_FD_OPEN_ERR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5401, em->update_every);
}
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_CLOSED, "Files closed",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_CLOSED, "", "Files closed",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_FILE_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_FD_CLOSE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5402, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR, "Fails to close files",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR, "", "Fails to close files",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_FILE_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_FD_CLOSE_ERR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5403, em->update_every);
@@ -968,24 +971,24 @@ static void ebpf_obsolete_specific_fd_charts(char *type, ebpf_module_t *em)
*/
static void ebpf_send_specific_fd_data(char *type, netdata_fd_stat_t *values, ebpf_module_t *em)
{
- write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_OPEN);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_OPEN, "");
write_chart_dimension(fd_publish_aggregated[NETDATA_FD_SYSCALL_OPEN].name, (long long)values->open_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR, "");
write_chart_dimension(fd_publish_aggregated[NETDATA_FD_SYSCALL_OPEN].name, (long long)values->open_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_CLOSED);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_CLOSED, "");
write_chart_dimension(fd_publish_aggregated[NETDATA_FD_SYSCALL_CLOSE].name, (long long)values->close_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR, "");
write_chart_dimension(fd_publish_aggregated[NETDATA_FD_SYSCALL_CLOSE].name, (long long)values->close_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
}
@@ -1037,40 +1040,40 @@ static void ebpf_create_systemd_fd_charts(ebpf_module_t *em)
static void ebpf_send_systemd_fd_charts(ebpf_module_t *em)
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_OPEN);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_OPEN, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_fd.open_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_fd.open_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_CLOSED);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_CLOSED, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_fd.close_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_fd.close_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
}
@@ -1197,44 +1200,77 @@ static void fd_collector(ebpf_module_t *em)
void ebpf_fd_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_FILE_OPEN,
- "Number of open files",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20061,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_FD);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_FILE_OPEN_ERROR,
- "Fails to open files",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20062,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_FD);
- }
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_file_open",
+ "Number of open files",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_FILE_FDS,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_file_open",
+ 20220,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_FD);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_file_open_error",
+ "Fails to open files.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_FILE_FDS,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_file_open_error",
+ 20221,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_FD);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_FILE_CLOSED,
- "Files closed",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20063,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_FD);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_file_closed",
+ "Files closed.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_FILE_FDS,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_file_closed",
+ 20222,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_FD);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_file_close_error",
+ "Fails to close files.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_FILE_FDS,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_file_close_error",
+ 20223,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_FD);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_FILE_CLOSE_ERROR,
- "Fails to close files",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_FILE_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20064,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_FD);
+ w->charts_created |= 1<<EBPF_MODULE_FD_IDX;
}
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
diff --git a/collectors/ebpf.plugin/ebpf_filesystem.c b/collectors/ebpf.plugin/ebpf_filesystem.c
index 6203edd9a..b78e65532 100644
--- a/collectors/ebpf.plugin/ebpf_filesystem.c
+++ b/collectors/ebpf.plugin/ebpf_filesystem.c
@@ -351,20 +351,22 @@ static void ebpf_obsolete_fs_charts(int update_every)
flags &= ~NETDATA_FILESYSTEM_FLAG_CHART_CREATED;
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY, efp->hread.name,
+ "",
efp->hread.title,
EBPF_COMMON_DIMENSION_CALL, efp->family_name,
NULL, NETDATA_EBPF_CHART_TYPE_STACKED, efp->hread.order, update_every);
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY, efp->hwrite.name,
+ "",
efp->hwrite.title,
EBPF_COMMON_DIMENSION_CALL, efp->family_name,
NULL, NETDATA_EBPF_CHART_TYPE_STACKED, efp->hwrite.order, update_every);
- ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY, efp->hopen.name, efp->hopen.title,
+ ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY, efp->hopen.name, "", efp->hopen.title,
EBPF_COMMON_DIMENSION_CALL, efp->family_name,
NULL, NETDATA_EBPF_CHART_TYPE_STACKED, efp->hopen.order, update_every);
- ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY, efp->hadditional.name, efp->hadditional.title,
+ ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY, efp->hadditional.name,"", efp->hadditional.title,
EBPF_COMMON_DIMENSION_CALL, efp->family_name,
NULL, NETDATA_EBPF_CHART_TYPE_STACKED, efp->hadditional.order,
update_every);
@@ -390,9 +392,9 @@ static void ebpf_create_fs_charts(int update_every)
ebpf_filesystem_partitions_t *efp = &localfs[i];
uint32_t flags = efp->flags;
if (flags & NETDATA_FILESYSTEM_FLAG_HAS_PARTITION && !(flags & test)) {
- snprintfz(title, 255, "%s latency for each read request.", efp->filesystem);
- snprintfz(family, 63, "%s_latency", efp->family);
- snprintfz(chart_name, 63, "%s_read_latency", efp->filesystem);
+ snprintfz(title, sizeof(title) - 1, "%s latency for each read request.", efp->filesystem);
+ snprintfz(family, sizeof(family) - 1, "%s_latency", efp->family);
+ snprintfz(chart_name, sizeof(chart_name) - 1, "%s_read_latency", efp->filesystem);
efp->hread.name = strdupz(chart_name);
efp->hread.title = strdupz(title);
efp->hread.ctx = NULL;
@@ -408,8 +410,8 @@ static void ebpf_create_fs_charts(int update_every)
update_every, NETDATA_EBPF_MODULE_NAME_FILESYSTEM);
order++;
- snprintfz(title, 255, "%s latency for each write request.", efp->filesystem);
- snprintfz(chart_name, 63, "%s_write_latency", efp->filesystem);
+ snprintfz(title, sizeof(title) - 1, "%s latency for each write request.", efp->filesystem);
+ snprintfz(chart_name, sizeof(chart_name) - 1, "%s_write_latency", efp->filesystem);
efp->hwrite.name = strdupz(chart_name);
efp->hwrite.title = strdupz(title);
efp->hwrite.ctx = NULL;
@@ -423,8 +425,8 @@ static void ebpf_create_fs_charts(int update_every)
update_every, NETDATA_EBPF_MODULE_NAME_FILESYSTEM);
order++;
- snprintfz(title, 255, "%s latency for each open request.", efp->filesystem);
- snprintfz(chart_name, 63, "%s_open_latency", efp->filesystem);
+ snprintfz(title, sizeof(title) - 1, "%s latency for each open request.", efp->filesystem);
+ snprintfz(chart_name, sizeof(chart_name) - 1, "%s_open_latency", efp->filesystem);
efp->hopen.name = strdupz(chart_name);
efp->hopen.title = strdupz(title);
efp->hopen.ctx = NULL;
@@ -439,9 +441,9 @@ static void ebpf_create_fs_charts(int update_every)
order++;
char *type = (efp->flags & NETDATA_FILESYSTEM_ATTR_CHARTS) ? "attribute" : "sync";
- snprintfz(title, 255, "%s latency for each %s request.", efp->filesystem, type);
- snprintfz(chart_name, 63, "%s_%s_latency", efp->filesystem, type);
- snprintfz(ctx, 63, "filesystem.%s_latency", type);
+ snprintfz(title, sizeof(title) - 1, "%s latency for each %s request.", efp->filesystem, type);
+ snprintfz(chart_name, sizeof(chart_name) - 1, "%s_%s_latency", efp->filesystem, type);
+ snprintfz(ctx, sizeof(ctx) - 1, "filesystem.%s_latency", type);
efp->hadditional.name = strdupz(chart_name);
efp->hadditional.title = strdupz(title);
efp->hadditional.ctx = strdupz(ctx);
@@ -671,6 +673,7 @@ static void ebpf_obsolete_filesystem_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
efp->hread.name,
+ "",
efp->hread.title,
EBPF_COMMON_DIMENSION_CALL,
efp->family_name,
@@ -681,6 +684,7 @@ static void ebpf_obsolete_filesystem_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
efp->hwrite.name,
+ "",
efp->hwrite.title,
EBPF_COMMON_DIMENSION_CALL,
efp->family_name,
@@ -691,6 +695,7 @@ static void ebpf_obsolete_filesystem_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
efp->hopen.name,
+ "",
efp->hopen.title,
EBPF_COMMON_DIMENSION_CALL,
efp->family_name,
@@ -701,6 +706,7 @@ static void ebpf_obsolete_filesystem_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
efp->hadditional.name,
+ "",
efp->hadditional.title,
EBPF_COMMON_DIMENSION_CALL,
efp->family_name,
diff --git a/collectors/ebpf.plugin/ebpf_functions.c b/collectors/ebpf.plugin/ebpf_functions.c
index ebee66395..6a481ad64 100644
--- a/collectors/ebpf.plugin/ebpf_functions.c
+++ b/collectors/ebpf.plugin/ebpf_functions.c
@@ -160,7 +160,7 @@ static void ebpf_function_thread_manipulation(const char *transaction,
lem = ebpf_functions_select_module(thread_name);
if (!lem) {
- snprintfz(message, 511, "%s%s", EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND, name);
+ snprintfz(message, sizeof(message) - 1, "%s%s", EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND, name);
ebpf_function_error(transaction, HTTP_RESP_NOT_FOUND, message);
return;
}
@@ -189,7 +189,7 @@ static void ebpf_function_thread_manipulation(const char *transaction,
const char *name = &keyword[sizeof(EBPF_THREADS_DISABLE_CATEGORY) - 1];
lem = ebpf_functions_select_module(name);
if (!lem) {
- snprintfz(message, 511, "%s%s", EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND, name);
+ snprintfz(message, sizeof(message) - 1, "%s%s", EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND, name);
ebpf_function_error(transaction, HTTP_RESP_NOT_FOUND, message);
return;
}
@@ -205,7 +205,7 @@ static void ebpf_function_thread_manipulation(const char *transaction,
const char *name = &keyword[sizeof(EBPF_THREADS_SELECT_THREAD) - 1];
lem = ebpf_functions_select_module(name);
if (!lem) {
- snprintfz(message, 511, "%s%s", EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND, name);
+ snprintfz(message, sizeof(message) - 1, "%s%s", EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND, name);
ebpf_function_error(transaction, HTTP_RESP_NOT_FOUND, message);
return;
}
diff --git a/collectors/ebpf.plugin/ebpf_hardirq.c b/collectors/ebpf.plugin/ebpf_hardirq.c
index 707d92577..465ee6434 100644
--- a/collectors/ebpf.plugin/ebpf_hardirq.c
+++ b/collectors/ebpf.plugin/ebpf_hardirq.c
@@ -226,6 +226,7 @@ static void ebpf_obsolete_hardirq_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
"hardirq_latency",
+ "",
"Hardware IRQ latency",
EBPF_COMMON_DIMENSION_MILLISECONDS,
"interrupts",
@@ -593,10 +594,10 @@ static void hardirq_collector(ebpf_module_t *em)
pthread_mutex_lock(&lock);
// write dims now for all hitherto discovered IRQs.
- write_begin_chart(NETDATA_EBPF_SYSTEM_GROUP, "hardirq_latency");
+ ebpf_write_begin_chart(NETDATA_EBPF_SYSTEM_GROUP, "hardirq_latency", "");
avl_traverse_lock(&hardirq_pub, hardirq_write_dims, NULL);
hardirq_write_static_dims();
- write_end_chart();
+ ebpf_write_end_chart();
pthread_mutex_unlock(&lock);
diff --git a/collectors/ebpf.plugin/ebpf_mdflush.c b/collectors/ebpf.plugin/ebpf_mdflush.c
index c0adf2ea4..fe33ff6a4 100644
--- a/collectors/ebpf.plugin/ebpf_mdflush.c
+++ b/collectors/ebpf.plugin/ebpf_mdflush.c
@@ -140,6 +140,7 @@ static void ebpf_obsolete_mdflush_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete("mdstat",
"mdstat_flush",
+ "",
"MD flushes",
"flushes",
"flush (eBPF)",
@@ -355,9 +356,9 @@ static void mdflush_collector(ebpf_module_t *em)
mdflush_read_count_map(maps_per_core);
pthread_mutex_lock(&lock);
// write dims now for all hitherto discovered devices.
- write_begin_chart("mdstat", "mdstat_flush");
+ ebpf_write_begin_chart("mdstat", "mdstat_flush", "");
avl_traverse_lock(&mdflush_pub, mdflush_write_dims, NULL);
- write_end_chart();
+ ebpf_write_end_chart();
pthread_mutex_unlock(&lock);
diff --git a/collectors/ebpf.plugin/ebpf_mount.c b/collectors/ebpf.plugin/ebpf_mount.c
index 473036bd7..05c76540a 100644
--- a/collectors/ebpf.plugin/ebpf_mount.c
+++ b/collectors/ebpf.plugin/ebpf_mount.c
@@ -233,6 +233,7 @@ static void ebpf_obsolete_mount_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_MOUNT_GLOBAL_FAMILY,
NETDATA_EBPF_MOUNT_CALLS,
+ "",
"Calls to mount and umount syscalls",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_MOUNT_FAMILY,
@@ -243,6 +244,7 @@ static void ebpf_obsolete_mount_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_MOUNT_GLOBAL_FAMILY,
NETDATA_EBPF_MOUNT_ERRORS,
+ "",
"Errors to mount and umount file systems",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_MOUNT_FAMILY,
diff --git a/collectors/ebpf.plugin/ebpf_oomkill.c b/collectors/ebpf.plugin/ebpf_oomkill.c
index 16ce0bddf..2c34650c3 100644
--- a/collectors/ebpf.plugin/ebpf_oomkill.c
+++ b/collectors/ebpf.plugin/ebpf_oomkill.c
@@ -57,6 +57,7 @@ static void ebpf_obsolete_oomkill_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_OOMKILL_CHART,
+ "",
"OOM kills. This chart is provided by eBPF plugin.",
EBPF_COMMON_DIMENSION_KILLS,
NETDATA_EBPF_MEMORY_GROUP,
@@ -98,15 +99,25 @@ static inline void ebpf_obsolete_oomkill_cgroup_charts(ebpf_module_t *em)
*/
static void ebpf_obsolete_oomkill_apps(ebpf_module_t *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_OOMKILL_CHART,
- "OOM kills",
- EBPF_COMMON_DIMENSION_KILLS,
- "mem",
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20020,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_OOMKILL_IDX))))
+ continue;
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_app_oomkill",
+ "OOM kills.",
+ EBPF_COMMON_DIMENSION_KILLS,
+ NETDATA_EBPF_MEMORY_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "ebpf.app_oomkill",
+ 20020,
+ update_every);
+
+ w->charts_created &= ~(1<<EBPF_MODULE_OOMKILL_IDX);
+ }
}
/**
@@ -150,8 +161,11 @@ static void oomkill_write_data(int32_t *keys, uint32_t total)
// for each app, see if it was OOM killed. record as 1 if so otherwise 0.
struct ebpf_target *w;
for (w = apps_groups_root_target; w != NULL; w = w->next) {
- if (likely(w->exposed && w->processes)) {
- bool was_oomkilled = false;
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_OOMKILL_IDX))))
+ continue;
+
+ bool was_oomkilled = false;
+ if (total) {
struct ebpf_pid_on_target *pids = w->root_pid;
while (pids) {
uint32_t j;
@@ -165,10 +179,11 @@ static void oomkill_write_data(int32_t *keys, uint32_t total)
}
pids = pids->next;
}
-
- write_dim:;
- write_chart_dimension(w->name, was_oomkilled);
}
+write_dim:
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_oomkill");
+ write_chart_dimension(EBPF_COMMON_DIMENSION_KILLS, was_oomkilled);
+ ebpf_write_end_chart();
}
// for any remaining keys for which we couldn't find a group, this could be
@@ -231,14 +246,14 @@ static void ebpf_create_systemd_oomkill_charts(int update_every)
static void ebpf_send_systemd_oomkill_charts()
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_OOMKILL_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_OOMKILL_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long) ect->oomkill);
ect->oomkill = 0;
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/*
@@ -251,9 +266,9 @@ static void ebpf_send_systemd_oomkill_charts()
*/
static void ebpf_send_specific_oomkill_data(char *type, int value)
{
- write_begin_chart(type, NETDATA_OOMKILL_CHART);
+ ebpf_write_begin_chart(type, NETDATA_OOMKILL_CHART, "");
write_chart_dimension(oomkill_publish_aggregated.name, (long long)value);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -266,7 +281,7 @@ static void ebpf_send_specific_oomkill_data(char *type, int value)
*/
static void ebpf_obsolete_specific_oomkill_charts(char *type, int update_every)
{
- ebpf_write_chart_obsolete(type, NETDATA_OOMKILL_CHART, "OOM kills. This chart is provided by eBPF plugin.",
+ ebpf_write_chart_obsolete(type, NETDATA_OOMKILL_CHART, "", "OOM kills. This chart is provided by eBPF plugin.",
EBPF_COMMON_DIMENSION_KILLS, NETDATA_EBPF_MEMORY_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_OOMKILLS_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5600, update_every);
@@ -430,7 +445,6 @@ static void oomkill_collector(ebpf_module_t *em)
uint32_t count = oomkill_read_data(keys);
if (!count) {
running_time = ebpf_update_oomkill_period(running_time, em);
- continue;
}
stats[NETDATA_CONTROLLER_PID_TABLE_ADD] += (uint64_t) count;
@@ -438,16 +452,14 @@ static void oomkill_collector(ebpf_module_t *em)
pthread_mutex_lock(&collect_data_mutex);
pthread_mutex_lock(&lock);
- if (cgroups) {
+ if (cgroups && count) {
ebpf_update_oomkill_cgroup(keys, count);
// write everything from the ebpf map.
ebpf_oomkill_send_cgroup_data(update_every);
}
if (em->apps_charts & NETDATA_EBPF_APPS_FLAG_CHART_CREATED) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_OOMKILL_CHART);
oomkill_write_data(keys, count);
- write_end_chart();
}
pthread_mutex_unlock(&lock);
pthread_mutex_unlock(&collect_data_mutex);
@@ -466,14 +478,29 @@ static void oomkill_collector(ebpf_module_t *em)
void ebpf_oomkill_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_OOMKILL_CHART,
- "OOM kills",
- EBPF_COMMON_DIMENSION_KILLS,
- "mem",
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20020,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_OOMKILL);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_oomkill",
+ "OOM kills.",
+ EBPF_COMMON_DIMENSION_KILLS,
+ NETDATA_EBPF_MEMORY_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_oomkill",
+ 20072,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_OOMKILL);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION kills '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ w->charts_created |= 1<<EBPF_MODULE_OOMKILL_IDX;
+ }
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
}
diff --git a/collectors/ebpf.plugin/ebpf_process.c b/collectors/ebpf.plugin/ebpf_process.c
index 577044e59..e3e2b884e 100644
--- a/collectors/ebpf.plugin/ebpf_process.c
+++ b/collectors/ebpf.plugin/ebpf_process.c
@@ -116,12 +116,12 @@ static void ebpf_update_global_publish(netdata_publish_syscall_t *publish, netda
*/
static void write_status_chart(char *family, netdata_publish_vfs_common_t *pvc)
{
- write_begin_chart(family, NETDATA_PROCESS_STATUS_NAME);
+ ebpf_write_begin_chart(family, NETDATA_PROCESS_STATUS_NAME, "");
write_chart_dimension(status[0], (long long)pvc->running);
write_chart_dimension(status[1], (long long)pvc->zombie);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -201,56 +201,43 @@ void ebpf_process_remove_pids()
void ebpf_process_send_apps_data(struct ebpf_target *root, ebpf_module_t *em)
{
struct ebpf_target *w;
- collected_number value;
+ // This algorithm is improved in https://github.com/netdata/netdata/pull/16030
+ collected_number values[5];
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_TASK_PROCESS);
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t, create_process));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
-
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_TASK_THREAD);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t, create_thread));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_PROCESS_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_TASK_EXIT);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t,
+ values[0] = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t, create_process));
+ values[1] = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t, create_thread));
+ values[2] = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t,
exit_call));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
-
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_TASK_CLOSE);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t,
+ values[3] = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t,
release_call));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ values[4] = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t,
+ task_err));
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_TASK_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_process_sum_values_for_pids(w->root_pid, offsetof(ebpf_process_stat_t,
- task_err));
- write_chart_dimension(w->name, value);
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_process_start");
+ write_chart_dimension("calls", values[0]);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_thread_start");
+ write_chart_dimension("calls", values[1]);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_task_exit");
+ write_chart_dimension("calls", values[2]);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_task_released");
+ write_chart_dimension("calls", values[3]);
+ ebpf_write_end_chart();
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_task_error");
+ write_chart_dimension("calls", values[4]);
+ ebpf_write_end_chart();
}
- write_end_chart();
}
ebpf_process_remove_pids();
@@ -433,52 +420,89 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
void ebpf_process_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_TASK_PROCESS,
- "Process started",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20065,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_TASK_THREAD,
- "Threads started",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20066,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_TASK_EXIT,
- "Tasks starts exit process.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20067,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_TASK_CLOSE,
- "Tasks closed",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20068,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_TASK_ERROR,
- "Errors to create process or threads.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20069,
- ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX],
- root,
- em->update_every, NETDATA_EBPF_MODULE_NAME_PROCESS);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_process_start",
+ "Process started.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_process_start",
+ 20161,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_PROCESS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_thread_start",
+ "Threads started.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_thread_start",
+ 20162,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_PROCESS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_task_exit",
+ "Tasks starts exit process.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_task_exit",
+ 20163,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_PROCESS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_task_released",
+ "Tasks released.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_task_released",
+ 20164,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_PROCESS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_task_error",
+ "Errors to create process or threads.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_task_error",
+ 20165,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_PROCESS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_ABSOLUTE_IDX]);
+ }
+ w->charts_created |= 1<<EBPF_MODULE_PROCESS_IDX;
}
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
@@ -503,6 +527,7 @@ static void ebpf_obsolete_process_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_TASK_PROCESS,
+ "",
"Process started",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_PROCESS_GROUP,
@@ -513,6 +538,7 @@ static void ebpf_obsolete_process_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_TASK_THREAD,
+ "",
"Threads started",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_PROCESS_GROUP,
@@ -523,6 +549,7 @@ static void ebpf_obsolete_process_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_TASK_CLOSE,
+ "",
"Tasks starts exit process.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_PROCESS_GROUP,
@@ -533,6 +560,7 @@ static void ebpf_obsolete_process_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_TASK_EXIT,
+ "",
"Tasks closed",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_PROCESS_GROUP,
@@ -544,6 +572,7 @@ static void ebpf_obsolete_process_services(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_TASK_ERROR,
+ "",
"Errors to create process or threads.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_PROCESS_GROUP,
@@ -585,56 +614,70 @@ static inline void ebpf_obsolete_process_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_obsolete_process_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_TASK_PROCESS,
- "Process started",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20065,
- em->update_every);
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_TASK_THREAD,
- "Threads started",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20066,
- em->update_every);
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_TASK_EXIT,
- "Tasks starts exit process.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20067,
- em->update_every);
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_TASK_CLOSE,
- "Tasks closed",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_PROCESS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20068,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_PROCESS_IDX))))
+ continue;
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_TASK_ERROR,
- "Errors to create process or threads.",
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_process_start",
+ "Process started.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_PROCESS_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20069,
- em->update_every);
+ "app.ebpf_process_start",
+ 20161,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_thread_start",
+ "Threads started.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_thread_start",
+ 20162,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_task_exit",
+ "Tasks starts exit process.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_task_exit",
+ 20163,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_task_released",
+ "Tasks released.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_task_released",
+ 20164,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_task_error",
+ "Errors to create process or threads.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_PROCESS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_task_error",
+ 20165,
+ update_every);
+ }
+
+ w->charts_created &= ~(1<<EBPF_MODULE_PROCESS_IDX);
}
}
@@ -649,6 +692,7 @@ static void ebpf_obsolete_process_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
NETDATA_PROCESS_SYSCALL,
+ "",
"Start process",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_PROCESS_GROUP,
@@ -659,6 +703,7 @@ static void ebpf_obsolete_process_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
NETDATA_EXIT_SYSCALL,
+ "",
"Exit process",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_PROCESS_GROUP,
@@ -669,6 +714,7 @@ static void ebpf_obsolete_process_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
NETDATA_PROCESS_STATUS_NAME,
+ "",
"Process not closed",
EBPF_COMMON_DIMENSION_DIFFERENCE,
NETDATA_PROCESS_GROUP,
@@ -680,6 +726,7 @@ static void ebpf_obsolete_process_global(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
NETDATA_PROCESS_ERROR_NAME,
+ "",
"Fails to create process",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_PROCESS_GROUP,
@@ -819,31 +866,31 @@ static void ebpf_process_sum_cgroup_pids(ebpf_process_stat_t *ps, struct pid_on_
*/
static void ebpf_send_specific_process_data(char *type, ebpf_process_stat_t *values, ebpf_module_t *em)
{
- write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_PROCESS);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_PROCESS, "");
write_chart_dimension(process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_FORK].name,
(long long) values->create_process);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_THREAD);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_THREAD, "");
write_chart_dimension(process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_CLONE].name,
(long long) values->create_thread);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_EXIT);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_EXIT, "");
write_chart_dimension(process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_EXIT].name,
(long long) values->release_call);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_CLOSE);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_CLOSE, "");
write_chart_dimension(process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_RELEASE_TASK].name,
(long long) values->release_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_TASK_ERROR, "");
write_chart_dimension(process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_EXIT].name,
(long long) values->task_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
}
@@ -909,28 +956,28 @@ static void ebpf_create_specific_process_charts(char *type, ebpf_module_t *em)
*/
static void ebpf_obsolete_specific_process_charts(char *type, ebpf_module_t *em)
{
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_PROCESS, "Process started",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_PROCESS, "", "Process started",
EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CGROUP_PROCESS_CREATE_CONTEXT, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5000,
em->update_every);
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_THREAD, "Threads started",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_THREAD, "", "Threads started",
EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CGROUP_THREAD_CREATE_CONTEXT, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5001,
em->update_every);
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_EXIT,"Tasks starts exit process.",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_EXIT, "","Tasks starts exit process.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CGROUP_PROCESS_EXIT_CONTEXT, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5002,
em->update_every);
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_CLOSE,"Tasks closed",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_CLOSE, "","Tasks closed",
EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CGROUP_PROCESS_CLOSE_CONTEXT, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5003,
em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_ERROR,"Errors to create process or threads.",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_TASK_ERROR, "","Errors to create process or threads.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_PROCESS_GROUP, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CGROUP_PROCESS_ERROR_CONTEXT, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5004,
em->update_every);
@@ -989,46 +1036,46 @@ static void ebpf_create_systemd_process_charts(ebpf_module_t *em)
static void ebpf_send_systemd_process_charts(ebpf_module_t *em)
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_PROCESS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_PROCESS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_ps.create_process);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_THREAD);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_THREAD, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_ps.create_thread);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_EXIT);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_EXIT, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_ps.exit_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_CLOSE);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_CLOSE, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_ps.release_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_TASK_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_ps.task_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
}
diff --git a/collectors/ebpf.plugin/ebpf_shm.c b/collectors/ebpf.plugin/ebpf_shm.c
index c171762b6..f14eb67d0 100644
--- a/collectors/ebpf.plugin/ebpf_shm.c
+++ b/collectors/ebpf.plugin/ebpf_shm.c
@@ -305,7 +305,8 @@ static void ebpf_obsolete_shm_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SHMGET_CHART,
- "Calls to syscall <code>shmget(2)</code>.",
+ "",
+ "Calls to syscall shmget(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -315,7 +316,8 @@ static void ebpf_obsolete_shm_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SHMAT_CHART,
- "Calls to syscall <code>shmat(2)</code>.",
+ "",
+ "Calls to syscall shmat(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -325,7 +327,8 @@ static void ebpf_obsolete_shm_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SHMDT_CHART,
- "Calls to syscall <code>shmdt(2)</code>.",
+ "",
+ "Calls to syscall shmdt(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -335,7 +338,8 @@ static void ebpf_obsolete_shm_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SHMCTL_CHART,
- "Calls to syscall <code>shmctl(2)</code>.",
+ "",
+ "Calls to syscall shmctl(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -375,45 +379,58 @@ static inline void ebpf_obsolete_shm_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_obsolete_shm_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SHMGET_CHART,
- "Calls to syscall <code>shmget(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20191,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_SHM_IDX))))
+ continue;
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SHMAT_CHART,
- "Calls to syscall <code>shmat(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20192,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmget_call",
+ "Calls to syscall shmget(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmget_call",
+ 20191,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SHMDT_CHART,
- "Calls to syscall <code>shmdt(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20193,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmat_call",
+ "Calls to syscall shmat(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmat_call",
+ 20192,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SHMCTL_CHART,
- "Calls to syscall <code>shmctl(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20194,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmdt_call",
+ "Calls to syscall shmdt(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmdt_call",
+ 20193,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmctl_call",
+ "Calls to syscall shmctl(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmctl_call",
+ 20194,
+ update_every);
+
+ w->charts_created &= ~(1<<EBPF_MODULE_SHM_IDX);
+ }
}
/**
@@ -427,6 +444,7 @@ static void ebpf_obsolete_shm_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
NETDATA_SHM_GLOBAL_CHART,
+ "",
"Calls to shared memory system calls",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SYSTEM_IPC_SHM_SUBMENU,
@@ -621,7 +639,7 @@ static void read_shm_apps_table(int maps_per_core)
*/
static void shm_send_global()
{
- write_begin_chart(NETDATA_EBPF_SYSTEM_GROUP, NETDATA_SHM_GLOBAL_CHART);
+ ebpf_write_begin_chart(NETDATA_EBPF_SYSTEM_GROUP, NETDATA_SHM_GLOBAL_CHART, "");
write_chart_dimension(
shm_publish_aggregated[NETDATA_KEY_SHMGET_CALL].dimension,
(long long) shm_hash_values[NETDATA_KEY_SHMGET_CALL]
@@ -638,7 +656,7 @@ static void shm_send_global()
shm_publish_aggregated[NETDATA_KEY_SHMCTL_CALL].dimension,
(long long) shm_hash_values[NETDATA_KEY_SHMCTL_CALL]
);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -699,42 +717,27 @@ void ebpf_shm_send_apps_data(struct ebpf_target *root)
{
struct ebpf_target *w;
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- ebpf_shm_sum_pids(&w->shm, w->root_pid);
- }
- }
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_SHM_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SHMGET_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, (long long) w->shm.get);
- }
- }
- write_end_chart();
+ ebpf_shm_sum_pids(&w->shm, w->root_pid);
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SHMAT_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, (long long) w->shm.at);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_shmget_call");
+ write_chart_dimension("calls", (long long) w->shm.get);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SHMDT_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, (long long) w->shm.dt);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_shmat_call");
+ write_chart_dimension("calls", (long long) w->shm.at);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SHMCTL_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, (long long) w->shm.ctl);
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_shmdt_call");
+ write_chart_dimension("calls", (long long) w->shm.dt);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_shmctl_call");
+ write_chart_dimension("calls", (long long) w->shm.ctl);
+ ebpf_write_end_chart();
}
- write_end_chart();
}
/**
@@ -768,7 +771,7 @@ static void ebpf_shm_sum_cgroup_pids(netdata_publish_shm_t *shm, struct pid_on_t
static void ebpf_create_specific_shm_charts(char *type, int update_every)
{
ebpf_create_chart(type, NETDATA_SHMGET_CHART,
- "Calls to syscall <code>shmget(2)</code>.",
+ "Calls to syscall shmget(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_CGROUP_SHM_GET_CONTEXT,
@@ -781,7 +784,7 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
NETDATA_EBPF_MODULE_NAME_SHM);
ebpf_create_chart(type, NETDATA_SHMAT_CHART,
- "Calls to syscall <code>shmat(2)</code>.",
+ "Calls to syscall shmat(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_CGROUP_SHM_AT_CONTEXT,
@@ -794,7 +797,7 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
NETDATA_EBPF_MODULE_NAME_SHM);
ebpf_create_chart(type, NETDATA_SHMDT_CHART,
- "Calls to syscall <code>shmdt(2)</code>.",
+ "Calls to syscall shmdt(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_CGROUP_SHM_DT_CONTEXT,
@@ -807,7 +810,7 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
NETDATA_EBPF_MODULE_NAME_SHM);
ebpf_create_chart(type, NETDATA_SHMCTL_CHART,
- "Calls to syscall <code>shmctl(2)</code>.",
+ "Calls to syscall shmctl(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_CGROUP_SHM_CTL_CONTEXT,
@@ -831,28 +834,32 @@ static void ebpf_create_specific_shm_charts(char *type, int update_every)
static void ebpf_obsolete_specific_shm_charts(char *type, int update_every)
{
ebpf_write_chart_obsolete(type, NETDATA_SHMGET_CHART,
- "Calls to syscall <code>shmget(2)</code>.",
+ "",
+ "Calls to syscall shmget(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_SHM_GET_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5800, update_every);
ebpf_write_chart_obsolete(type, NETDATA_SHMAT_CHART,
- "Calls to syscall <code>shmat(2)</code>.",
+ "",
+ "Calls to syscall shmat(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_SHM_AT_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5801, update_every);
ebpf_write_chart_obsolete(type, NETDATA_SHMDT_CHART,
- "Calls to syscall <code>shmdt(2)</code>.",
+ "",
+ "Calls to syscall shmdt(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_SHM_DT_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5802, update_every);
ebpf_write_chart_obsolete(type, NETDATA_SHMCTL_CHART,
- "Calls to syscall <code>shmctl(2)</code>.",
+ "",
+ "Calls to syscall shmctl(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_SHM_CTL_CONTEXT,
@@ -869,7 +876,7 @@ static void ebpf_obsolete_specific_shm_charts(char *type, int update_every)
static void ebpf_create_systemd_shm_charts(int update_every)
{
ebpf_create_charts_on_systemd(NETDATA_SHMGET_CHART,
- "Calls to syscall <code>shmget(2)</code>.",
+ "Calls to syscall shmget(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -878,7 +885,7 @@ static void ebpf_create_systemd_shm_charts(int update_every)
NETDATA_SYSTEMD_SHM_GET_CONTEXT, NETDATA_EBPF_MODULE_NAME_SHM, update_every);
ebpf_create_charts_on_systemd(NETDATA_SHMAT_CHART,
- "Calls to syscall <code>shmat(2)</code>.",
+ "Calls to syscall shmat(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -887,7 +894,7 @@ static void ebpf_create_systemd_shm_charts(int update_every)
NETDATA_SYSTEMD_SHM_AT_CONTEXT, NETDATA_EBPF_MODULE_NAME_SHM, update_every);
ebpf_create_charts_on_systemd(NETDATA_SHMDT_CHART,
- "Calls to syscall <code>shmdt(2)</code>.",
+ "Calls to syscall shmdt(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -896,7 +903,7 @@ static void ebpf_create_systemd_shm_charts(int update_every)
NETDATA_SYSTEMD_SHM_DT_CONTEXT, NETDATA_EBPF_MODULE_NAME_SHM, update_every);
ebpf_create_charts_on_systemd(NETDATA_SHMCTL_CHART,
- "Calls to syscall <code>shmctl(2)</code>.",
+ "Calls to syscall shmctl(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_IPC_SHM_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -913,37 +920,37 @@ static void ebpf_create_systemd_shm_charts(int update_every)
static void ebpf_send_systemd_shm_charts()
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMGET_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMGET_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_shm.get);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMAT_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMAT_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_shm.at);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMDT_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMDT_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_shm.dt);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMCTL_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SHMCTL_CHART, "");
for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_shm.ctl);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/*
@@ -956,21 +963,21 @@ static void ebpf_send_systemd_shm_charts()
*/
static void ebpf_send_specific_shm_data(char *type, netdata_publish_shm_t *values)
{
- write_begin_chart(type, NETDATA_SHMGET_CHART);
+ ebpf_write_begin_chart(type, NETDATA_SHMGET_CHART, "");
write_chart_dimension(shm_publish_aggregated[NETDATA_KEY_SHMGET_CALL].name, (long long)values->get);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SHMAT_CHART);
+ ebpf_write_begin_chart(type, NETDATA_SHMAT_CHART, "");
write_chart_dimension(shm_publish_aggregated[NETDATA_KEY_SHMAT_CALL].name, (long long)values->at);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SHMDT_CHART);
+ ebpf_write_begin_chart(type, NETDATA_SHMDT_CHART, "");
write_chart_dimension(shm_publish_aggregated[NETDATA_KEY_SHMDT_CALL].name, (long long)values->dt);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SHMCTL_CHART);
+ ebpf_write_begin_chart(type, NETDATA_SHMCTL_CHART, "");
write_chart_dimension(shm_publish_aggregated[NETDATA_KEY_SHMCTL_CALL].name, (long long)values->ctl);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -1097,41 +1104,74 @@ static void shm_collector(ebpf_module_t *em)
void ebpf_shm_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_SHMGET_CHART,
- "Calls to syscall <code>shmget(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20191,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SHM);
-
- ebpf_create_charts_on_apps(NETDATA_SHMAT_CHART,
- "Calls to syscall <code>shmat(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20192,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SHM);
-
- ebpf_create_charts_on_apps(NETDATA_SHMDT_CHART,
- "Calls to syscall <code>shmdt(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20193,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SHM);
-
- ebpf_create_charts_on_apps(NETDATA_SHMCTL_CHART,
- "Calls to syscall <code>shmctl(2)</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_IPC_SHM_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20194,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SHM);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmget_call",
+ "Calls to syscall shmget(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmget_call",
+ 20191,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SHM);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmat_call",
+ "Calls to syscall shmat(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmat_call",
+ 20192,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SHM);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmdt_call",
+ "Calls to syscall shmdt(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmdt_call",
+ 20193,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SHM);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_shmctl_call",
+ "Calls to syscall shmctl(2).",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_IPC_SHM_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_shmctl_call",
+ 20194,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SHM);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ w->charts_created |= 1<<EBPF_MODULE_SHM_IDX;
+ }
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
}
diff --git a/collectors/ebpf.plugin/ebpf_socket.c b/collectors/ebpf.plugin/ebpf_socket.c
index 3e3897551..bbb5dca1b 100644
--- a/collectors/ebpf.plugin/ebpf_socket.c
+++ b/collectors/ebpf.plugin/ebpf_socket.c
@@ -75,6 +75,7 @@ static netdata_publish_syscall_t socket_publish_aggregated[NETDATA_MAX_SOCKET_VE
netdata_socket_t *socket_values;
ebpf_network_viewer_port_list_t *listen_ports = NULL;
+ebpf_addresses_t tcp_v6_connect_address = {.function = "tcp_v6_connect", .hash = 0, .addr = 0, .type = 0};
struct config socket_config = { .first_section = NULL,
.last_section = NULL,
@@ -177,11 +178,13 @@ static void ebpf_set_trampoline_target(struct socket_bpf *obj)
bpf_program__set_attach_target(obj->progs.netdata_tcp_v4_connect_fexit, 0,
socket_targets[NETDATA_FCNT_TCP_V4_CONNECT].name);
- bpf_program__set_attach_target(obj->progs.netdata_tcp_v6_connect_fentry, 0,
- socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
+ if (tcp_v6_connect_address.type == 'T') {
+ bpf_program__set_attach_target(
+ obj->progs.netdata_tcp_v6_connect_fentry, 0, socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
- bpf_program__set_attach_target(obj->progs.netdata_tcp_v6_connect_fexit, 0,
+ bpf_program__set_attach_target(obj->progs.netdata_tcp_v6_connect_fexit, 0,
socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
+ }
bpf_program__set_attach_target(obj->progs.netdata_tcp_retransmit_skb_fentry, 0,
socket_targets[NETDATA_FCNT_TCP_RETRANSMIT].name);
@@ -332,12 +335,13 @@ static long ebpf_socket_attach_probes(struct socket_bpf *obj, netdata_run_mode_t
if (ret)
return -1;
- obj->links.netdata_tcp_v6_connect_kretprobe = bpf_program__attach_kprobe(obj->progs.netdata_tcp_v6_connect_kretprobe,
- true,
- socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
- ret = libbpf_get_error(obj->links.netdata_tcp_v6_connect_kretprobe);
- if (ret)
- return -1;
+ if (tcp_v6_connect_address.type == 'T') {
+ obj->links.netdata_tcp_v6_connect_kretprobe = bpf_program__attach_kprobe(
+ obj->progs.netdata_tcp_v6_connect_kretprobe, true, socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
+ ret = libbpf_get_error(obj->links.netdata_tcp_v6_connect_kretprobe);
+ if (ret)
+ return -1;
+ }
} else {
obj->links.netdata_tcp_sendmsg_kprobe = bpf_program__attach_kprobe(obj->progs.netdata_tcp_sendmsg_kprobe,
false,
@@ -360,12 +364,14 @@ static long ebpf_socket_attach_probes(struct socket_bpf *obj, netdata_run_mode_t
if (ret)
return -1;
- obj->links.netdata_tcp_v6_connect_kprobe = bpf_program__attach_kprobe(obj->progs.netdata_tcp_v6_connect_kprobe,
- false,
- socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
- ret = libbpf_get_error(obj->links.netdata_tcp_v6_connect_kprobe);
- if (ret)
- return -1;
+ if (tcp_v6_connect_address.type == 'T') {
+ obj->links.netdata_tcp_v6_connect_kprobe = bpf_program__attach_kprobe(obj->progs.netdata_tcp_v6_connect_kprobe,
+ false,
+ socket_targets[NETDATA_FCNT_TCP_V6_CONNECT].name);
+ ret = libbpf_get_error(obj->links.netdata_tcp_v6_connect_kprobe);
+ if (ret)
+ return -1;
+ }
}
return 0;
@@ -411,6 +417,17 @@ static void ebpf_socket_adjust_map(struct socket_bpf *obj, ebpf_module_t *em)
}
/**
+ * Disable TCP V6 connect
+ */
+static void ebpf_disable_tcp_v6_connect(struct socket_bpf *obj)
+{
+ bpf_program__set_autoload(obj->progs.netdata_tcp_v6_connect_kretprobe, false);
+ bpf_program__set_autoload(obj->progs.netdata_tcp_v6_connect_kprobe, false);
+ bpf_program__set_autoload(obj->progs.netdata_tcp_v6_connect_fexit, false);
+ bpf_program__set_autoload(obj->progs.netdata_tcp_v6_connect_fentry, false);
+}
+
+/**
* Load and attach
*
* Load and attach the eBPF code in kernel.
@@ -438,6 +455,10 @@ static inline int ebpf_socket_load_and_attach(struct socket_bpf *obj, ebpf_modul
ebpf_socket_adjust_map(obj, em);
+ if (tcp_v6_connect_address.type != 'T') {
+ ebpf_disable_tcp_v6_connect(obj);
+ }
+
int ret = socket_bpf__load(obj);
if (ret) {
fprintf(stderr, "failed to load BPF object: %d\n", ret);
@@ -494,6 +515,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
int order = 20080;
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_CONNECTION_TCP_V4,
+ "",
"Calls to tcp_v4_connection",
EBPF_COMMON_DIMENSION_CONNECTIONS,
NETDATA_APPS_NET_GROUP,
@@ -502,18 +524,22 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
order++,
update_every);
- ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
- NETDATA_NET_APPS_CONNECTION_TCP_V6,
- "Calls to tcp_v6_connection",
- EBPF_COMMON_DIMENSION_CONNECTIONS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NETDATA_SERVICES_SOCKET_TCP_V6_CONN_CONTEXT,
- order++,
- update_every);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
+ NETDATA_NET_APPS_CONNECTION_TCP_V6,
+ "",
+ "Calls to tcp_v6_connection",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ NETDATA_SERVICES_SOCKET_TCP_V6_CONN_CONTEXT,
+ order++,
+ update_every);
+ }
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_RECV,
+ "",
"Bytes received",
EBPF_COMMON_DIMENSION_BITS,
NETDATA_APPS_NET_GROUP,
@@ -524,6 +550,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_SENT,
+ "",
"Bytes sent",
EBPF_COMMON_DIMENSION_BITS,
NETDATA_APPS_NET_GROUP,
@@ -534,6 +561,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS,
+ "",
"Calls to tcp_cleanup_rbuf.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_NET_GROUP,
@@ -544,6 +572,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS,
+ "",
"Calls to tcp_sendmsg.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_NET_GROUP,
@@ -554,6 +583,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT,
+ "",
"Calls to tcp_retransmit",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_NET_GROUP,
@@ -564,6 +594,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS,
+ "",
"Calls to udp_sendmsg",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_NET_GROUP,
@@ -574,6 +605,7 @@ static void ebpf_obsolete_systemd_socket_charts(int update_every)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS,
+ "",
"Calls to udp_recvmsg",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_APPS_NET_GROUP,
@@ -615,96 +647,116 @@ static inline void ebpf_obsolete_socket_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_socket_obsolete_apps_charts(struct ebpf_module *em)
{
- int order = 20080;
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_CONNECTION_TCP_V4,
- "Calls to tcp_v4_connection",
- EBPF_COMMON_DIMENSION_CONNECTIONS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ int order = 20130;
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_SOCKET_IDX))))
+ continue;
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_CONNECTION_TCP_V6,
- "Calls to tcp_v6_connection",
- EBPF_COMMON_DIMENSION_CONNECTIONS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_v4_connection",
+ "Calls to tcp_v4_connection.",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_v4_connection",
+ order++,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_SENT,
- "Bytes sent",
- EBPF_COMMON_DIMENSION_BITS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_v6_connection",
+ "Calls to tcp_v6_connection.",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_v6_connection",
+ order++,
+ update_every);
+ }
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_RECV,
- "bytes received",
- EBPF_COMMON_DIMENSION_BITS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_sock_bytes_sent",
+ "Bytes sent.",
+ EBPF_COMMON_DIMENSION_BITS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_sock_bytes_sent",
+ order++,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS,
- "Calls for tcp_sendmsg",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_sock_bytes_received",
+ "Bytes received.",
+ EBPF_COMMON_DIMENSION_BITS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_sock_bytes_received",
+ order++,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS,
- "Calls for tcp_cleanup_rbuf",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_sendmsg",
+ "Calls to tcp_sendmsg.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_sendmsg",
+ order++,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT,
- "Calls for tcp_retransmit",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_cleanup_rbuf",
+ "Calls to tcp_cleanup_rbuf.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_cleanup_rbuf",
+ order++,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS,
- "Calls for udp_sendmsg",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_retransmit",
+ "Calls to tcp_retransmit.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_retransmit",
+ order++,
+ update_every);
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS,
- "Calls for udp_recvmsg",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- order++,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_udp_sendmsg",
+ "Calls to udp_sendmsg.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_udp_sendmsg",
+ order++,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_udp_recvmsg",
+ "Calls to udp_recvmsg.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_udp_recvmsg",
+ order++,
+ update_every);
+
+ w->charts_created &= ~(1<<EBPF_MODULE_SOCKET_IDX);
+ }
}
/**
@@ -719,6 +771,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
int order = 21070;
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_INBOUND_CONNECTIONS,
+ "",
"Inbound connections.",
EBPF_COMMON_DIMENSION_CONNECTIONS,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -729,6 +782,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_TCP_OUTBOUND_CONNECTIONS,
+ "",
"TCP outbound connections.",
EBPF_COMMON_DIMENSION_CONNECTIONS,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -740,6 +794,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_TCP_FUNCTION_COUNT,
+ "",
"Calls to internal functions",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -750,6 +805,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_TCP_FUNCTION_BITS,
+ "",
"TCP bandwidth",
EBPF_COMMON_DIMENSION_BITS,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -761,6 +817,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_TCP_FUNCTION_ERROR,
+ "",
"TCP errors",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -772,6 +829,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_TCP_RETRANSMIT,
+ "",
"Packages retransmitted",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -782,6 +840,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_UDP_FUNCTION_COUNT,
+ "",
"UDP calls",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -792,6 +851,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_UDP_FUNCTION_BITS,
+ "",
"UDP bandwidth",
EBPF_COMMON_DIMENSION_BITS,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -803,6 +863,7 @@ static void ebpf_socket_obsolete_global_charts(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_EBPF_IP_FAMILY,
NETDATA_UDP_FUNCTION_ERROR,
+ "",
"UDP errors",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SOCKET_KERNEL_FUNCTIONS,
@@ -924,10 +985,10 @@ static void ebpf_socket_send_global_inbound_conn()
move = move->next;
}
- write_begin_chart(NETDATA_EBPF_IP_FAMILY, NETDATA_INBOUND_CONNECTIONS);
+ ebpf_write_begin_chart(NETDATA_EBPF_IP_FAMILY, NETDATA_INBOUND_CONNECTIONS, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_INCOMING_CONNECTION_TCP].name, (long long) tcp_conn);
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_INCOMING_CONNECTION_UDP].name, (long long) udp_conn);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -969,31 +1030,6 @@ static void ebpf_socket_send_data(ebpf_module_t *em)
}
/**
- * Sum values for pid
- *
- * @param root the structure with all available PIDs
- *
- * @param offset the address that we are reading
- *
- * @return it returns the sum of all PIDs
- */
-long long ebpf_socket_sum_values_for_pids(struct ebpf_pid_on_target *root, size_t offset)
-{
- long long ret = 0;
- while (root) {
- int32_t pid = root->pid;
- ebpf_socket_publish_apps_t *w = socket_bandwidth_curr[pid];
- if (w) {
- ret += get_value_from_structure((char *)w, offset);
- }
-
- root = root->next;
- }
-
- return ret;
-}
-
-/**
* Send data to Netdata calling auxiliary functions.
*
* @param em the structure with thread information
@@ -1004,100 +1040,74 @@ void ebpf_socket_send_apps_data(ebpf_module_t *em, struct ebpf_target *root)
UNUSED(em);
struct ebpf_target *w;
- collected_number value;
+ // This algorithm is improved in https://github.com/netdata/netdata/pull/16030
+ collected_number values[9];
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_CONNECTION_TCP_V4);
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- call_tcp_v4_connection));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_SOCKET_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_CONNECTION_TCP_V6);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- call_tcp_v6_connection));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ struct ebpf_pid_on_target *move = w->root_pid;
+ // Simplify algorithm, but others will appear only in https://github.com/netdata/netdata/pull/16030
+ memset(values, 0, sizeof(values));
+ while (move) {
+ int32_t pid = move->pid;
+ ebpf_socket_publish_apps_t *ws = socket_bandwidth_curr[pid];
+ if (ws) {
+ values[0] += (collected_number) ws->call_tcp_v4_connection;
+ values[1] += (collected_number) ws->call_tcp_v6_connection;
+ values[2] += (collected_number) ws->bytes_sent;
+ values[3] += (collected_number) ws->bytes_received;
+ values[4] += (collected_number) ws->call_tcp_sent;
+ values[5] += (collected_number) ws->call_tcp_received;
+ values[6] += (collected_number) ws->retransmit;
+ values[7] += (collected_number) ws->call_udp_sent;
+ values[8] += (collected_number) ws->call_udp_received;
+ }
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_SENT);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- bytes_sent));
- // We multiply by 0.008, because we read bytes, but we display bits
- write_chart_dimension(w->name, ((value)*8)/1000);
+ move = move->next;
}
- }
- write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_RECV);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- bytes_received));
- // We multiply by 0.008, because we read bytes, but we display bits
- write_chart_dimension(w->name, ((value)*8)/1000);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_tcp_v4_connection");
+ write_chart_dimension("connections", values[0]);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- call_tcp_sent));
- write_chart_dimension(w->name, value);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_call_tcp_v6_connection");
+ write_chart_dimension("calls", values[1]);
+ ebpf_write_end_chart();
}
- }
- write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- call_tcp_received));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_sock_bytes_sent");
+ // We multiply by 0.008, because we read bytes, but we display bits
+ write_chart_dimension("bandwidth", ((values[2])*8)/1000);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- retransmit));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_sock_bytes_received");
+ // We multiply by 0.008, because we read bytes, but we display bits
+ write_chart_dimension("bandwidth", ((values[3])*8)/1000);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- call_udp_sent));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_tcp_sendmsg");
+ write_chart_dimension("calls", values[4]);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- value = ebpf_socket_sum_values_for_pids(w->root_pid, offsetof(ebpf_socket_publish_apps_t,
- call_udp_received));
- write_chart_dimension(w->name, value);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_tcp_cleanup_rbuf");
+ write_chart_dimension("calls", values[5]);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_tcp_retransmit");
+ write_chart_dimension("calls", values[6]);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_udp_sendmsg");
+ write_chart_dimension("calls", values[7]);
+ ebpf_write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_udp_recvmsg");
+ write_chart_dimension("calls", values[8]);
+ ebpf_write_end_chart();
+ }
}
/*****************************************************************
@@ -1239,84 +1249,152 @@ static void ebpf_socket_create_global_charts(ebpf_module_t *em)
void ebpf_socket_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- int order = 20080;
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_CONNECTION_TCP_V4,
- "Calls to tcp_v4_connection", EBPF_COMMON_DIMENSION_CONNECTIONS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_CONNECTION_TCP_V6,
- "Calls to tcp_v6_connection", EBPF_COMMON_DIMENSION_CONNECTIONS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_SENT,
- "Bytes sent", EBPF_COMMON_DIMENSION_BITS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_RECV,
- "bytes received", EBPF_COMMON_DIMENSION_BITS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS,
- "Calls for tcp_sendmsg",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS,
- "Calls for tcp_cleanup_rbuf",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT,
- "Calls for tcp_retransmit",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS,
- "Calls for udp_sendmsg",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
-
- ebpf_create_charts_on_apps(NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS,
- "Calls for udp_recvmsg",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
+ struct ebpf_target *w;
+ int order = 20130;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_v4_connection",
+ "Calls to tcp_v4_connection.",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_v4_connection",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION connections '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_v6_connection",
+ "Calls to tcp_v6_connection.",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_v6_connection",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION connections '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_sock_bytes_sent",
+ "Bytes sent.",
+ EBPF_COMMON_DIMENSION_BITS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_sock_bytes_sent",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION bandwidth '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_sock_bytes_received",
+ "Bytes received.",
+ EBPF_COMMON_DIMENSION_BITS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_sock_bytes_received",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION bandwidth '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_sendmsg",
+ "Calls to tcp_sendmsg.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_sendmsg",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_cleanup_rbuf",
+ "Calls to tcp_cleanup_rbuf.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_cleanup_rbuf",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_tcp_retransmit",
+ "Calls to tcp_retransmit.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_tcp_retransmit",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_udp_sendmsg",
+ "Calls to udp_sendmsg.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_udp_sendmsg",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_udp_recvmsg",
+ "Calls to udp_recvmsg.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_udp_recvmsg",
+ order,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ w->charts_created |= 1<<EBPF_MODULE_SOCKET_IDX;
+ }
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
}
@@ -2032,15 +2110,21 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
&socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V4], 1,
update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
- ebpf_create_chart(type, NETDATA_NET_APPS_CONNECTION_TCP_V6,
- "Calls to tcp_v6_connection",
- EBPF_COMMON_DIMENSION_CONNECTIONS, NETDATA_CGROUP_NET_GROUP,
- NETDATA_CGROUP_TCP_V6_CONN_CONTEXT,
- NETDATA_EBPF_CHART_TYPE_LINE,
- NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++,
- ebpf_create_global_dimension,
- &socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V6], 1,
- update_every, NETDATA_EBPF_MODULE_NAME_SOCKET);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_create_chart(type,
+ NETDATA_NET_APPS_CONNECTION_TCP_V6,
+ "Calls to tcp_v6_connection",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_CGROUP_NET_GROUP,
+ NETDATA_CGROUP_TCP_V6_CONN_CONTEXT,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++,
+ ebpf_create_global_dimension,
+ &socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V6],
+ 1,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SOCKET);
+ }
ebpf_create_chart(type, NETDATA_NET_APPS_BANDWIDTH_RECV,
"Bytes received",
@@ -2124,47 +2208,55 @@ static void ebpf_create_specific_socket_charts(char *type, int update_every)
static void ebpf_obsolete_specific_socket_charts(char *type, int update_every)
{
int order_basis = 5300;
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_CONNECTION_TCP_V4, "Calls to tcp_v4_connection",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_CONNECTION_TCP_V4, "", "Calls to tcp_v4_connection",
EBPF_COMMON_DIMENSION_CONNECTIONS, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_TCP_V4_CONN_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_CONNECTION_TCP_V6,"Calls to tcp_v6_connection",
- EBPF_COMMON_DIMENSION_CONNECTIONS, NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_TCP_V6_CONN_CONTEXT,
- NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_chart_obsolete(type,
+ NETDATA_NET_APPS_CONNECTION_TCP_V6,
+ "",
+ "Calls to tcp_v6_connection",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_LINE,
+ NETDATA_SERVICES_SOCKET_TCP_V6_CONN_CONTEXT,
+ NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++,
+ update_every);
+ }
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_RECV, "Bytes received",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_RECV, "", "Bytes received",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_BYTES_RECV_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_SENT,"Bytes sent",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_SENT, "","Bytes sent",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_BYTES_SEND_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS, "Calls to tcp_cleanup_rbuf.",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS, "", "Calls to tcp_cleanup_rbuf.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_TCP_RECV_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS, "Calls to tcp_sendmsg.",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS, "", "Calls to tcp_sendmsg.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_TCP_SEND_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT, "Calls to tcp_retransmit.",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT, "", "Calls to tcp_retransmit.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_TCP_RETRANSMIT_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS, "Calls to udp_sendmsg",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS, "", "Calls to udp_sendmsg",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_SERVICES_SOCKET_UDP_SEND_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS, "Calls to udp_recvmsg",
+ ebpf_write_chart_obsolete(type, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS, "", "Calls to udp_recvmsg",
EBPF_COMMON_DIMENSION_CALL, NETDATA_APPS_NET_GROUP, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_SERVICES_SOCKET_UDP_RECV_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + order_basis++, update_every);
@@ -2180,50 +2272,52 @@ static void ebpf_obsolete_specific_socket_charts(char *type, int update_every)
*/
static void ebpf_send_specific_socket_data(char *type, ebpf_socket_publish_apps_t *values)
{
- write_begin_chart(type, NETDATA_NET_APPS_CONNECTION_TCP_V4);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_CONNECTION_TCP_V4, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V4].name,
(long long) values->call_tcp_v4_connection);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_CONNECTION_TCP_V6);
- write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V6].name,
- (long long) values->call_tcp_v6_connection);
- write_end_chart();
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_CONNECTION_TCP_V6, "");
+ write_chart_dimension(
+ socket_publish_aggregated[NETDATA_IDX_TCP_CONNECTION_V6].name, (long long)values->call_tcp_v6_connection);
+ ebpf_write_end_chart();
+ }
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_SENT);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_SENT, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_SENDMSG].name,
(long long) values->bytes_sent);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_RECV);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_RECV, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_CLEANUP_RBUF].name,
(long long) values->bytes_received);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_SENDMSG].name,
(long long) values->call_tcp_sent);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_CLEANUP_RBUF].name,
(long long) values->call_tcp_received);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_TCP_RETRANSMIT].name,
(long long) values->retransmit);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_UDP_SENDMSG].name,
(long long) values->call_udp_sent);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS);
+ ebpf_write_begin_chart(type, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS, "");
write_chart_dimension(socket_publish_aggregated[NETDATA_IDX_UDP_RECVBUF].name,
(long long) values->call_udp_received);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -2245,14 +2339,18 @@ static void ebpf_create_systemd_socket_charts(int update_every)
NETDATA_SERVICES_SOCKET_TCP_V4_CONN_CONTEXT, NETDATA_EBPF_MODULE_NAME_SOCKET,
update_every);
- ebpf_create_charts_on_systemd(NETDATA_NET_APPS_CONNECTION_TCP_V6,
- "Calls to tcp_v6_connection", EBPF_COMMON_DIMENSION_CONNECTIONS,
- NETDATA_APPS_NET_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- order++,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- NETDATA_SERVICES_SOCKET_TCP_V6_CONN_CONTEXT, NETDATA_EBPF_MODULE_NAME_SOCKET,
- update_every);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_create_charts_on_systemd(NETDATA_NET_APPS_CONNECTION_TCP_V6,
+ "Calls to tcp_v6_connection",
+ EBPF_COMMON_DIMENSION_CONNECTIONS,
+ NETDATA_APPS_NET_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ order++,
+ ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
+ NETDATA_SERVICES_SOCKET_TCP_V6_CONN_CONTEXT,
+ NETDATA_EBPF_MODULE_NAME_SOCKET,
+ update_every);
+ }
ebpf_create_charts_on_systemd(NETDATA_NET_APPS_BANDWIDTH_RECV,
"Bytes received", EBPF_COMMON_DIMENSION_BITS,
@@ -2331,77 +2429,79 @@ static void ebpf_create_systemd_socket_charts(int update_every)
static void ebpf_send_systemd_socket_charts()
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_CONNECTION_TCP_V4);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_CONNECTION_TCP_V4, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.call_tcp_v4_connection);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_CONNECTION_TCP_V6);
- for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
- if (unlikely(ect->systemd) && unlikely(ect->updated)) {
- write_chart_dimension(ect->name, (long long)ect->publish_socket.call_tcp_v6_connection);
+ if (tcp_v6_connect_address.type == 'T') {
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_CONNECTION_TCP_V6, "");
+ for (ect = ebpf_cgroup_pids; ect; ect = ect->next) {
+ if (unlikely(ect->systemd) && unlikely(ect->updated)) {
+ write_chart_dimension(ect->name, (long long)ect->publish_socket.call_tcp_v6_connection);
+ }
}
+ ebpf_write_end_chart();
}
- write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_SENT);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_SENT, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.bytes_sent);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_RECV);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_RECV, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.bytes_received);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_SEND_CALLS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.call_tcp_sent);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_RECV_CALLS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.call_tcp_received);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_TCP_RETRANSMIT, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.retransmit);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_UDP_SEND_CALLS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.call_udp_sent);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_NET_APPS_BANDWIDTH_UDP_RECV_CALLS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long)ect->publish_socket.call_udp_received);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -2562,6 +2662,8 @@ static void ebpf_socket_initialize_global_vectors()
sizeof(netdata_socket_plus_t));
socket_values = callocz((size_t)ebpf_nprocs, sizeof(netdata_socket_t));
+
+ ebpf_load_addresses(&tcp_v6_connect_address, -1);
}
/*****************************************************************
diff --git a/collectors/ebpf.plugin/ebpf_socket.h b/collectors/ebpf.plugin/ebpf_socket.h
index fb2404c24..a6d3e03b6 100644
--- a/collectors/ebpf.plugin/ebpf_socket.h
+++ b/collectors/ebpf.plugin/ebpf_socket.h
@@ -318,10 +318,6 @@ typedef struct netata_socket_plus {
} socket_string;
} netdata_socket_plus_t;
-enum netdata_udp_ports {
- NETDATA_EBPF_UDP_PORT = 53
-};
-
extern ARAL *aral_socket_table;
/**
diff --git a/collectors/ebpf.plugin/ebpf_softirq.c b/collectors/ebpf.plugin/ebpf_softirq.c
index 711ff43a6..106ff4f29 100644
--- a/collectors/ebpf.plugin/ebpf_softirq.c
+++ b/collectors/ebpf.plugin/ebpf_softirq.c
@@ -71,6 +71,7 @@ static void ebpf_obsolete_softirq_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_SYSTEM_GROUP,
"softirq_latency",
+ "",
"Software IRQ latency",
EBPF_COMMON_DIMENSION_MILLISECONDS,
"softirqs",
@@ -228,9 +229,9 @@ static void softirq_collector(ebpf_module_t *em)
pthread_mutex_lock(&lock);
// write dims now for all hitherto discovered IRQs.
- write_begin_chart(NETDATA_EBPF_SYSTEM_GROUP, "softirq_latency");
+ ebpf_write_begin_chart(NETDATA_EBPF_SYSTEM_GROUP, "softirq_latency", "");
softirq_write_dims();
- write_end_chart();
+ ebpf_write_end_chart();
pthread_mutex_unlock(&lock);
diff --git a/collectors/ebpf.plugin/ebpf_swap.c b/collectors/ebpf.plugin/ebpf_swap.c
index d0c8cee3d..fb007f928 100644
--- a/collectors/ebpf.plugin/ebpf_swap.c
+++ b/collectors/ebpf.plugin/ebpf_swap.c
@@ -234,7 +234,8 @@ static void ebpf_obsolete_swap_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_MEM_SWAP_READ_CHART,
- "Calls to function <code>swap_readpage</code>.",
+ "",
+ "Calls to function swap_readpage.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -244,7 +245,8 @@ static void ebpf_obsolete_swap_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_MEM_SWAP_WRITE_CHART,
- "Calls to function <code>swap_writepage</code>.",
+ "",
+ "Calls to function swap_writepage.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -284,25 +286,35 @@ static inline void ebpf_obsolete_swap_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_obsolete_swap_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_MEM_SWAP_READ_CHART,
- "Calls to function <code>swap_readpage</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_SWAP_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20191,
- em->update_every);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_SWAP_IDX))))
+ continue;
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_MEM_SWAP_WRITE_CHART,
- "Calls to function <code>swap_writepage</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_SWAP_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20192,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_swap_readpage",
+ "Calls to function swap_readpage.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_EBPF_MEMORY_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_swap_readpage",
+ 20070,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_swap_writepage",
+ "Calls to function swap_writepage.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_EBPF_MEMORY_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_swap_writepage",
+ 20071,
+ update_every);
+ w->charts_created &= ~(1<<EBPF_MODULE_SWAP_IDX);
+ }
}
/**
@@ -316,6 +328,7 @@ static void ebpf_obsolete_swap_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_MEM_SWAP_CHART,
+ "",
"Calls to access swap memory",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -568,26 +581,19 @@ void ebpf_swap_send_apps_data(struct ebpf_target *root)
{
struct ebpf_target *w;
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- ebpf_swap_sum_pids(&w->swap, w->root_pid);
- }
- }
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_SWAP_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_MEM_SWAP_READ_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, (long long) w->swap.read);
- }
- }
- write_end_chart();
+ ebpf_swap_sum_pids(&w->swap, w->root_pid);
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_MEM_SWAP_WRITE_CHART);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, (long long) w->swap.write);
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_swap_readpage");
+ write_chart_dimension("calls", (long long) w->swap.read);
+ ebpf_write_end_chart();
+
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_swap_writepage");
+ write_chart_dimension("calls", (long long) w->swap.write);
+ ebpf_write_end_chart();
}
- write_end_chart();
}
/**
@@ -624,21 +630,21 @@ static void ebpf_swap_sum_cgroup_pids(netdata_publish_swap_t *swap, struct pid_o
static void ebpf_send_systemd_swap_charts()
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_MEM_SWAP_READ_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_MEM_SWAP_READ_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long) ect->publish_systemd_swap.read);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_MEM_SWAP_WRITE_CHART);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_MEM_SWAP_WRITE_CHART, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, (long long) ect->publish_systemd_swap.write);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -652,7 +658,7 @@ static void ebpf_send_systemd_swap_charts()
static void ebpf_create_specific_swap_charts(char *type, int update_every)
{
ebpf_create_chart(type, NETDATA_MEM_SWAP_READ_CHART,
- "Calls to function <code>swap_readpage</code>.",
+ "Calls to function swap_readpage.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_CGROUP_SWAP_READ_CONTEXT, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5100,
@@ -660,7 +666,7 @@ static void ebpf_create_specific_swap_charts(char *type, int update_every)
swap_publish_aggregated, 1, update_every, NETDATA_EBPF_MODULE_NAME_SWAP);
ebpf_create_chart(type, NETDATA_MEM_SWAP_WRITE_CHART,
- "Calls to function <code>swap_writepage</code>.",
+ "Calls to function swap_writepage.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_CGROUP_SWAP_WRITE_CONTEXT, NETDATA_EBPF_CHART_TYPE_LINE,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5101,
@@ -679,12 +685,12 @@ static void ebpf_create_specific_swap_charts(char *type, int update_every)
*/
static void ebpf_obsolete_specific_swap_charts(char *type, int update_every)
{
- ebpf_write_chart_obsolete(type, NETDATA_MEM_SWAP_READ_CHART,"Calls to function <code>swap_readpage</code>.",
+ ebpf_write_chart_obsolete(type, NETDATA_MEM_SWAP_READ_CHART, "", "Calls to function swap_readpage.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_SWAP_READ_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5100, update_every);
- ebpf_write_chart_obsolete(type, NETDATA_MEM_SWAP_WRITE_CHART, "Calls to function <code>swap_writepage</code>.",
+ ebpf_write_chart_obsolete(type, NETDATA_MEM_SWAP_WRITE_CHART, "", "Calls to function swap_writepage.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_SWAP_WRITE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5101, update_every);
@@ -700,13 +706,13 @@ static void ebpf_obsolete_specific_swap_charts(char *type, int update_every)
*/
static void ebpf_send_specific_swap_data(char *type, netdata_publish_swap_t *values)
{
- write_begin_chart(type, NETDATA_MEM_SWAP_READ_CHART);
+ ebpf_write_begin_chart(type, NETDATA_MEM_SWAP_READ_CHART, "");
write_chart_dimension(swap_publish_aggregated[NETDATA_KEY_SWAP_READPAGE_CALL].name, (long long) values->read);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_MEM_SWAP_WRITE_CHART);
+ ebpf_write_begin_chart(type, NETDATA_MEM_SWAP_WRITE_CHART, "");
write_chart_dimension(swap_publish_aggregated[NETDATA_KEY_SWAP_WRITEPAGE_CALL].name, (long long) values->write);
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -719,14 +725,14 @@ static void ebpf_send_specific_swap_data(char *type, netdata_publish_swap_t *val
static void ebpf_create_systemd_swap_charts(int update_every)
{
ebpf_create_charts_on_systemd(NETDATA_MEM_SWAP_READ_CHART,
- "Calls to <code>swap_readpage</code>.",
+ "Calls to swap_readpage.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_STACKED, 20191,
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_SWAP_READ_CONTEXT,
NETDATA_EBPF_MODULE_NAME_SWAP, update_every);
ebpf_create_charts_on_systemd(NETDATA_MEM_SWAP_WRITE_CHART,
- "Calls to function <code>swap_writepage</code>.",
+ "Calls to function swap_writepage.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_SYSTEM_CGROUP_SWAP_SUBMENU,
NETDATA_EBPF_CHART_TYPE_STACKED, 20192,
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_SWAP_WRITE_CONTEXT,
@@ -851,23 +857,44 @@ static void swap_collector(ebpf_module_t *em)
void ebpf_swap_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
- ebpf_create_charts_on_apps(NETDATA_MEM_SWAP_READ_CHART,
- "Calls to function <code>swap_readpage</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_SWAP_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20191,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SWAP);
-
- ebpf_create_charts_on_apps(NETDATA_MEM_SWAP_WRITE_CHART,
- "Calls to function <code>swap_writepage</code>.",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_SWAP_SUBMENU,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20192,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_SWAP);
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_swap_readpage",
+ "Calls to function swap_readpage.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_EBPF_MEMORY_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_swap_readpage",
+ 20070,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SWAP);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_swap_writepage",
+ "Calls to function swap_writepage.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_EBPF_MEMORY_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_swap_writepage",
+ 20071,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_SWAP);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ w->charts_created |= 1<<EBPF_MODULE_SWAP_IDX;
+ }
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
}
diff --git a/collectors/ebpf.plugin/ebpf_sync.c b/collectors/ebpf.plugin/ebpf_sync.c
index 95dda19fd..a16318107 100644
--- a/collectors/ebpf.plugin/ebpf_sync.c
+++ b/collectors/ebpf.plugin/ebpf_sync.c
@@ -298,7 +298,8 @@ static void ebpf_obsolete_sync_global(ebpf_module_t *em)
if (local_syscalls[NETDATA_SYNC_FSYNC_IDX].enabled && local_syscalls[NETDATA_SYNC_FDATASYNC_IDX].enabled)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_EBPF_FILE_SYNC_CHART,
- "Monitor calls for <code>fsync(2)</code> and <code>fdatasync(2)</code>.",
+ "",
+ "Monitor calls to fsync(2) and fdatasync(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_SYNC_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -309,7 +310,8 @@ static void ebpf_obsolete_sync_global(ebpf_module_t *em)
if (local_syscalls[NETDATA_SYNC_MSYNC_IDX].enabled)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_EBPF_MSYNC_CHART,
- "Monitor calls for <code>msync(2)</code>.",
+ "",
+ "Monitor calls to msync(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_SYNC_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -320,7 +322,8 @@ static void ebpf_obsolete_sync_global(ebpf_module_t *em)
if (local_syscalls[NETDATA_SYNC_SYNC_IDX].enabled && local_syscalls[NETDATA_SYNC_SYNCFS_IDX].enabled)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_EBPF_SYNC_CHART,
- "Monitor calls for <code>sync(2)</code> and <code>syncfs(2)</code>.",
+ "",
+ "Monitor calls to sync(2) and syncfs(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_SYNC_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -331,7 +334,8 @@ static void ebpf_obsolete_sync_global(ebpf_module_t *em)
if (local_syscalls[NETDATA_SYNC_SYNC_FILE_RANGE_IDX].enabled)
ebpf_write_chart_obsolete(NETDATA_EBPF_MEMORY_GROUP,
NETDATA_EBPF_FILE_SEGMENT_CHART,
- "Monitor calls for <code>sync_file_range(2)</code>.",
+ "",
+ "Monitor calls to sync_file_range(2).",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_SYNC_SUBMENU,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -507,7 +511,7 @@ static void ebpf_send_sync_chart(char *id,
int idx,
int end)
{
- write_begin_chart(NETDATA_EBPF_MEMORY_GROUP, id);
+ ebpf_write_begin_chart(NETDATA_EBPF_MEMORY_GROUP, id, "");
netdata_publish_syscall_t *move = &sync_counter_publish_aggregated[idx];
@@ -519,7 +523,7 @@ static void ebpf_send_sync_chart(char *id,
idx++;
}
- write_end_chart();
+ ebpf_write_end_chart();
}
/**
@@ -610,7 +614,7 @@ static void ebpf_create_sync_chart(char *id,
int end,
int update_every)
{
- ebpf_write_chart_cmd(NETDATA_EBPF_MEMORY_GROUP, id, title, EBPF_COMMON_DIMENSION_CALL,
+ ebpf_write_chart_cmd(NETDATA_EBPF_MEMORY_GROUP, id, "", title, EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_SYNC_SUBMENU, NETDATA_EBPF_CHART_TYPE_LINE, NULL, order,
update_every,
NETDATA_EBPF_MODULE_NAME_SYNC);
@@ -637,22 +641,22 @@ static void ebpf_create_sync_charts(int update_every)
{
if (local_syscalls[NETDATA_SYNC_FSYNC_IDX].enabled && local_syscalls[NETDATA_SYNC_FDATASYNC_IDX].enabled)
ebpf_create_sync_chart(NETDATA_EBPF_FILE_SYNC_CHART,
- "Monitor calls for <code>fsync(2)</code> and <code>fdatasync(2)</code>.", 21300,
+ "Monitor calls to fsync(2) and fdatasync(2).", 21300,
NETDATA_SYNC_FSYNC_IDX, NETDATA_SYNC_FDATASYNC_IDX, update_every);
if (local_syscalls[NETDATA_SYNC_MSYNC_IDX].enabled)
ebpf_create_sync_chart(NETDATA_EBPF_MSYNC_CHART,
- "Monitor calls for <code>msync(2)</code>.", 21301,
+ "Monitor calls to msync(2).", 21301,
NETDATA_SYNC_MSYNC_IDX, NETDATA_SYNC_MSYNC_IDX, update_every);
if (local_syscalls[NETDATA_SYNC_SYNC_IDX].enabled && local_syscalls[NETDATA_SYNC_SYNCFS_IDX].enabled)
ebpf_create_sync_chart(NETDATA_EBPF_SYNC_CHART,
- "Monitor calls for <code>sync(2)</code> and <code>syncfs(2)</code>.", 21302,
+ "Monitor calls to sync(2) and syncfs(2).", 21302,
NETDATA_SYNC_SYNC_IDX, NETDATA_SYNC_SYNCFS_IDX, update_every);
if (local_syscalls[NETDATA_SYNC_SYNC_FILE_RANGE_IDX].enabled)
ebpf_create_sync_chart(NETDATA_EBPF_FILE_SEGMENT_CHART,
- "Monitor calls for <code>sync_file_range(2)</code>.", 21303,
+ "Monitor calls to sync_file_range(2).", 21303,
NETDATA_SYNC_SYNC_FILE_RANGE_IDX, NETDATA_SYNC_SYNC_FILE_RANGE_IDX, update_every);
fflush(stdout);
diff --git a/collectors/ebpf.plugin/ebpf_vfs.c b/collectors/ebpf.plugin/ebpf_vfs.c
index 1e06e2a75..354901c9c 100644
--- a/collectors/ebpf.plugin/ebpf_vfs.c
+++ b/collectors/ebpf.plugin/ebpf_vfs.c
@@ -420,6 +420,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_FILE_DELETED,
+ "",
"Files deleted",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -430,6 +431,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS,
+ "",
"Write to disk",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -441,6 +443,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR,
+ "",
"Fails to write",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -452,6 +455,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_READ_CALLS,
+ "",
"Read from disk",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -463,6 +467,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR,
+ "",
"Fails to read",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -474,6 +479,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES,
+ "",
"Bytes written on disk",
EBPF_COMMON_DIMENSION_BYTES,
NETDATA_VFS_CGROUP_GROUP,
@@ -484,6 +490,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_READ_BYTES,
+ "",
"Bytes read from disk",
EBPF_COMMON_DIMENSION_BYTES,
NETDATA_VFS_CGROUP_GROUP,
@@ -494,7 +501,8 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_FSYNC,
- "Calls to <code>vfs_fsync</code>",
+ "",
+ "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -505,6 +513,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR,
+ "",
"Sync error",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -515,7 +524,8 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
}
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_OPEN,
- "Calls to <code>vfs_open</code>",
+ "",
+ "Calls to vfs_open.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -526,6 +536,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR,
+ "",
"Open error",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -537,7 +548,8 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_CREATE,
- "Calls to <code>vfs_create</code>",
+ "",
+ "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
@@ -548,6 +560,7 @@ static void ebpf_obsolete_vfs_services(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_SERVICE_FAMILY,
NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR,
+ "",
"Create error",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_CGROUP_GROUP,
@@ -589,144 +602,166 @@ static inline void ebpf_obsolete_vfs_cgroup_charts(ebpf_module_t *em) {
*/
void ebpf_obsolete_vfs_apps_charts(struct ebpf_module *em)
{
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_FILE_DELETED,
- "Files deleted",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20065,
- em->update_every);
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS,
- "Write to disk",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20066,
- em->update_every);
+ int order = 20275;
+ struct ebpf_target *w;
+ int update_every = em->update_every;
+ for (w = apps_groups_root_target; w; w = w->next) {
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_VFS_IDX))))
+ continue;
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR,
- "Fails to write",
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_unlink",
+ "Files deleted.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20067,
- em->update_every);
- }
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_READ_CALLS,
- "Read from disk",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20068,
- em->update_every);
-
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR,
- "Fails to read",
+ "app.ebpf_call_vfs_unlink",
+ order++,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_write",
+ "Write to disk.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20069,
- em->update_every);
- }
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES,
- "Bytes written on disk",
- EBPF_COMMON_DIMENSION_BYTES,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20070,
- em->update_every);
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_READ_BYTES,
- "Bytes read from disk",
- EBPF_COMMON_DIMENSION_BYTES,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20071,
- em->update_every);
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_FSYNC,
- "Calls for <code>vfs_fsync</code>",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20072,
- em->update_every);
+ "app.ebpf_call_vfs_write",
+ order++,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_write_error",
+ "Fails to write.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_write_error",
+ order++,
+ update_every);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR,
- "Sync error",
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_read",
+ "Read from disk.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20073,
- em->update_every);
- }
-
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_OPEN,
- "Calls for <code>vfs_open</code>",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20074,
- em->update_every);
+ "app.ebpf_call_vfs_read",
+ order++,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_read_error",
+ "Fails to read.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_read_error",
+ order++,
+ update_every);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR,
- "Open error",
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_write_bytes",
+ "Bytes written on disk.",
+ EBPF_COMMON_DIMENSION_BYTES,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_write_bytes",
+ order++,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_read_bytes",
+ "Bytes read from disk.",
+ EBPF_COMMON_DIMENSION_BYTES,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_read_bytes",
+ order++,
+ update_every);
+
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_fsync",
+ "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20075,
- em->update_every);
- }
+ "app.ebpf_call_vfs_fsync",
+ order++,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_fsync_error",
+ "Fails to sync.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_fsync_error",
+ order++,
+ update_every);
+ }
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_CREATE,
- "Calls for <code>vfs_create</code>",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20076,
- em->update_every);
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_open",
+ "Calls to vfs_open.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_open",
+ order++,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_open_error",
+ "Fails to open.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_open_error",
+ order++,
+ update_every);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(NETDATA_APPS_FAMILY,
- NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR,
- "Create error",
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_create",
+ "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED,
- NULL,
- 20077,
- em->update_every);
+ "app.ebpf_call_vfs_create",
+ order++,
+ update_every);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_obsolete(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_create_error",
+ "Fails to create.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_create_error",
+ order++,
+ update_every);
+ }
+ w->charts_created &= ~(1<<EBPF_MODULE_VFS_IDX);
}
}
@@ -741,6 +776,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_FILE_CLEAN_COUNT,
+ "",
"Remove files",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
@@ -751,6 +787,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_FILE_IO_COUNT,
+ "",
"Calls to IO",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
@@ -761,6 +798,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_IO_FILE_BYTES,
+ "",
"Bytes written and read",
EBPF_COMMON_DIMENSION_BYTES,
NETDATA_VFS_GROUP,
@@ -772,6 +810,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_FILE_ERR_COUNT,
+ "",
"Fails to write or read",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
@@ -783,7 +822,8 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_FSYNC,
- "Calls for <code>vfs_fsync</code>",
+ "",
+ "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -794,6 +834,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_FSYNC_ERR,
+ "",
"Fails to synchronize",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
@@ -805,7 +846,8 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_OPEN,
- "Calls for <code>vfs_open</code>",
+ "",
+ "Calls to vfs_open.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -816,6 +858,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_OPEN_ERR,
+ "",
"Fails to open a file",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
@@ -827,7 +870,8 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_CREATE,
- "Calls for <code>vfs_create</code>",
+ "",
+ "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE,
@@ -838,6 +882,7 @@ static void ebpf_obsolete_vfs_global(ebpf_module_t *em)
if (em->mode < MODE_ENTRY) {
ebpf_write_chart_obsolete(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_CREATE_ERR,
+ "",
"Fails to create a file.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
@@ -1086,123 +1131,72 @@ void ebpf_vfs_send_apps_data(ebpf_module_t *em, struct ebpf_target *root)
{
struct ebpf_target *w;
for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- ebpf_vfs_sum_pids(&w->vfs, w->root_pid);
- }
- }
+ if (unlikely(!(w->charts_created & (1<<EBPF_MODULE_VFS_IDX))))
+ continue;
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_FILE_DELETED);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.unlink_call);
- }
- }
- write_end_chart();
+ ebpf_vfs_sum_pids(&w->vfs, w->root_pid);
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.write_call + w->vfs.writev_call);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_unlink");
+ write_chart_dimension("calls", w->vfs.unlink_call);
+ ebpf_write_end_chart();
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.write_err + w->vfs.writev_err);
- }
- }
- write_end_chart();
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_write");
+ write_chart_dimension("calls", w->vfs.write_call + w->vfs.writev_call);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_CALLS);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.read_call + w->vfs.readv_call);
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_write_error");
+ write_chart_dimension("calls", w->vfs.write_err + w->vfs.writev_err);
+ ebpf_write_end_chart();
}
- }
- write_end_chart();
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.read_err + w->vfs.readv_err);
- }
- }
- write_end_chart();
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_read");
+ write_chart_dimension("calls", w->vfs.read_call + w->vfs.readv_call);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.write_bytes + w->vfs.writev_bytes);
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_read_error");
+ write_chart_dimension("calls", w->vfs.read_err + w->vfs.readv_err);
+ ebpf_write_end_chart();
}
- }
- write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_BYTES);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.read_bytes + w->vfs.readv_bytes);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_write_bytes");
+ write_chart_dimension("writes", w->vfs.write_bytes + w->vfs.writev_bytes);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_FSYNC);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.fsync_call);
- }
- }
- write_end_chart();
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_read_bytes");
+ write_chart_dimension("reads", w->vfs.read_bytes + w->vfs.readv_bytes);
+ ebpf_write_end_chart();
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.fsync_err);
- }
- }
- write_end_chart();
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_fsync");
+ write_chart_dimension("calls", w->vfs.fsync_call);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_OPEN);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.open_call);
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_fsync_error");
+ write_chart_dimension("calls", w->vfs.fsync_err);
+ ebpf_write_end_chart();
}
- }
- write_end_chart();
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.open_err);
- }
- }
- write_end_chart();
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_open");
+ write_chart_dimension("calls", w->vfs.open_call);
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_CREATE);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.create_call);
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_open_error");
+ write_chart_dimension("calls", w->vfs.open_err);
+ ebpf_write_end_chart();
}
- }
- write_end_chart();
- if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_APPS_FAMILY, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR);
- for (w = root; w; w = w->next) {
- if (unlikely(w->exposed && w->processes)) {
- write_chart_dimension(w->name, w->vfs.create_err);
- }
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_create");
+ write_chart_dimension("calls", w->vfs.create_call);
+ ebpf_write_end_chart();
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_begin_chart(NETDATA_APP_FAMILY, w->clean_name, "_ebpf_call_vfs_create_error");
+ write_chart_dimension("calls", w->vfs.create_err);
+ ebpf_write_end_chart();
}
- write_end_chart();
}
}
@@ -1451,7 +1445,7 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ],
1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
- ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC, "Calls for <code>vfs_fsync</code>",
+ ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC, "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_CGROUP_GROUP, NETDATA_CGROUP_VFS_FSYNC_CONTEXT,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5507,
ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_FSYNC],
@@ -1465,7 +1459,7 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
}
- ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN, "Calls for <code>vfs_open</code>",
+ ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN, "Calls to vfs_open.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_CGROUP_GROUP, NETDATA_CGROUP_VFS_OPEN_CONTEXT,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5509,
ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_OPEN],
@@ -1479,7 +1473,7 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
1, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
}
- ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE, "Calls for <code>vfs_create</code>",
+ ebpf_create_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE, "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_CGROUP_GROUP, NETDATA_CGROUP_VFS_CREATE_CONTEXT,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5511,
ebpf_create_global_dimension, &vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_CREATE],
@@ -1504,76 +1498,76 @@ static void ebpf_create_specific_vfs_charts(char *type, ebpf_module_t *em)
*/
static void ebpf_obsolete_specific_vfs_charts(char *type, ebpf_module_t *em)
{
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_DELETED, "Files deleted",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_FILE_DELETED, "", "Files deleted",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_UNLINK_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5500, em->update_every);
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS, "Write to disk",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS, "", "Write to disk",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_WRITE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5501, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR, "Fails to write",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR, "", "Fails to write",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_WRITE_ERROR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5502, em->update_every);
}
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS, "Read from disk",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS, "", "Read from disk",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_READ_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5503, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR, "Fails to read",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR, "", "Fails to read",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_READ_ERROR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5504, em->update_every);
}
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES, "Bytes written on disk",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES, "", "Bytes written on disk",
EBPF_COMMON_DIMENSION_BYTES, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_WRITE_BYTES_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5505, em->update_every);
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_READ_BYTES, "Bytes read from disk",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_READ_BYTES, "", "Bytes read from disk",
EBPF_COMMON_DIMENSION_BYTES, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_READ_BYTES_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5506, em->update_every);
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_FSYNC, "Calls for <code>vfs_fsync</code>",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_FSYNC, "", "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_FSYNC_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5507, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR, "Sync error",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR, "", "Sync error",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_FSYNC_ERROR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5508, em->update_every);
}
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_OPEN, "Calls for <code>vfs_open</code>",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_OPEN, "", "Calls to vfs_open.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_OPEN_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5509, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR, "Open error",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR, "", "Open error",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_OPEN_ERROR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5510, em->update_every);
}
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_CREATE, "Calls for <code>vfs_create</code>",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_CREATE, "", "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_CREATE_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5511, em->update_every);
if (em->mode < MODE_ENTRY) {
- ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR, "Create error",
+ ebpf_write_chart_obsolete(type, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR, "", "Create error",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_GROUP,
NETDATA_EBPF_CHART_TYPE_LINE, NETDATA_CGROUP_VFS_CREATE_ERROR_CONTEXT,
NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 5512, em->update_every);
@@ -1590,78 +1584,78 @@ static void ebpf_obsolete_specific_vfs_charts(char *type, ebpf_module_t *em)
*/
static void ebpf_send_specific_vfs_data(char *type, netdata_publish_vfs_t *values, ebpf_module_t *em)
{
- write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_DELETED);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_FILE_DELETED, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_UNLINK].name, (long long)values->unlink_call);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_WRITE].name,
(long long)values->write_call + (long long)values->writev_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_WRITE].name,
(long long)values->write_err + (long long)values->writev_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ].name,
(long long)values->read_call + (long long)values->readv_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ].name,
(long long)values->read_err + (long long)values->readv_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_WRITE].name,
(long long)values->write_bytes + (long long)values->writev_bytes);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_BYTES);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_READ_BYTES, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ].name,
(long long)values->read_bytes + (long long)values->readv_bytes);
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_FSYNC].name,
(long long)values->fsync_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_FSYNC].name,
(long long)values->fsync_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_OPEN].name,
(long long)values->open_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_OPEN].name,
(long long)values->open_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_CREATE].name,
(long long)values->create_call);
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR);
+ ebpf_write_begin_chart(type, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR, "");
write_chart_dimension(vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_CREATE].name,
(long long)values->create_err);
- write_end_chart();
+ ebpf_write_end_chart();
}
}
@@ -1722,7 +1716,7 @@ static void ebpf_create_systemd_vfs_charts(ebpf_module_t *em)
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_VFS_READ_BYTES_CONTEXT,
NETDATA_EBPF_MODULE_NAME_VFS, em->update_every);
- ebpf_create_charts_on_systemd(NETDATA_SYSCALL_APPS_VFS_FSYNC, "Calls to <code>vfs_fsync</code>",
+ ebpf_create_charts_on_systemd(NETDATA_SYSCALL_APPS_VFS_FSYNC, "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED, 20072,
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_VFS_FSYNC_CONTEXT,
@@ -1735,7 +1729,7 @@ static void ebpf_create_systemd_vfs_charts(ebpf_module_t *em)
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_VFS_FSYNC_ERROR_CONTEXT,
NETDATA_EBPF_MODULE_NAME_VFS, em->update_every);
}
- ebpf_create_charts_on_systemd(NETDATA_SYSCALL_APPS_VFS_OPEN, "Calls to <code>vfs_open</code>",
+ ebpf_create_charts_on_systemd(NETDATA_SYSCALL_APPS_VFS_OPEN, "Calls to vfs_open.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED, 20074,
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_VFS_OPEN_CONTEXT,
@@ -1749,7 +1743,7 @@ static void ebpf_create_systemd_vfs_charts(ebpf_module_t *em)
NETDATA_EBPF_MODULE_NAME_VFS, em->update_every);
}
- ebpf_create_charts_on_systemd(NETDATA_SYSCALL_APPS_VFS_CREATE, "Calls to <code>vfs_create</code>",
+ ebpf_create_charts_on_systemd(NETDATA_SYSCALL_APPS_VFS_CREATE, "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL, NETDATA_VFS_CGROUP_GROUP,
NETDATA_EBPF_CHART_TYPE_STACKED, 20076,
ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX], NETDATA_SYSTEMD_VFS_CREATE_CONTEXT,
@@ -1774,125 +1768,124 @@ static void ebpf_create_systemd_vfs_charts(ebpf_module_t *em)
static void ebpf_send_systemd_vfs_charts(ebpf_module_t *em)
{
ebpf_cgroup_target_t *ect;
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_DELETED);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_FILE_DELETED, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.unlink_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.write_call +
ect->publish_systemd_vfs.writev_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.write_err +
ect->publish_systemd_vfs.writev_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_CALLS);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_CALLS, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.read_call +
ect->publish_systemd_vfs.readv_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.read_err +
ect->publish_systemd_vfs.readv_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.write_bytes +
ect->publish_systemd_vfs.writev_bytes);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
-
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_BYTES);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_READ_BYTES, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.read_bytes +
ect->publish_systemd_vfs.readv_bytes);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_FSYNC);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_FSYNC, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.fsync_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.fsync_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_OPEN);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_OPEN, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.open_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.open_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_CREATE);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_CREATE, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.create_call);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
if (em->mode < MODE_ENTRY) {
- write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR);
+ ebpf_write_begin_chart(NETDATA_SERVICE_FAMILY, NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR, "");
for (ect = ebpf_cgroup_pids; ect ; ect = ect->next) {
if (unlikely(ect->systemd) && unlikely(ect->updated)) {
write_chart_dimension(ect->name, ect->publish_systemd_vfs.create_err);
}
}
- write_end_chart();
+ ebpf_write_end_chart();
}
}
@@ -2098,7 +2091,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
ebpf_create_chart(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_FSYNC,
- "Calls for <code>vfs_fsync</code>",
+ "Calls to vfs_fsync.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NULL,
@@ -2124,7 +2117,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
ebpf_create_chart(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_OPEN,
- "Calls for <code>vfs_open</code>",
+ "Calls to vfs_open.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NULL,
@@ -2150,7 +2143,7 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
ebpf_create_chart(NETDATA_FILESYSTEM_FAMILY,
NETDATA_VFS_CREATE,
- "Calls for <code>vfs_create</code>",
+ "Calls to vfs_create.",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_VFS_GROUP,
NULL,
@@ -2188,127 +2181,219 @@ static void ebpf_create_global_charts(ebpf_module_t *em)
void ebpf_vfs_create_apps_charts(struct ebpf_module *em, void *ptr)
{
struct ebpf_target *root = ptr;
+ struct ebpf_target *w;
+ int order = 20275;
+ int update_every = em->update_every;
+ for (w = root; w; w = w->next) {
+ if (unlikely(!w->exposed))
+ continue;
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_FILE_DELETED,
- "Files deleted",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20065,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS,
- "Write to disk",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20066,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_unlink",
+ "Files deleted.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_unlink",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_write",
+ "Write to disk.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_write",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_write_error",
+ "Fails to write.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_write_error",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_WRITE_CALLS_ERROR,
- "Fails to write",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20067,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
- }
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_READ_CALLS,
- "Read from disk",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20068,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_read",
+ "Read from disk.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_read",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_read_error",
+ "Fails to read.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_read_error",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_READ_CALLS_ERROR,
- "Fails to read",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20069,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
- }
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_WRITE_BYTES,
- "Bytes written on disk", EBPF_COMMON_DIMENSION_BYTES,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20070,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_READ_BYTES,
- "Bytes read from disk", EBPF_COMMON_DIMENSION_BYTES,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20071,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_FSYNC,
- "Calls for <code>vfs_fsync</code>", EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20072,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_write_bytes",
+ "Bytes written on disk.",
+ EBPF_COMMON_DIMENSION_BYTES,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_write_bytes",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION writes '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_read_bytes",
+ "Bytes read from disk.",
+ EBPF_COMMON_DIMENSION_BYTES,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_read_bytes",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION reads '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_fsync",
+ "Calls to vfs_fsync.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_fsync",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_fsync_error",
+ "Fails to sync.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_fsync_error",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_FSYNC_CALLS_ERROR,
- "Sync error",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20073,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
- }
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_OPEN,
- "Calls for <code>vfs_open</code>", EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20074,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_open",
+ "Calls to vfs_open.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_open",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_open_error",
+ "Fails to open.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_open_error",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_OPEN_CALLS_ERROR,
- "Open error",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20075,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
- }
-
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_CREATE,
- "Calls for <code>vfs_create</code>", EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20076,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_create",
+ "Calls to vfs_create.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_create",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+
+ if (em->mode < MODE_ENTRY) {
+ ebpf_write_chart_cmd(NETDATA_APP_FAMILY,
+ w->clean_name,
+ "_ebpf_call_vfs_create_error",
+ "Fails to create a file.",
+ EBPF_COMMON_DIMENSION_CALL,
+ NETDATA_VFS_GROUP,
+ NETDATA_EBPF_CHART_TYPE_STACKED,
+ "app.ebpf_call_vfs_create_error",
+ order++,
+ update_every,
+ NETDATA_EBPF_MODULE_NAME_VFS);
+ ebpf_create_chart_labels("app_group", w->name, 1);
+ ebpf_commit_label();
+ fprintf(stdout, "DIMENSION calls '' %s 1 1\n", ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX]);
+ }
- if (em->mode < MODE_ENTRY) {
- ebpf_create_charts_on_apps(NETDATA_SYSCALL_APPS_VFS_CREATE_CALLS_ERROR,
- "Create error",
- EBPF_COMMON_DIMENSION_CALL,
- NETDATA_VFS_GROUP,
- NETDATA_EBPF_CHART_TYPE_STACKED,
- 20077,
- ebpf_algorithms[NETDATA_EBPF_INCREMENTAL_IDX],
- root, em->update_every, NETDATA_EBPF_MODULE_NAME_VFS);
+ w->charts_created |= 1<<EBPF_MODULE_VFS_IDX;
}
em->apps_charts |= NETDATA_EBPF_APPS_FLAG_CHART_CREATED;
diff --git a/collectors/ebpf.plugin/integrations/ebpf_cachestat.md b/collectors/ebpf.plugin/integrations/ebpf_cachestat.md
index 3f2d2f57d..5bf0a3774 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_cachestat.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_cachestat.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Cachestat"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -74,16 +75,20 @@ Metrics:
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.cachestat_ratio | a dimension per app group | % |
-| apps.cachestat_dirties | a dimension per app group | page/s |
-| apps.cachestat_hits | a dimension per app group | hits/s |
-| apps.cachestat_misses | a dimension per app group | misses/s |
+| app.ebpf_cachestat_hit_ratio | ratio | % |
+| app.ebpf_cachestat_dirty_pages | pages | page/s |
+| app.ebpf_cachestat_access | hits | hits/s |
+| app.ebpf_cachestat_misses | misses | misses/s |
### Per cgroup
@@ -156,15 +161,15 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_dcstat.md b/collectors/ebpf.plugin/integrations/ebpf_dcstat.md
index 6d9abea2c..4c5719026 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_dcstat.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_dcstat.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF DCstat"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -59,16 +60,20 @@ The scope defines the instance that the metric belongs to. An instance is unique
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.dc_ratio | a dimension per app group | % |
-| apps.dc_reference | a dimension per app group | files |
-| apps.dc_not_cache | a dimension per app group | files |
-| apps.dc_not_found | a dimension per app group | files |
+| app.ebpf_dc_ratio | ratio | % |
+| app.ebpf_dc_reference | files | files |
+| app.ebpf_dc_not_cache | files | files |
+| app.ebpf_dc_not_found | files | files |
### Per filesystem
@@ -154,15 +159,15 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_disk.md b/collectors/ebpf.plugin/integrations/ebpf_disk.md
index 12eafce86..557da125d 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_disk.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_disk.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Disk"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -124,9 +125,9 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_filedescriptor.md b/collectors/ebpf.plugin/integrations/ebpf_filedescriptor.md
index 0a749ec31..23f5bd26e 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_filedescriptor.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_filedescriptor.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Filedescriptor"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -91,16 +92,20 @@ Metrics:
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.file_open | a dimension per app group | calls/s |
-| apps.file_open_error | a dimension per app group | calls/s |
-| apps.file_closed | a dimension per app group | calls/s |
-| apps.file_close_error | a dimension per app group | calls/s |
+| app.ebpf_file_open | calls | calls/s |
+| app.ebpf_file_open_error | calls | calls/s |
+| app.ebpf_file_closed | calls | calls/s |
+| app.ebpf_file_close_error | calls | calls/s |
@@ -154,15 +159,15 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_filesystem.md b/collectors/ebpf.plugin/integrations/ebpf_filesystem.md
index b6050657b..7a1bb832b 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_filesystem.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_filesystem.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Filesystem"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -145,14 +146,14 @@ This configuration file have two different sections. The `[global]` overwrites d
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
-| btrfsdist | Enable or disable latency monitoring for functions associated with btrfs filesystem. | yes | False |
-| ext4dist | Enable or disable latency monitoring for functions associated with ext4 filesystem. | yes | False |
-| nfsdist | Enable or disable latency monitoring for functions associated with nfs filesystem. | yes | False |
-| xfsdist | Enable or disable latency monitoring for functions associated with xfs filesystem. | yes | False |
-| zfsdist | Enable or disable latency monitoring for functions associated with zfs filesystem. | yes | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
+| btrfsdist | Enable or disable latency monitoring for functions associated with btrfs filesystem. | yes | no |
+| ext4dist | Enable or disable latency monitoring for functions associated with ext4 filesystem. | yes | no |
+| nfsdist | Enable or disable latency monitoring for functions associated with nfs filesystem. | yes | no |
+| xfsdist | Enable or disable latency monitoring for functions associated with xfs filesystem. | yes | no |
+| zfsdist | Enable or disable latency monitoring for functions associated with zfs filesystem. | yes | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_hardirq.md b/collectors/ebpf.plugin/integrations/ebpf_hardirq.md
index cd89cd589..f9b529624 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_hardirq.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_hardirq.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Hardirq"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -124,9 +125,9 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_mdflush.md b/collectors/ebpf.plugin/integrations/ebpf_mdflush.md
index 51df30b47..0081b7d83 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_mdflush.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_mdflush.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF MDflush"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -119,9 +120,9 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_mount.md b/collectors/ebpf.plugin/integrations/ebpf_mount.md
index 063ffcbad..d19e57809 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_mount.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_mount.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Mount"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -125,11 +126,11 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_oomkill.md b/collectors/ebpf.plugin/integrations/ebpf_oomkill.md
index 372921387..897cddfac 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_oomkill.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_oomkill.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF OOMkill"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -72,13 +73,17 @@ Metrics:
These metrics show cgroup/service that reached OOM.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.oomkills | a dimension per app group | kills |
+| app.oomkill | kills | kills |
diff --git a/collectors/ebpf.plugin/integrations/ebpf_process.md b/collectors/ebpf.plugin/integrations/ebpf_process.md
index 3bd92a06e..109890139 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_process.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_process.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Process"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
diff --git a/collectors/ebpf.plugin/integrations/ebpf_processes.md b/collectors/ebpf.plugin/integrations/ebpf_processes.md
index 6d3c0d40e..62542359a 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_processes.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_processes.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Processes"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -74,17 +75,21 @@ Metrics:
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.process_create | a dimension per app group | calls/s |
-| apps.thread_create | a dimension per app group | calls/s |
-| apps.task_exit | a dimension per app group | calls/s |
-| apps.task_close | a dimension per app group | calls/s |
-| apps.task_error | a dimension per app group | calls/s |
+| app.process_create | calls | calls/s |
+| app.thread_create | call | calls/s |
+| app.task_exit | call | calls/s |
+| app.task_close | call | calls/s |
+| app.task_error | app | calls/s |
### Per cgroup
@@ -164,15 +169,15 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). This plugin will always try to attach a tracepoint, so option here will impact only function used to monitor task (thread and process) creation. | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). This plugin will always try to attach a tracepoint, so option here will impact only function used to monitor task (thread and process) creation. | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_shm.md b/collectors/ebpf.plugin/integrations/ebpf_shm.md
index 2cfcbeb16..ffa05c770 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_shm.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_shm.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF SHM"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -78,16 +79,20 @@ Metrics:
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.shmget_call | a dimension per app group | calls/s |
-| apps.shmat_call | a dimension per app group | calls/s |
-| apps.shmdt_call | a dimension per app group | calls/s |
-| apps.shmctl_call | a dimension per app group | calls/s |
+| app.ebpf_shmget_call | calls | calls/s |
+| app.ebpf_shmat_call | calls | calls/s |
+| app.ebpf_shmdt_call | calls | calls/s |
+| app.ebpf_shmctl_call | calls | calls/s |
### Per eBPF SHM instance
@@ -158,19 +163,19 @@ This configuration file have two different sections. The `[global]` overwrites a
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
-| shmget | Enable or disable monitoring for syscall `shmget` | yes | False |
-| shmat | Enable or disable monitoring for syscall `shmat` | yes | False |
-| shmdt | Enable or disable monitoring for syscall `shmdt` | yes | False |
-| shmctl | Enable or disable monitoring for syscall `shmctl` | yes | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
+| shmget | Enable or disable monitoring for syscall `shmget` | yes | no |
+| shmat | Enable or disable monitoring for syscall `shmat` | yes | no |
+| shmdt | Enable or disable monitoring for syscall `shmdt` | yes | no |
+| shmctl | Enable or disable monitoring for syscall `shmctl` | yes | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_socket.md b/collectors/ebpf.plugin/integrations/ebpf_socket.md
index 3d621f439..dc7a7d07b 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_socket.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_socket.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Socket"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -79,22 +80,25 @@ Metrics:
These metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.outbound_conn_v4 | a dimension per app group | connections/s |
-| apps.outbound_conn_v6 | a dimension per app group | connections/s |
-| apps.total_bandwidth_sent | a dimension per app group | kilobits/s |
-| apps.total_bandwidth_recv | a dimension per app group | kilobits/s |
-| apps.bandwidth_tcp_send | a dimension per app group | calls/s |
-| apps.bandwidth_tcp_recv | a dimension per app group | calls/s |
-| apps.bandwidth_tcp_retransmit | a dimension per app group | calls/s |
-| apps.bandwidth_udp_send | a dimension per app group | calls/s |
-| apps.bandwidth_udp_recv | a dimension per app group | calls/s |
-| services.net_conn_ipv4 | a dimension per systemd service | connections/s |
+| app.ebpf_call_tcp_v4_connection | connections | connections/s |
+| app.app.ebpf_call_tcp_v6_connection | connections | connections/s |
+| app.ebpf_sock_bytes_sent | bandwidth | kilobits/s |
+| app.ebpf_sock_bytes_received | bandwidth | kilobits/s |
+| app.ebpf_call_tcp_sendmsg | calls | calls/s |
+| app.ebpf_call_tcp_cleanup_rbuf | calls | calls/s |
+| app.ebpf_call_tcp_retransmit | calls | calls/s |
+| app.ebpf_call_udp_sendmsg | calls | calls/s |
+| app.ebpf_call_udp_recvmsg | calls | calls/s |
### Per cgroup
@@ -176,18 +180,18 @@ All options are defined inside section `[global]`. Options inside `network conne
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| bandwidth table size | Number of elements stored inside hash tables used to monitor calls per PID. | 16384 | False |
-| ipv4 connection table size | Number of elements stored inside hash tables used to monitor calls per IPV4 connections. | 16384 | False |
-| ipv6 connection table size | Number of elements stored inside hash tables used to monitor calls per IPV6 connections. | 16384 | False |
-| udp connection table size | Number of temporary elements stored inside hash tables used to monitor UDP connections. | 4096 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| bandwidth table size | Number of elements stored inside hash tables used to monitor calls per PID. | 16384 | no |
+| ipv4 connection table size | Number of elements stored inside hash tables used to monitor calls per IPV4 connections. | 16384 | no |
+| ipv6 connection table size | Number of elements stored inside hash tables used to monitor calls per IPV6 connections. | 16384 | no |
+| udp connection table size | Number of temporary elements stored inside hash tables used to monitor UDP connections. | 4096 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_softirq.md b/collectors/ebpf.plugin/integrations/ebpf_softirq.md
index 3a061368c..6a4312c6e 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_softirq.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_softirq.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF SoftIRQ"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -124,9 +125,9 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_swap.md b/collectors/ebpf.plugin/integrations/ebpf_swap.md
index 502cd5bce..ce2423f8d 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_swap.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_swap.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF SWAP"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -74,14 +75,18 @@ Metrics:
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.swap_read_call | a dimension per app group | calls/s |
-| apps.swap_write_call | a dimension per app group | calls/s |
+| app.ebpf_call_swap_readpage | a dimension per app group | calls/s |
+| app.ebpf_call_swap_writepage | a dimension per app group | calls/s |
### Per eBPF SWAP instance
@@ -147,15 +152,15 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_sync.md b/collectors/ebpf.plugin/integrations/ebpf_sync.md
index 024c3e30e..6f6c246a7 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_sync.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_sync.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF Sync"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -132,21 +133,21 @@ This configuration file have two different sections. The `[global]` overwrites a
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
-| sync | Enable or disable monitoring for syscall `sync` | yes | False |
-| msync | Enable or disable monitoring for syscall `msync` | yes | False |
-| fsync | Enable or disable monitoring for syscall `fsync` | yes | False |
-| fdatasync | Enable or disable monitoring for syscall `fdatasync` | yes | False |
-| syncfs | Enable or disable monitoring for syscall `syncfs` | yes | False |
-| sync_file_range | Enable or disable monitoring for syscall `sync_file_range` | yes | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
+| sync | Enable or disable monitoring for syscall `sync` | yes | no |
+| msync | Enable or disable monitoring for syscall `msync` | yes | no |
+| fsync | Enable or disable monitoring for syscall `fsync` | yes | no |
+| fdatasync | Enable or disable monitoring for syscall `fdatasync` | yes | no |
+| syncfs | Enable or disable monitoring for syscall `syncfs` | yes | no |
+| sync_file_range | Enable or disable monitoring for syscall `sync_file_range` | yes | no |
</details>
diff --git a/collectors/ebpf.plugin/integrations/ebpf_vfs.md b/collectors/ebpf.plugin/integrations/ebpf_vfs.md
index aa8d82caa..4b824e975 100644
--- a/collectors/ebpf.plugin/integrations/ebpf_vfs.md
+++ b/collectors/ebpf.plugin/integrations/ebpf_vfs.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugi
sidebar_label: "eBPF VFS"
learn_status: "Published"
learn_rel_path: "Data Collection/eBPF"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -117,25 +118,29 @@ Metrics:
These Metrics show grouped information per apps group.
-This scope has no labels.
+Labels:
+
+| Label | Description |
+|:-----------|:----------------|
+| app_group | The name of the group defined in the configuration. |
Metrics:
| Metric | Dimensions | Unit |
|:------|:----------|:----|
-| apps.file_deleted | a dimension per app group | calls/s |
-| apps.vfs_write_call | a dimension per app group | calls/s |
-| apps.vfs_write_error | a dimension per app group | calls/s |
-| apps.vfs_read_call | a dimension per app group | calls/s |
-| apps.vfs_read_error | a dimension per app group | calls/s |
-| apps.vfs_write_bytes | a dimension per app group | bytes/s |
-| apps.vfs_read_bytes | a dimension per app group | bytes/s |
-| apps.vfs_fsync | a dimension per app group | calls/s |
-| apps.vfs_fsync_error | a dimension per app group | calls/s |
-| apps.vfs_open | a dimension per app group | calls/s |
-| apps.vfs_open_error | a dimension per app group | calls/s |
-| apps.vfs_create | a dimension per app group | calls/s |
-| apps.vfs_create_error | a dimension per app group | calls/s |
+| app.ebpf_call_vfs_unlink | calls | calls/s |
+| app.ebpf_call_vfs_write | calls | calls/s |
+| app.ebpf_call_vfs_write_error | calls | calls/s |
+| app.ebpf_call_vfs_read | calls | calls/s |
+| app.ebpf_call_vfs_read_error | calls | calls/s |
+| app.ebpf_call_vfs_write_bytes | writes | bytes/s |
+| app.ebpf_call_vfs_read_bytes | reads | bytes/s |
+| app.ebpf_call_vfs_fsync | calls | calls/s |
+| app.ebpf_call_vfs_fsync_error | calls | calls/s |
+| app.ebpf_call_vfs_open | calls | calls/s |
+| app.ebpf_call_vfs_open_error | calls | calls/s |
+| app.ebpf_call_vfs_create | calls | calls/s |
+| app.ebpf_call_vfs_create_error | calls | calls/s |
@@ -189,15 +194,15 @@ All options are defined inside section `[global]`.
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 5 | False |
-| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | False |
-| apps | Enable or disable integration with apps.plugin | no | False |
-| cgroups | Enable or disable integration with cgroup.plugin | no | False |
-| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | False |
-| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | False |
-| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | False |
-| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | False |
-| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | False |
+| update every | Data collection frequency. | 5 | no |
+| ebpf load mode | Define whether plugin will monitor the call (`entry`) for the functions or it will also monitor the return (`return`). | entry | no |
+| apps | Enable or disable integration with apps.plugin | no | no |
+| cgroups | Enable or disable integration with cgroup.plugin | no | no |
+| pid table size | Number of elements stored inside hash tables used to monitor calls per PID. | 32768 | no |
+| ebpf type format | Define the file type to load an eBPF program. Three options are available: `legacy` (Attach only `kprobe`), `co-re` (Plugin tries to use `trampoline` when available), and `auto` (plugin check OS configuration before to load). | auto | no |
+| ebpf co-re tracing | Select the attach method used by plugin when `co-re` is defined in previous option. Two options are available: `trampoline` (Option with lowest overhead), and `probe` (the same of legacy code). | trampoline | no |
+| maps per core | Define how plugin will load their hash maps. When enabled (`yes`) plugin will load one hash table per core, instead to have centralized information. | yes | no |
+| lifetime | Set default lifetime for thread when enabled by cloud. | 300 | no |
</details>
diff --git a/collectors/ebpf.plugin/metadata.yaml b/collectors/ebpf.plugin/metadata.yaml
index 232326778..97b5df389 100644
--- a/collectors/ebpf.plugin/metadata.yaml
+++ b/collectors/ebpf.plugin/metadata.yaml
@@ -196,32 +196,34 @@ modules:
- name: close
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.file_open
+ - name: app.ebpf_file_open
description: Number of open files
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.file_open_error
+ - name: calls
+ - name: app.ebpf_file_open_error
description: Fails to open files
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.file_closed
+ - name: calls
+ - name: app.ebpf_file_closed
description: Files closed
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.file_close_error
+ - name: calls
+ - name: app.ebpf_file_close_error
description: Fails to close files
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: calls
- meta:
plugin_name: ebpf.plugin
module_name: processes
@@ -379,38 +381,40 @@ modules:
- name: task
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.process_create
+ - name: app.process_create
description: Process started
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.thread_create
+ - name: calls
+ - name: app.thread_create
description: Threads started
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.task_exit
+ - name: call
+ - name: app.task_exit
description: Tasks starts exit process
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.task_close
+ - name: call
+ - name: app.task_close
description: Tasks closed
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.task_error
+ - name: call
+ - name: app.task_error
description: Errors to create process or threads
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: app
- name: cgroup
description: "These Metrics show grouped information per cgroup/service."
labels: []
@@ -841,32 +845,34 @@ modules:
- name: miss
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.cachestat_ratio
+ - name: app.ebpf_cachestat_hit_ratio
description: Hit ratio
unit: "%"
chart_type: line
dimensions:
- - name: a dimension per app group
- - name: apps.cachestat_dirties
+ - name: ratio
+ - name: app.ebpf_cachestat_dirty_pages
description: Number of dirty pages
unit: "page/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.cachestat_hits
+ - name: pages
+ - name: app.ebpf_cachestat_access
description: Number of accessed files
unit: "hits/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.cachestat_misses
+ - name: hits
+ - name: app.ebpf_cachestat_misses
description: Files out of page cache
unit: "misses/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: misses
- name: cgroup
description: ""
labels: []
@@ -1076,27 +1082,27 @@ modules:
labels: []
metrics:
- name: mem.file_sync
- description: Monitor calls for <code>fsync(2)</code> and <code>fdatasync(2)</code>.
+ description: Monitor calls to fsync(2) and fdatasync(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- name: fsync
- name: fdatasync
- name: mem.meory_map
- description: Monitor calls for <code>msync(2)</code>.
+ description: Monitor calls to msync(2).
unit: "calls/s"
chart_type: line
dimensions:
- name: msync
- name: mem.sync
- description: Monitor calls for <code>sync(2)</code> and <code>syncfs(2)</code>.
+ description: Monitor calls to sync(2) and syncfs(2).
unit: "calls/s"
chart_type: line
dimensions:
- name: sync
- name: syncfs
- name: mem.file_segment
- description: Monitor calls for <code>sync_file_range(2)</code>.
+ description: Monitor calls to sync_file_range(2).
unit: "calls/s"
chart_type: line
dimensions:
@@ -1333,41 +1339,43 @@ modules:
labels: []
metrics:
- name: cgroup.swap_read
- description: Calls to function <code>swap_readpage</code>.
+ description: Calls to function swap_readpage.
unit: "calls/s"
chart_type: line
dimensions:
- name: read
- name: cgroup.swap_write
- description: Calls to function <code>swap_writepage</code>.
+ description: Calls to function swap_writepage.
unit: "calls/s"
chart_type: line
dimensions:
- name: write
- name: services.swap_read
- description: Calls to <code>swap_readpage</code>.
+ description: Calls to swap_readpage.
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per systemd service
- name: services.swap_write
- description: Calls to function <code>swap_writepage</code>.
+ description: Calls to function swap_writepage.
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per systemd service
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.swap_read_call
- description: Calls to function <code>swap_readpage</code>.
+ - name: app.ebpf_call_swap_readpage
+ description: Calls to function swap_readpage.
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per app group
- - name: apps.swap_write_call
- description: Calls to function <code>swap_writepage</code>.
+ - name: app.ebpf_call_swap_writepage
+ description: Calls to function swap_writepage.
unit: "calls/s"
chart_type: stacked
dimensions:
@@ -1501,14 +1509,16 @@ modules:
- name: a dimension per systemd service
- name: apps
description: "These metrics show cgroup/service that reached OOM."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.oomkills
+ - name: app.oomkill
description: OOM kills
unit: "kills"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: kills
- meta:
plugin_name: ebpf.plugin
module_name: socket
@@ -1713,68 +1723,64 @@ modules:
- name: send
- name: apps
description: "These metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.outbound_conn_v4
+ - name: app.ebpf_call_tcp_v4_connection
description: Calls to tcp_v4_connection
unit: "connections/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.outbound_conn_v6
+ - name: connections
+ - name: app.app.ebpf_call_tcp_v6_connection
description: Calls to tcp_v6_connection
unit: "connections/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.total_bandwidth_sent
+ - name: connections
+ - name: app.ebpf_sock_bytes_sent
description: Bytes sent
unit: "kilobits/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.total_bandwidth_recv
+ - name: bandwidth
+ - name: app.ebpf_sock_bytes_received
description: bytes received
unit: "kilobits/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.bandwidth_tcp_send
+ - name: bandwidth
+ - name: app.ebpf_call_tcp_sendmsg
description: Calls for tcp_sendmsg
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.bandwidth_tcp_recv
+ - name: calls
+ - name: app.ebpf_call_tcp_cleanup_rbuf
description: Calls for tcp_cleanup_rbuf
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.bandwidth_tcp_retransmit
+ - name: calls
+ - name: app.ebpf_call_tcp_retransmit
description: Calls for tcp_retransmit
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.bandwidth_udp_send
+ - name: calls
+ - name: app.ebpf_call_udp_sendmsg
description: Calls for udp_sendmsg
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.bandwidth_udp_recv
+ - name: calls
+ - name: app.ebpf_call_udp_recvmsg
description: Calls for udp_recvmsg
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: services.net_conn_ipv4
- description: Calls to tcp_v4_connection
- unit: "connections/s"
- chart_type: stacked
- dimensions:
- - name: a dimension per systemd service
+ - name: calls
- name: cgroup
description: ""
labels: []
@@ -2005,32 +2011,34 @@ modules:
scopes:
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.dc_ratio
+ - name: app.ebpf_dc_ratio
description: Percentage of files inside directory cache
unit: "%"
chart_type: line
dimensions:
- - name: a dimension per app group
- - name: apps.dc_reference
+ - name: ratio
+ - name: app.ebpf_dc_reference
description: Count file access
unit: "files"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.dc_not_cache
+ - name: files
+ - name: app.ebpf_dc_not_cache
description: Files not present inside directory cache
unit: "files"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.dc_not_found
+ - name: files
+ - name: app.ebpf_dc_not_found
description: Files not found
unit: "files"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: files
- name: filesystem
description: "These metrics show total number of calls to functions inside kernel."
labels: []
@@ -2409,81 +2417,83 @@ modules:
labels: []
metrics:
- name: cgroup.shmget
- description: Calls to syscall <code>shmget(2)</code>.
+ description: Calls to syscall shmget(2).
unit: "calls/s"
chart_type: line
dimensions:
- name: get
- name: cgroup.shmat
- description: Calls to syscall <code>shmat(2)</code>.
+ description: Calls to syscall shmat(2).
unit: "calls/s"
chart_type: line
dimensions:
- name: at
- name: cgroup.shmdt
- description: Calls to syscall <code>shmdt(2)</code>.
+ description: Calls to syscall shmdt(2).
unit: "calls/s"
chart_type: line
dimensions:
- name: dt
- name: cgroup.shmctl
- description: Calls to syscall <code>shmctl(2)</code>.
+ description: Calls to syscall shmctl(2).
unit: "calls/s"
chart_type: line
dimensions:
- name: ctl
- name: services.shmget
- description: Calls to syscall <code>shmget(2)</code>.
+ description: Calls to syscall shmget(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per systemd service
- name: services.shmat
- description: Calls to syscall <code>shmat(2)</code>.
+ description: Calls to syscall shmat(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per systemd service
- name: services.shmdt
- description: Calls to syscall <code>shmdt(2)</code>.
+ description: Calls to syscall shmdt(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per systemd service
- name: services.shmctl
- description: Calls to syscall <code>shmctl(2)</code>.
+ description: Calls to syscall shmctl(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- name: a dimension per systemd service
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.shmget_call
- description: Calls to syscall <code>shmget(2)</code>.
+ - name: app.ebpf_shmget_call
+ description: Calls to syscall shmget(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.shmat_call
- description: Calls to syscall <code>shmat(2)</code>.
+ - name: calls
+ - name: app.ebpf_shmat_call
+ description: Calls to syscall shmat(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.shmdt_call
- description: Calls to syscall <code>shmdt(2)</code>.
+ - name: calls
+ - name: app.ebpf_shmdt_call
+ description: Calls to syscall shmdt(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.shmctl_call
- description: Calls to syscall <code>shmctl(2)</code>.
+ - name: calls
+ - name: app.ebpf_shmctl_call
+ description: Calls to syscall shmctl(2).
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: calls
- name: global
description: "These Metrics show number of calls for specified syscall."
labels: []
@@ -2898,7 +2908,7 @@ modules:
dimensions:
- name: read
- name: cgroup.vfs_fsync
- description: Calls for <code>vfs_fsync</code>
+ description: Calls to vfs_fsync.
unit: "calls/s"
chart_type: line
dimensions:
@@ -2910,7 +2920,7 @@ modules:
dimensions:
- name: fsync
- name: cgroup.vfs_open
- description: Calls for <code>vfs_open</code>
+ description: Calls to vfs_open.
unit: "calls/s"
chart_type: line
dimensions:
@@ -2922,7 +2932,7 @@ modules:
dimensions:
- name: open
- name: cgroup.vfs_create
- description: Calls for <code>vfs_create</code>
+ description: Calls to vfs_create.
unit: "calls/s"
chart_type: line
dimensions:
@@ -2976,7 +2986,7 @@ modules:
dimensions:
- name: a dimension per systemd service
- name: services.vfs_fsync
- description: Calls to <code>vfs_fsync</code>
+ description: Calls to vfs_fsync.
unit: "calls/s"
chart_type: stacked
dimensions:
@@ -2988,7 +2998,7 @@ modules:
dimensions:
- name: a dimension per systemd service
- name: services.vfs_open
- description: Calls to <code>vfs_open</code>
+ description: Calls to vfs_open.
unit: "calls/s"
chart_type: stacked
dimensions:
@@ -3000,7 +3010,7 @@ modules:
dimensions:
- name: a dimension per systemd service
- name: services.vfs_create
- description: Calls to <code>vfs_create</code>
+ description: Calls to vfs_create.
unit: "calls/s"
chart_type: stacked
dimensions:
@@ -3043,7 +3053,7 @@ modules:
- name: read
- name: write
- name: filesystem.vfs_fsync
- description: Calls for <code>vfs_fsync</code>
+ description: Calls to vfs_fsync.
unit: "calls/s"
chart_type: line
dimensions:
@@ -3055,7 +3065,7 @@ modules:
dimensions:
- name: fsync
- name: filesystem.vfs_open
- description: Calls for <code>vfs_open</code>
+ description: Calls to vfs_open.
unit: "calls/s"
chart_type: line
dimensions:
@@ -3067,7 +3077,7 @@ modules:
dimensions:
- name: open
- name: filesystem.vfs_create
- description: Calls for <code>vfs_create</code>
+ description: Calls to vfs_create.
unit: "calls/s"
chart_type: line
dimensions:
@@ -3080,86 +3090,88 @@ modules:
- name: create
- name: apps
description: "These Metrics show grouped information per apps group."
- labels: []
+ labels:
+ - name: app_group
+ description: The name of the group defined in the configuration.
metrics:
- - name: apps.file_deleted
+ - name: app.ebpf_call_vfs_unlink
description: Files deleted
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_write_call
+ - name: calls
+ - name: app.ebpf_call_vfs_write
description: Write to disk
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_write_error
+ - name: calls
+ - name: app.ebpf_call_vfs_write_error
description: Fails to write
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_read_call
+ - name: calls
+ - name: app.ebpf_call_vfs_read
description: Read from disk
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_read_error
+ - name: calls
+ - name: app.ebpf_call_vfs_read_error
description: Fails to read
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_write_bytes
+ - name: calls
+ - name: app.ebpf_call_vfs_write_bytes
description: Bytes written on disk
unit: "bytes/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_read_bytes
+ - name: writes
+ - name: app.ebpf_call_vfs_read_bytes
description: Bytes read on disk
unit: "bytes/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_fsync
- description: Calls for <code>vfs_fsync</code>
+ - name: reads
+ - name: app.ebpf_call_vfs_fsync
+ description: Calls to vfs_fsync.
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_fsync_error
+ - name: calls
+ - name: app.ebpf_call_vfs_fsync_error
description: Sync error
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_open
- description: Calls for <code>vfs_open</code>
+ - name: calls
+ - name: app.ebpf_call_vfs_open
+ description: Calls to vfs_open.
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_open_error
+ - name: calls
+ - name: app.ebpf_call_vfs_open_error
description: Open error
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_create
- description: Calls for <code>vfs_create</code>
+ - name: calls
+ - name: app.ebpf_call_vfs_create
+ description: Calls to vfs_create.
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
- - name: apps.vfs_create_error
+ - name: calls
+ - name: app.ebpf_call_vfs_create_error
description: Create error
unit: "calls/s"
chart_type: stacked
dimensions:
- - name: a dimension per app group
+ - name: calls
- meta:
plugin_name: ebpf.plugin
module_name: process