diff options
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_oomkill.c')
-rw-r--r-- | collectors/ebpf.plugin/ebpf_oomkill.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/collectors/ebpf.plugin/ebpf_oomkill.c b/collectors/ebpf.plugin/ebpf_oomkill.c index f38801875..463a32904 100644 --- a/collectors/ebpf.plugin/ebpf_oomkill.c +++ b/collectors/ebpf.plugin/ebpf_oomkill.c @@ -377,6 +377,15 @@ void *ebpf_oomkill_thread(void *ptr) ebpf_module_t *em = (ebpf_module_t *)ptr; em->maps = oomkill_maps; + if (unlikely(!all_pids || !em->apps_charts)) { + // When we are not running integration with apps, we won't fill necessary variables for this thread to run, so + // we need to disable it. + if (em->enabled) + info("Disabling OOMKILL thread, because apps integration is completely disabled."); + + em->enabled = 0; + } + if (!em->enabled) { goto endoomkill; } |