summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2024-04-25 09:21:03 +0300
committerGitHub <noreply@github.com>2024-04-25 09:21:03 +0300
commit9b3b4816c16fd2359d61dbdfa12366e8b294e135 (patch)
treea0e45a7fa4766becb5a3bd7380ae44686969a52a /CMakeLists.txt
parent0388cb719ea3c881ad6da0c93fe6ff95d1fded3c (diff)
Move handling of legacy eBPF programs into CMake. (#17512)
* Move handling of legacy eBPF programs into CMake. * Fix typos. * Fix more typos * Fix up packaging code.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67a0a20896..2d5372c83e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,6 +119,8 @@ option(ENABLE_PLUGIN_CGROUP_NETWORK "Enable Linux CGroup network usage monitorin
option(ENABLE_PLUGIN_CUPS "Enable CUPS monitoring" ${DEFAULT_FEATURE_STATE})
option(ENABLE_PLUGIN_DEBUGFS "Enable Linux DebugFS metric collection" ${DEFAULT_FEATURE_STATE})
option(ENABLE_PLUGIN_EBPF "Enable Linux eBPF metric collection" ${DEFAULT_FEATURE_STATE})
+cmake_dependent_option(ENABLE_LEGACY_EBPF_PROGRAMS "Enable eBPF programs for kernels without BTF support" True ENABLE_PLUGIN_EBPF False)
+mark_as_advanced(ENABLE_LEGACY_EBPF_PROGRAMS)
option(ENABLE_PLUGIN_FREEIPMI "Enable IPMI monitoring" ${DEFAULT_FEATURE_STATE})
option(ENABLE_PLUGIN_GO "Enable metric collectors written in Go" ${DEFAULT_FEATURE_STATE})
option(ENABLE_PLUGIN_LOCAL_LISTENERS "Enable local listening socket tracking (including service auto-discovery support)" ${DEFAULT_FEATURE_STATE})
@@ -299,6 +301,10 @@ endif()
include(NetdataJSONC)
include(NetdataYAML)
+if(ENABLE_LEGACY_EBPF_PROGRAMS)
+ include(NetdataEBPFLegacy)
+endif()
+
if(ENABLE_SENTRY)
include(NetdataSentry)
endif()
@@ -310,6 +316,10 @@ endif()
netdata_detect_jsonc()
netdata_detect_libyaml()
+if(ENABLE_LEGACY_EBPF_PROGRAMS)
+ netdata_fetch_legacy_ebpf_code()
+endif()
+
if(ENABLE_SENTRY)
netdata_bundle_sentry()
endif()
@@ -1936,6 +1946,10 @@ if(ENABLE_PLUGIN_EBPF)
install(TARGETS ebpf.plugin
COMPONENT ebpf_plugin
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(ENABLE_LEGACY_EBPF_PROGRAMS)
+ netdata_install_legacy_ebpf_code()
+ endif()
endif()
if(ENABLE_PLUGIN_LOCAL_LISTENERS)