diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | collectors/Makefile.am | 2 | ||||
-rw-r--r-- | collectors/ebpf.plugin/Makefile.am (renamed from collectors/ebpf_process.plugin/Makefile.am) | 5 | ||||
-rw-r--r-- | collectors/ebpf.plugin/README.md (renamed from collectors/ebpf_process.plugin/README.md) | 15 | ||||
-rw-r--r-- | collectors/ebpf.plugin/ebpf.c (renamed from collectors/ebpf_process.plugin/ebpf_process.c) | 6 | ||||
-rw-r--r-- | collectors/ebpf.plugin/ebpf.conf (renamed from collectors/ebpf_process.plugin/ebpf_process.conf) | 0 | ||||
-rw-r--r-- | collectors/ebpf.plugin/ebpf.h (renamed from collectors/ebpf_process.plugin/ebpf_process.h) | 0 | ||||
-rw-r--r-- | collectors/plugins.d/plugins_d.c | 2 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rwxr-xr-x | docs/generator/buildyaml.sh | 2 | ||||
-rwxr-xr-x | netdata-installer.sh | 25 | ||||
-rw-r--r-- | netdata.spec.in | 4 |
15 files changed, 64 insertions, 43 deletions
diff --git a/.gitignore b/.gitignore index b9991bff00..db056ef1be 100644 --- a/.gitignore +++ b/.gitignore @@ -66,8 +66,8 @@ slabinfo.plugin cgroup-network !cgroup-network/ -ebpf_process.plugin -!ebpf_process.plugin/ +ebpf.plugin +!ebpf.plugin/ # protoc generated files *.pb.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index ca0ab99946..e14e99ecbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -408,7 +408,7 @@ set(SLABINFO_PLUGIN_FILES ) set(EBPF_PROCESS_PLUGIN_FILES - collectors/ebpf_process.plugin/ebpf_process.c + collectors/ebpf.plugin/ebpf.c ) set(PROC_PLUGIN_FILES @@ -974,13 +974,13 @@ ENDIF() # ebpf_process.plugin IF(ENABLE_PLUGIN_EBPF) - message(STATUS "ebpf_process.plugin: enabled") - add_executable(ebpf_process.plugin config.h ${EBPF_PROCESS_PLUGIN_FILES}) - target_link_libraries (ebpf_process.plugin libnetdata ${NETDATA_COMMON_LIBRARIES}) - target_include_directories(ebpf_process.plugin PUBLIC ${NETDATA_COMMON_INCLUDE_DIRS}) - target_compile_options(ebpf_process.plugin PUBLIC ${NETDATA_COMMON_CFLAGS}) + message(STATUS "ebpf.plugin: enabled") + add_executable(ebpf.plugin config.h ${EBPF_PROCESS_PLUGIN_FILES}) + target_link_libraries (ebpf.plugin libnetdata ${NETDATA_COMMON_LIBRARIES}) + target_include_directories(ebpf.plugin PUBLIC ${NETDATA_COMMON_INCLUDE_DIRS}) + target_compile_options(ebpf.plugin PUBLIC ${NETDATA_COMMON_CFLAGS}) ELSE() - message(STATUS "ebpf_process.plugin: disabled") + message(STATUS "ebpf.plugin: disabled") ENDIF() diff --git a/Makefile.am b/Makefile.am index e39875eae3..298d4550bf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -265,9 +265,9 @@ PERF_PLUGIN_FILES = \ $(LIBNETDATA_FILES) \ $(NULL) -EBPF_PROCESS_PLUGIN_FILES = \ - collectors/ebpf_process.plugin/ebpf_process.c \ - collectors/ebpf_process.plugin/ebpf_process.h \ +EBPF_PLUGIN_FILES = \ + collectors/ebpf.plugin/ebpf.c \ + collectors/ebpf.plugin/ebpf.h \ $(LIBNETDATA_FILES) \ $(NULL) @@ -697,9 +697,9 @@ if ENABLE_PLUGIN_FREEIPMI endif if ENABLE_PLUGIN_EBPF - plugins_PROGRAMS += ebpf_process.plugin - ebpf_process_plugin_SOURCES = $(EBPF_PROCESS_PLUGIN_FILES) - ebpf_process_plugin_LDADD = \ + plugins_PROGRAMS += ebpf.plugin + ebpf_plugin_SOURCES = $(EBPF_PLUGIN_FILES) + ebpf_plugin_LDADD = \ $(NETDATA_COMMON_LIBS) \ $(NULL) endif @@ -236,6 +236,8 @@ Our new documentation experience is now available at **[Netdata Learn](https://l While Learn only features documentation for now, we plan on releasing more types of educational content serving the Agent's open-source community of developers, sysadmins, and DevOps folks. We'll have more to announce soon, but in the meantime, we hope you enjoy what we believe is a smoother (and prettier) docs experience. +As part of the ongoing work to polish our **eBPF collector tech preview**, we've now proven the collector's performance is very good, and have vastly expanded the number of operating system versions the collector works on. Learn how to [enable it](https://docs.netdata.cloud/collectors/ebpf.plugin/) in our documentation. We've also extensively stress-tested the eBPF collector and found that it's impressively fast given the depth of metrics it collects! Read up on our benchmarking analysis [on GitHub](https://github.com/netdata/netdata/issues/8195). + --- See more news and previous releases at our [blog](https://blog.netdata.cloud) or our [releases diff --git a/collectors/Makefile.am b/collectors/Makefile.am index 9bb5295813..460612c685 100644 --- a/collectors/Makefile.am +++ b/collectors/Makefile.am @@ -24,7 +24,7 @@ SUBDIRS = \ python.d.plugin \ slabinfo.plugin \ statsd.plugin \ - ebpf_process.plugin \ + ebpf.plugin \ tc.plugin \ $(NULL) diff --git a/collectors/ebpf_process.plugin/Makefile.am b/collectors/ebpf.plugin/Makefile.am index efb1a97094..719c236367 100644 --- a/collectors/ebpf_process.plugin/Makefile.am +++ b/collectors/ebpf.plugin/Makefile.am @@ -8,5 +8,6 @@ dist_noinst_DATA = \ $(NULL) dist_libconfig_DATA = \ - ebpf_process.conf \ - $(NULL)
\ No newline at end of file + ebpf.conf \ + $(NULL) + diff --git a/collectors/ebpf_process.plugin/README.md b/collectors/ebpf.plugin/README.md index cadac9344d..bf00cac167 100644 --- a/collectors/ebpf_process.plugin/README.md +++ b/collectors/ebpf.plugin/README.md @@ -1,8 +1,7 @@ <!-- --- title: "eBPF monitoring with Netdata" -custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/ebpf_process.plugin/README.md -sidebar_label: "eBPF" +custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugin/README.md --- --> @@ -87,18 +86,18 @@ This process will not overwrite any changes you made to configuration files. ### Edit `netdata.conf` to enable the collector After installing Netdata with the `--enable-ebpf` option, you still need to enable the plugin explicitly. To do so, use -`edit-config` to open `netdata.conf` and set `ebpf_process = yes` in the `[plugins]` section. +`edit-config` to open `netdata.conf` and set `ebpf = yes` in the `[plugins]` section. ```bash cd /etc/netdata/ # Replace with your Netdata configuration directory, if not /etc/netdata/ ./edit-config netdata.conf ``` -Scroll down to the `[plugins]` section and uncomment the `ebpf_process` line after changing its setting to `yes`. +Scroll down to the `[plugins]` section and uncomment the `ebpf` line after changing its setting to `yes`. ```conf [plugins] - ebpf_process = yes + ebpf = yes ``` Restart Netdata with `service netdata restart`, or the appropriate method for your system, and reload your browser to @@ -106,7 +105,7 @@ see eBPF charts. ## Charts -The first version of `ebpf_process.plugin` gives a general vision about process running on computer. The charts related +The first version of `ebpf.plugin` gives a general vision about process running on computer. The charts related to this plugin are inside the **eBPF** option on dashboard menu and divided in three groups `file`, `vfs`, and `process`. @@ -180,14 +179,14 @@ process and thread creation. ## Configuration This plugin has different configuration modes, all of which can be adjusted with its configuration file at -`ebpf_process.conf`. By default, the plugin uses the less expensive `entry` mode. You can learn more about how the +`ebpf.conf`. By default, the plugin uses the less expensive `entry` mode. You can learn more about how the plugin works using `entry` by reading this configuration file. You can always edit this file with `edit-config`: ```bash cd /etc/netdata/ # Replace with your Netdata configuration directory, if not /etc/netdata/ -./edit-config ebpf_process.conf +./edit-config ebpf.conf ``` ### `[global]` diff --git a/collectors/ebpf_process.plugin/ebpf_process.c b/collectors/ebpf.plugin/ebpf.c index 267b1da3ea..b3fa7f71bf 100644 --- a/collectors/ebpf_process.plugin/ebpf_process.c +++ b/collectors/ebpf.plugin/ebpf.c @@ -3,7 +3,7 @@ #include <sys/time.h> #include <sys/resource.h> -#include "ebpf_process.h" +#include "ebpf.h" // callback required by eval() int health_variable_lookup(const char *variable, uint32_t hash, struct rrdcalc *rc, calculated_number *result) { @@ -857,7 +857,7 @@ static void set_global_values() { static int load_collector_file(char *path) { char lpath[4096]; - build_complete_path(lpath, 4096, path, "ebpf_process.conf" ); + build_complete_path(lpath, 4096, path, "ebpf.conf" ); if (!appconfig_load(&collector_config, lpath, 0, NULL)) return 1; @@ -1055,7 +1055,7 @@ int main(int argc, char **argv) } //set name - program_name = "ebpf_process.plugin"; + program_name = "ebpf.plugin"; //disable syslog error_log_syslog = 0; diff --git a/collectors/ebpf_process.plugin/ebpf_process.conf b/collectors/ebpf.plugin/ebpf.conf index 88d7050c7b..88d7050c7b 100644 --- a/collectors/ebpf_process.plugin/ebpf_process.conf +++ b/collectors/ebpf.plugin/ebpf.conf diff --git a/collectors/ebpf_process.plugin/ebpf_process.h b/collectors/ebpf.plugin/ebpf.h index 5f05389e02..5f05389e02 100644 --- a/collectors/ebpf_process.plugin/ebpf_process.h +++ b/collectors/ebpf.plugin/ebpf.h diff --git a/collectors/plugins.d/plugins_d.c b/collectors/plugins.d/plugins_d.c index 3e8290b3d2..c29fac5fa9 100644 --- a/collectors/plugins.d/plugins_d.c +++ b/collectors/plugins.d/plugins_d.c @@ -830,7 +830,7 @@ void *pluginsd_main(void *ptr) { // disable some plugins by default config_get_boolean(CONFIG_SECTION_PLUGINS, "slabinfo", CONFIG_BOOLEAN_NO); - config_get_boolean(CONFIG_SECTION_PLUGINS, "ebpf_process", CONFIG_BOOLEAN_NO); + config_get_boolean(CONFIG_SECTION_PLUGINS, "ebpf", CONFIG_BOOLEAN_NO); // store the errno for each plugins directory // so that we don't log broken directories on each loop diff --git a/configure.ac b/configure.ac index 28781c8f49..488dc487c7 100644 --- a/configure.ac +++ b/configure.ac @@ -929,16 +929,16 @@ AC_MSG_RESULT([${enable_plugin_perf}]) AM_CONDITIONAL([ENABLE_PLUGIN_PERF], [test "${enable_plugin_perf}" = "yes"]) # ----------------------------------------------------------------------------- -# ebpf_process.plugin +# ebpf.plugin -AC_MSG_CHECKING([if ebpf_process.plugin should be enabled]) +AC_MSG_CHECKING([if ebpf.plugin should be enabled]) if test "${build_target}" == "linux" -a "${EBPF_LIBS}"; then - enable_vfs="yes" + enable_ebpf="yes" else - enable_vfs="no" + enable_ebpf="no" fi -AC_MSG_RESULT([${enable_vfs}]) -AM_CONDITIONAL([ENABLE_PLUGIN_EBPF], [test "${enable_vfs}" = "yes"]) +AC_MSG_RESULT([${enable_ebpf}]) +AM_CONDITIONAL([ENABLE_PLUGIN_EBPF], [test "${enable_ebpf}" = "yes"]) # ----------------------------------------------------------------------------- # slabinfo.plugin @@ -1358,7 +1358,7 @@ AC_CONFIG_FILES([ collectors/python.d.plugin/Makefile collectors/slabinfo.plugin/Makefile collectors/statsd.plugin/Makefile - collectors/ebpf_process.plugin/Makefile + collectors/ebpf.plugin/Makefile collectors/tc.plugin/Makefile collectors/xenstat.plugin/Makefile collectors/perf.plugin/Makefile diff --git a/docs/generator/buildyaml.sh b/docs/generator/buildyaml.sh index 5fa77509d3..6d188d4295 100755 --- a/docs/generator/buildyaml.sh +++ b/docs/generator/buildyaml.sh @@ -214,7 +214,7 @@ echo -ne " - 'collectors/COLLECTORS.md' - 'collectors/REFERENCE.md' - Internal plugins: - - eBPF metrics: collectors/ebpf_process.plugin/README.md + - eBPF metrics: collectors/ebpf.plugin/README.md " navpart 3 collectors/proc.plugin diff --git a/netdata-installer.sh b/netdata-installer.sh index d000bc6397..382ea92624 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -1067,9 +1067,9 @@ if [ "${UID}" -eq 0 ]; then run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ioping" fi - if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" ]; then - run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" - run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" + if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf.plugin" ]; then + run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf.plugin" + run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf.plugin" fi if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" ]; then @@ -1386,11 +1386,30 @@ should_install_ebpf() { return 0 } +remove_old_ebpf() { + if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" ]; then + echo >&2 "Removing alpha eBPF collector." + rm -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" + fi + + if [ -f "${NETDATA_PREFIX}/usr/lib/netdata/conf.d/ebpf_process.conf" ]; then + echo >&2 "Removing alpha eBPF stock file" + rm -f "${NETDATA_PREFIX}/usr/lib/netdata/conf.d/ebpf_process.conf" + fi + + if [ -f "${NETDATA_PREFIX}/etc/netdata/ebpf_process.conf" ]; then + echo >&2 "Renaming eBPF configuration file." + mv "${NETDATA_PREFIX}/etc/netdata/ebpf_process.conf" "${NETDATA_PREFIX}/etc/netdata/ebpf.conf" + fi +} + install_ebpf() { if ! should_install_ebpf; then return 0 fi + remove_old_ebpf + progress "Installing eBPF plugin" # Get and Parse Kernel Version diff --git a/netdata.spec.in b/netdata.spec.in index 5c8e1a6f08..6685d0db3d 100644 --- a/netdata.spec.in +++ b/netdata.spec.in @@ -279,8 +279,8 @@ install -m 4750 -p apps.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins. install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/perf.plugin" # ########################################################### -# Install ebpf_process.plugin -install -m 4750 -p ebpf_process.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf_process.plugin" +# Install ebpf.plugin +install -m 4750 -p ebpf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf.plugin" # ########################################################### # Install cups.plugin |