Rename eBPF collector (#8822)

We renamed eBPF collector for a more meaningful name.
This commit is contained in:
thiagoftsm 2020-05-13 16:56:42 +00:00 committed by GitHub
parent 8d5db453b7
commit 18ec989b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 64 additions and 43 deletions

4
.gitignore vendored
View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -24,7 +24,7 @@ SUBDIRS = \
python.d.plugin \
slabinfo.plugin \
statsd.plugin \
ebpf_process.plugin \
ebpf.plugin \
tc.plugin \
$(NULL)

View File

@ -8,5 +8,6 @@ dist_noinst_DATA = \
$(NULL)
dist_libconfig_DATA = \
ebpf_process.conf \
$(NULL)
ebpf.conf \
$(NULL)

View File

@ -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]`

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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