diff options
Diffstat (limited to 'daemon/main.c')
-rw-r--r-- | daemon/main.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/daemon/main.c b/daemon/main.c index 2ec5c33f..7c8e09a5 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -2,10 +2,13 @@ #include "common.h" #include "buildinfo.h" +#include "static_threads.h" int netdata_zero_metrics_enabled; int netdata_anonymous_statistics_enabled; +struct netdata_static_thread *static_threads; + struct config netdata_config = { .first_section = NULL, .last_section = NULL, @@ -76,41 +79,6 @@ void netdata_cleanup_and_exit(int ret) { exit(ret); } -struct netdata_static_thread static_threads[] = { - NETDATA_PLUGIN_HOOK_GLOBAL_STATISTICS - - NETDATA_PLUGIN_HOOK_CHECKS - NETDATA_PLUGIN_HOOK_FREEBSD - NETDATA_PLUGIN_HOOK_MACOS - - // linux internal plugins - NETDATA_PLUGIN_HOOK_LINUX_PROC - NETDATA_PLUGIN_HOOK_LINUX_DISKSPACE - NETDATA_PLUGIN_HOOK_LINUX_TIMEX - NETDATA_PLUGIN_HOOK_LINUX_CGROUPS - NETDATA_PLUGIN_HOOK_LINUX_TC - - NETDATA_PLUGIN_HOOK_IDLEJITTER - NETDATA_PLUGIN_HOOK_STATSD - -#if defined(ENABLE_ACLK) || defined(ACLK_NG) - NETDATA_ACLK_HOOK -#endif - - // common plugins for all systems - {"BACKENDS", NULL, NULL, 1, NULL, NULL, backends_main}, - {"EXPORTING", NULL, NULL, 1, NULL, NULL, exporting_main}, - {"WEB_SERVER[static1]", NULL, NULL, 0, NULL, NULL, socket_listen_main_static_threaded}, - {"STREAM", NULL, NULL, 0, NULL, NULL, rrdpush_sender_thread}, - - NETDATA_PLUGIN_HOOK_PLUGINSD - NETDATA_PLUGIN_HOOK_HEALTH - NETDATA_PLUGIN_HOOK_ANALYTICS - NETDATA_PLUGIN_HOOK_SERVICE - - {NULL, NULL, NULL, 0, NULL, NULL, NULL} -}; - void web_server_threading_selection(void) { web_server_mode = web_server_mode_id(config_get(CONFIG_SECTION_WEB, "mode", web_server_mode_name(web_server_mode))); @@ -281,6 +249,8 @@ void cancel_main_threads() { } else info("All threads finished."); + + free(static_threads); } struct option_def option_definitions[] = { @@ -723,6 +693,7 @@ int main(int argc, char **argv) { size_t default_stacksize; char *user = NULL; + static_threads = static_threads_get(); netdata_ready=0; // set the name for logging |