summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_dcstat.c
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2022-01-19 15:20:22 +0000
committerGitHub <noreply@github.com>2022-01-19 15:20:22 +0000
commit28ce8f4445394714077150ea1abc3de2a8a42c27 (patch)
tree021b78d22140a5600c094dd9960da8b9905de7ea /collectors/ebpf.plugin/ebpf_dcstat.c
parent521237bcc5cc6922c6c7899beb0ff4a6d4573ac3 (diff)
eBPF plugin CO-RE and monitoring (#11992)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_dcstat.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_dcstat.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_dcstat.c b/collectors/ebpf.plugin/ebpf_dcstat.c
index 7ae821889e..820e24e39a 100644
--- a/collectors/ebpf.plugin/ebpf_dcstat.c
+++ b/collectors/ebpf.plugin/ebpf_dcstat.c
@@ -964,9 +964,10 @@ void *ebpf_dcstat_thread(void *ptr)
pthread_mutex_lock(&lock);
- probe_links = ebpf_load_program(ebpf_plugin_dir, em, kernel_string, &objects);
+ probe_links = ebpf_load_program(ebpf_plugin_dir, em, running_on_kernel, isrh, &objects);
if (!probe_links) {
pthread_mutex_unlock(&lock);
+ em->enabled = CONFIG_BOOLEAN_NO;
goto enddcstat;
}
@@ -980,11 +981,16 @@ void *ebpf_dcstat_thread(void *ptr)
algorithms, NETDATA_DCSTAT_IDX_END);
ebpf_create_filesystem_charts(em->update_every);
+ ebpf_update_stats(&plugin_statistics, em);
+
pthread_mutex_unlock(&lock);
dcstat_collector(em);
enddcstat:
+ if (!em->enabled)
+ ebpf_update_disabled_plugin_stats(em);
+
netdata_thread_cleanup_pop(1);
return NULL;
}