summaryrefslogtreecommitdiffstats
path: root/daemon/static_threads.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
commit97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch)
tree02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /daemon/static_threads.c
parentReleasing debian version 1.36.1-1. (diff)
downloadnetdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz
netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/static_threads.c')
-rw-r--r--daemon/static_threads.c74
1 files changed, 46 insertions, 28 deletions
diff --git a/daemon/static_threads.c b/daemon/static_threads.c
index 96e279906..b7730bc31 100644
--- a/daemon/static_threads.c
+++ b/daemon/static_threads.c
@@ -2,16 +2,19 @@
#include "common.h"
-extern void *aclk_starter(void *ptr);
-extern void *analytics_main(void *ptr);
-extern void *checks_main(void *ptr);
-extern void *cpuidlejitter_main(void *ptr);
-extern void *global_statistics_main(void *ptr);
-extern void *health_main(void *ptr);
-extern void *pluginsd_main(void *ptr);
-extern void *service_main(void *ptr);
-extern void *statsd_main(void *ptr);
-extern void *timex_main(void *ptr);
+void *aclk_main(void *ptr);
+void *analytics_main(void *ptr);
+void *cpuidlejitter_main(void *ptr);
+void *global_statistics_main(void *ptr);
+void *global_statistics_workers_main(void *ptr);
+void *health_main(void *ptr);
+void *pluginsd_main(void *ptr);
+void *service_main(void *ptr);
+void *statsd_main(void *ptr);
+void *timex_main(void *ptr);
+void *replication_thread_main(void *ptr __maybe_unused);
+
+extern bool global_statistics_enabled;
const struct netdata_static_thread static_threads_common[] = {
{
@@ -24,15 +27,6 @@ const struct netdata_static_thread static_threads_common[] = {
.start_routine = timex_main
},
{
- .name = "PLUGIN[check]",
- .config_section = CONFIG_SECTION_PLUGINS,
- .config_name = "checks",
- .enabled = 0,
- .thread = NULL,
- .init_routine = NULL,
- .start_routine = checks_main
- },
- {
.name = "PLUGIN[idlejitter]",
.config_section = CONFIG_SECTION_PLUGINS,
.config_name = "idlejitter",
@@ -52,21 +46,25 @@ const struct netdata_static_thread static_threads_common[] = {
},
{
.name = "GLOBAL_STATS",
- .config_section = NULL,
- .config_name = NULL,
+ .config_section = CONFIG_SECTION_PLUGINS,
+ .config_name = "netdata monitoring",
+ .env_name = "NETDATA_INTERNALS_MONITORING",
+ .global_variable = &global_statistics_enabled,
.enabled = 1,
.thread = NULL,
.init_routine = NULL,
.start_routine = global_statistics_main
},
{
- .name = "HEALTH",
- .config_section = NULL,
- .config_name = NULL,
+ .name = "WORKERS_STATS",
+ .config_section = CONFIG_SECTION_PLUGINS,
+ .config_name = "netdata monitoring",
+ .env_name = "NETDATA_INTERNALS_MONITORING",
+ .global_variable = &global_statistics_enabled,
.enabled = 1,
.thread = NULL,
.init_routine = NULL,
- .start_routine = health_main
+ .start_routine = global_statistics_workers_main
},
{
.name = "PLUGINSD",
@@ -131,12 +129,12 @@ const struct netdata_static_thread static_threads_common[] = {
.enabled = 1,
.thread = NULL,
.init_routine = NULL,
- .start_routine = aclk_starter
+ .start_routine = aclk_main
},
#endif
{
- .name = "rrdcontext",
+ .name = "RRDCONTEXT",
.config_section = NULL,
.config_name = NULL,
.enabled = 1,
@@ -145,7 +143,27 @@ const struct netdata_static_thread static_threads_common[] = {
.start_routine = rrdcontext_main
},
- {NULL, NULL, NULL, 0, NULL, NULL, NULL}
+ {
+ .name = "REPLICATION",
+ .config_section = NULL,
+ .config_name = NULL,
+ .enabled = 1,
+ .thread = NULL,
+ .init_routine = NULL,
+ .start_routine = replication_thread_main
+ },
+
+ // terminator
+ {
+ .name = NULL,
+ .config_section = NULL,
+ .config_name = NULL,
+ .env_name = NULL,
+ .enabled = 0,
+ .thread = NULL,
+ .init_routine = NULL,
+ .start_routine = NULL
+ }
};
struct netdata_static_thread *