summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_cachestat.c
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_cachestat.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_cachestat.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_cachestat.c b/collectors/ebpf.plugin/ebpf_cachestat.c
index 7ba8c01ae..0cc16234b 100644
--- a/collectors/ebpf.plugin/ebpf_cachestat.c
+++ b/collectors/ebpf.plugin/ebpf_cachestat.c
@@ -985,12 +985,15 @@ void *ebpf_cachestat_thread(void *ptr)
pthread_mutex_lock(&lock);
ebpf_cachestat_allocate_global_vectors(em->apps_charts);
- 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 endcachestat;
}
+ ebpf_update_stats(&plugin_statistics, em);
+
int algorithms[NETDATA_CACHESTAT_END] = {
NETDATA_EBPF_ABSOLUTE_IDX, NETDATA_EBPF_INCREMENTAL_IDX, NETDATA_EBPF_ABSOLUTE_IDX, NETDATA_EBPF_ABSOLUTE_IDX
};
@@ -1006,6 +1009,9 @@ void *ebpf_cachestat_thread(void *ptr)
cachestat_collector(em);
endcachestat:
+ if (!em->enabled)
+ ebpf_update_disabled_plugin_stats(em);
+
netdata_thread_cleanup_pop(1);
return NULL;
}