@cryptotaxi247 / netdata-1 / commits / f7bbf9532

disabled tc plugin on non-linux systems; disabled checks plugins when not compiled with debugging

Costa Tsaousis (ktsaou) committed Oct 15, 2017 at 23:49 UTC f7bbf953255632a0834bc48243c52118db66dc22
1 file changed +15 -4
src/main.c
+15 -4
@@ -32,24 +32,34 @@ void netdata_cleanup_and_exit(int ret) {
32 }
33
34 struct netdata_static_thread static_threads[] = {
35 +
36 #ifdef INTERNAL_PLUGIN_NFACCT
36 -// nfacct requires root access
37 + // nfacct requires root access
38 // so, we build it as an external plugin with setuid to root
39 {"nfacct", CONFIG_SECTION_PLUGINS, "nfacct", 1, NULL, NULL, nfacct_main},
40 #endif
41
41 - {"tc", CONFIG_SECTION_PLUGINS, "tc", 1, NULL, NULL, tc_main},
42 - {"idlejitter", CONFIG_SECTION_PLUGINS, "idlejitter", 1, NULL, NULL, cpuidlejitter_main},
42 +#ifdef NETDATA_INTERNAL_CHECKS
43 + // debugging plugin
44 + {"check", CONFIG_SECTION_PLUGINS, "checks", 0, NULL, NULL, checks_main},
45 +#endif
46 +
47 #if defined(__FreeBSD__)
48 + // FreeBSD internal plugins
49 {"freebsd", CONFIG_SECTION_PLUGINS, "freebsd", 1, NULL, NULL, freebsd_main},
50 #elif defined(__APPLE__)
51 + // macOS internal plugins
52 {"macos", CONFIG_SECTION_PLUGINS, "macos", 1, NULL, NULL, macos_main},
53 #else
54 + // linux internal plugins
55 {"proc", CONFIG_SECTION_PLUGINS, "proc", 1, NULL, NULL, proc_main},
56 {"diskspace", CONFIG_SECTION_PLUGINS, "diskspace", 1, NULL, NULL, proc_diskspace_main},
57 {"cgroups", CONFIG_SECTION_PLUGINS, "cgroups", 1, NULL, NULL, cgroups_main},
58 + {"tc", CONFIG_SECTION_PLUGINS, "tc", 1, NULL, NULL, tc_main},
59 #endif /* __FreeBSD__, __APPLE__*/
52 - {"check", CONFIG_SECTION_PLUGINS, "checks", 0, NULL, NULL, checks_main},
60 +
61 + // common plugins for all systems
62 + {"idlejitter", CONFIG_SECTION_PLUGINS, "idlejitter", 1, NULL, NULL, cpuidlejitter_main},
63 {"backends", NULL, NULL, 1, NULL, NULL, backends_main},
64 {"health", NULL, NULL, 1, NULL, NULL, health_main},
65 {"plugins.d", NULL, NULL, 1, NULL, NULL, pluginsd_main},
@@ -57,6 +67,7 @@ struct netdata_static_thread static_threads[] = {
67 {"web-single-threaded", NULL, NULL, 0, NULL, NULL, socket_listen_main_single_threaded},
68 {"push-metrics", NULL, NULL, 0, NULL, NULL, rrdpush_sender_thread},
69 {"statsd", NULL, NULL, 1, NULL, NULL, statsd_main},
70 +
71 {NULL, NULL, NULL, 0, NULL, NULL, NULL}
72 };
73