diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2022-01-19 15:20:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 15:20:22 +0000 |
commit | 28ce8f4445394714077150ea1abc3de2a8a42c27 (patch) | |
tree | 021b78d22140a5600c094dd9960da8b9905de7ea /collectors/ebpf.plugin/ebpf_hardirq.c | |
parent | 521237bcc5cc6922c6c7899beb0ff4a6d4573ac3 (diff) |
eBPF plugin CO-RE and monitoring (#11992)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_hardirq.c')
-rw-r--r-- | collectors/ebpf.plugin/ebpf_hardirq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_hardirq.c b/collectors/ebpf.plugin/ebpf_hardirq.c index ff649e9cd9..25b2a0ec65 100644 --- a/collectors/ebpf.plugin/ebpf_hardirq.c +++ b/collectors/ebpf.plugin/ebpf_hardirq.c @@ -428,6 +428,7 @@ static void hardirq_collector(ebpf_module_t *em) pthread_mutex_lock(&lock); hardirq_create_charts(em->update_every); hardirq_create_static_dims(); + ebpf_update_stats(&plugin_statistics, em); pthread_mutex_unlock(&lock); // loop and read from published data until ebpf plugin is closed. @@ -480,14 +481,18 @@ void *ebpf_hardirq_thread(void *ptr) goto endhardirq; } - 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) { + em->enabled = CONFIG_BOOLEAN_NO; goto endhardirq; } hardirq_collector(em); endhardirq: + if (!em->enabled) + ebpf_update_disabled_plugin_stats(em); + netdata_thread_cleanup_pop(1); return NULL; |