@cryptotaxi247 / netdata-1 / commits / 18ec989b2

Rename eBPF collector (#8822)

We renamed eBPF collector for a more meaningful name.

thiagoftsm committed May 13, 2020 at 16:56 UTC 18ec989b21eb1c6cf1f736e27b6b89b1a3108b34
15 files changed +64 -43
.gitignore
+2 -2
@@ -66,8 +66,8 @@ slabinfo.plugin
66 cgroup-network
67 !cgroup-network/
68
69 -ebpf_process.plugin
70 -!ebpf_process.plugin/
69 +ebpf.plugin
70 +!ebpf.plugin/
71
72 # protoc generated files
73 *.pb.cc
CMakeLists.txt
+7 -7
@@ -408,7 +408,7 @@ set(SLABINFO_PLUGIN_FILES
408 )
409
410 set(EBPF_PROCESS_PLUGIN_FILES
411 - collectors/ebpf_process.plugin/ebpf_process.c
411 + collectors/ebpf.plugin/ebpf.c
412 )
413
414 set(PROC_PLUGIN_FILES
@@ -974,13 +974,13 @@ ENDIF()
974 # ebpf_process.plugin
975
976 IF(ENABLE_PLUGIN_EBPF)
977 - message(STATUS "ebpf_process.plugin: enabled")
978 - add_executable(ebpf_process.plugin config.h ${EBPF_PROCESS_PLUGIN_FILES})
979 - target_link_libraries (ebpf_process.plugin libnetdata ${NETDATA_COMMON_LIBRARIES})
980 - target_include_directories(ebpf_process.plugin PUBLIC ${NETDATA_COMMON_INCLUDE_DIRS})
981 - target_compile_options(ebpf_process.plugin PUBLIC ${NETDATA_COMMON_CFLAGS})
977 + message(STATUS "ebpf.plugin: enabled")
978 + add_executable(ebpf.plugin config.h ${EBPF_PROCESS_PLUGIN_FILES})
979 + target_link_libraries (ebpf.plugin libnetdata ${NETDATA_COMMON_LIBRARIES})
980 + target_include_directories(ebpf.plugin PUBLIC ${NETDATA_COMMON_INCLUDE_DIRS})
981 + target_compile_options(ebpf.plugin PUBLIC ${NETDATA_COMMON_CFLAGS})
982 ELSE()
983 - message(STATUS "ebpf_process.plugin: disabled")
983 + message(STATUS "ebpf.plugin: disabled")
984 ENDIF()
985
986
Makefile.am
+6 -6
@@ -265,9 +265,9 @@ PERF_PLUGIN_FILES = \
265 $(LIBNETDATA_FILES) \
266 $(NULL)
267
268 -EBPF_PROCESS_PLUGIN_FILES = \
269 - collectors/ebpf_process.plugin/ebpf_process.c \
270 - collectors/ebpf_process.plugin/ebpf_process.h \
268 +EBPF_PLUGIN_FILES = \
269 + collectors/ebpf.plugin/ebpf.c \
270 + collectors/ebpf.plugin/ebpf.h \
271 $(LIBNETDATA_FILES) \
272 $(NULL)
273
@@ -697,9 +697,9 @@ if ENABLE_PLUGIN_FREEIPMI
697 endif
698
699 if ENABLE_PLUGIN_EBPF
700 - plugins_PROGRAMS += ebpf_process.plugin
701 - ebpf_process_plugin_SOURCES = $(EBPF_PROCESS_PLUGIN_FILES)
702 - ebpf_process_plugin_LDADD = \
700 + plugins_PROGRAMS += ebpf.plugin
701 + ebpf_plugin_SOURCES = $(EBPF_PLUGIN_FILES)
702 + ebpf_plugin_LDADD = \
703 $(NETDATA_COMMON_LIBS) \
704 $(NULL)
705 endif
README.md
+2
@@ -236,6 +236,8 @@ Our new documentation experience is now available at **[Netdata Learn](https://l
236
237 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.
238
239 +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).
240 +
241 ---
242
243 See more news and previous releases at our [blog](https://blog.netdata.cloud) or our [releases
collectors/Makefile.am
+1 -1
@@ -24,7 +24,7 @@ SUBDIRS = \
24 python.d.plugin \
25 slabinfo.plugin \
26 statsd.plugin \
27 - ebpf_process.plugin \
27 + ebpf.plugin \
28 tc.plugin \
29 $(NULL)
30
collectors/ebpf.plugin/Makefile.am renamed
+3 -2
@@ -8,5 +8,6 @@ dist_noinst_DATA = \
8 $(NULL)
9
10 dist_libconfig_DATA = \
11 - ebpf_process.conf \
12 - $(NULL)
\ No newline at end of file
11 + ebpf.conf \
12 + $(NULL)
13 +
collectors/ebpf.plugin/README.md renamed
+7 -8
@@ -1,8 +1,7 @@
1 <!--
2 ---
3 title: "eBPF monitoring with Netdata"
4 -custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/ebpf_process.plugin/README.md
5 -sidebar_label: "eBPF"
4 +custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/ebpf.plugin/README.md
5 ---
6 -->
7
@@ -87,18 +86,18 @@ This process will not overwrite any changes you made to configuration files.
86 ### Edit `netdata.conf` to enable the collector
87
88 After installing Netdata with the `--enable-ebpf` option, you still need to enable the plugin explicitly. To do so, use
90 -`edit-config` to open `netdata.conf` and set `ebpf_process = yes` in the `[plugins]` section.
89 +`edit-config` to open `netdata.conf` and set `ebpf = yes` in the `[plugins]` section.
90
91 ```bash
92 cd /etc/netdata/ # Replace with your Netdata configuration directory, if not /etc/netdata/
93 ./edit-config netdata.conf
94 ```
95
97 -Scroll down to the `[plugins]` section and uncomment the `ebpf_process` line after changing its setting to `yes`.
96 +Scroll down to the `[plugins]` section and uncomment the `ebpf` line after changing its setting to `yes`.
97
98 ```conf
99 [plugins]
101 - ebpf_process = yes
100 + ebpf = yes
101 ```
102
103 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.
105
106 ## Charts
107
109 -The first version of `ebpf_process.plugin` gives a general vision about process running on computer. The charts related
108 +The first version of `ebpf.plugin` gives a general vision about process running on computer. The charts related
109 to this plugin are inside the **eBPF** option on dashboard menu and divided in three groups `file`, `vfs`, and
110 `process`.
111
@@ -180,14 +179,14 @@ process and thread creation.
179 ## Configuration
180
181 This plugin has different configuration modes, all of which can be adjusted with its configuration file at
183 -`ebpf_process.conf`. By default, the plugin uses the less expensive `entry` mode. You can learn more about how the
182 +`ebpf.conf`. By default, the plugin uses the less expensive `entry` mode. You can learn more about how the
183 plugin works using `entry` by reading this configuration file.
184
185 You can always edit this file with `edit-config`:
186
187 ```bash
188 cd /etc/netdata/ # Replace with your Netdata configuration directory, if not /etc/netdata/
190 -./edit-config ebpf_process.conf
189 +./edit-config ebpf.conf
190 ```
191
192 ### `[global]`
collectors/ebpf.plugin/ebpf.c renamed
+3 -3
@@ -3,7 +3,7 @@
3 #include <sys/time.h>
4 #include <sys/resource.h>
5
6 -#include "ebpf_process.h"
6 +#include "ebpf.h"
7
8 // callback required by eval()
9 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() {
857 static int load_collector_file(char *path) {
858 char lpath[4096];
859
860 - build_complete_path(lpath, 4096, path, "ebpf_process.conf" );
860 + build_complete_path(lpath, 4096, path, "ebpf.conf" );
861
862 if (!appconfig_load(&collector_config, lpath, 0, NULL))
863 return 1;
@@ -1055,7 +1055,7 @@ int main(int argc, char **argv)
1055 }
1056
1057 //set name
1058 - program_name = "ebpf_process.plugin";
1058 + program_name = "ebpf.plugin";
1059
1060 //disable syslog
1061 error_log_syslog = 0;
collectors/ebpf.plugin/ebpf.conf renamed
collectors/ebpf.plugin/ebpf.h renamed
collectors/plugins.d/plugins_d.c
+1 -1
@@ -830,7 +830,7 @@ void *pluginsd_main(void *ptr) {
830
831 // disable some plugins by default
832 config_get_boolean(CONFIG_SECTION_PLUGINS, "slabinfo", CONFIG_BOOLEAN_NO);
833 - config_get_boolean(CONFIG_SECTION_PLUGINS, "ebpf_process", CONFIG_BOOLEAN_NO);
833 + config_get_boolean(CONFIG_SECTION_PLUGINS, "ebpf", CONFIG_BOOLEAN_NO);
834
835 // store the errno for each plugins directory
836 // so that we don't log broken directories on each loop
configure.ac
+7 -7
@@ -929,16 +929,16 @@ AC_MSG_RESULT([${enable_plugin_perf}])
929 AM_CONDITIONAL([ENABLE_PLUGIN_PERF], [test "${enable_plugin_perf}" = "yes"])
930
931 # -----------------------------------------------------------------------------
932 -# ebpf_process.plugin
932 +# ebpf.plugin
933
934 -AC_MSG_CHECKING([if ebpf_process.plugin should be enabled])
934 +AC_MSG_CHECKING([if ebpf.plugin should be enabled])
935 if test "${build_target}" == "linux" -a "${EBPF_LIBS}"; then
936 - enable_vfs="yes"
936 + enable_ebpf="yes"
937 else
938 - enable_vfs="no"
938 + enable_ebpf="no"
939 fi
940 -AC_MSG_RESULT([${enable_vfs}])
941 -AM_CONDITIONAL([ENABLE_PLUGIN_EBPF], [test "${enable_vfs}" = "yes"])
940 +AC_MSG_RESULT([${enable_ebpf}])
941 +AM_CONDITIONAL([ENABLE_PLUGIN_EBPF], [test "${enable_ebpf}" = "yes"])
942
943 # -----------------------------------------------------------------------------
944 # slabinfo.plugin
@@ -1358,7 +1358,7 @@ AC_CONFIG_FILES([
1358 collectors/python.d.plugin/Makefile
1359 collectors/slabinfo.plugin/Makefile
1360 collectors/statsd.plugin/Makefile
1361 - collectors/ebpf_process.plugin/Makefile
1361 + collectors/ebpf.plugin/Makefile
1362 collectors/tc.plugin/Makefile
1363 collectors/xenstat.plugin/Makefile
1364 collectors/perf.plugin/Makefile
docs/generator/buildyaml.sh
+1 -1
@@ -214,7 +214,7 @@ echo -ne "
214 - 'collectors/COLLECTORS.md'
215 - 'collectors/REFERENCE.md'
216 - Internal plugins:
217 - - eBPF metrics: collectors/ebpf_process.plugin/README.md
217 + - eBPF metrics: collectors/ebpf.plugin/README.md
218 "
219
220 navpart 3 collectors/proc.plugin
netdata-installer.sh
+22 -3
@@ -1067,9 +1067,9 @@ if [ "${UID}" -eq 0 ]; then
1067 run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ioping"
1068 fi
1069
1070 - if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" ]; then
1071 - run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin"
1072 - run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin"
1070 + if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf.plugin" ]; then
1071 + run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf.plugin"
1072 + run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf.plugin"
1073 fi
1074
1075 if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" ]; then
@@ -1386,11 +1386,30 @@ should_install_ebpf() {
1386 return 0
1387 }
1388
1389 +remove_old_ebpf() {
1390 + if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin" ]; then
1391 + echo >&2 "Removing alpha eBPF collector."
1392 + rm -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ebpf_process.plugin"
1393 + fi
1394 +
1395 + if [ -f "${NETDATA_PREFIX}/usr/lib/netdata/conf.d/ebpf_process.conf" ]; then
1396 + echo >&2 "Removing alpha eBPF stock file"
1397 + rm -f "${NETDATA_PREFIX}/usr/lib/netdata/conf.d/ebpf_process.conf"
1398 + fi
1399 +
1400 + if [ -f "${NETDATA_PREFIX}/etc/netdata/ebpf_process.conf" ]; then
1401 + echo >&2 "Renaming eBPF configuration file."
1402 + mv "${NETDATA_PREFIX}/etc/netdata/ebpf_process.conf" "${NETDATA_PREFIX}/etc/netdata/ebpf.conf"
1403 + fi
1404 +}
1405 +
1406 install_ebpf() {
1407 if ! should_install_ebpf; then
1408 return 0
1409 fi
1410
1411 + remove_old_ebpf
1412 +
1413 progress "Installing eBPF plugin"
1414
1415 # Get and Parse Kernel Version
netdata.spec.in
+2 -2
@@ -279,8 +279,8 @@ install -m 4750 -p apps.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.
279 install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/perf.plugin"
280
281 # ###########################################################
282 -# Install ebpf_process.plugin
283 -install -m 4750 -p ebpf_process.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf_process.plugin"
282 +# Install ebpf.plugin
283 +install -m 4750 -p ebpf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf.plugin"
284
285 # ###########################################################
286 # Install cups.plugin