@cryptotaxi247 / netdata-1 / commits / bc88f8bd8

plugins dyncfg is always on localhost (#20312)

Costa Tsaousis committed May 20, 2025 at 16:46 UTC bc88f8bd8629eada3747b8fd3d59c64a0b2bda85
2 files changed +14 -1
src/daemon/dyncfg/dyncfg.c
+12
@@ -91,11 +91,23 @@ static bool dyncfg_conflict_cb(const DICTIONARY_ITEM *item __maybe_unused, void
91 dyncfg_normalize(nv);
92
93 if(!UUIDeq(v->host_uuid, nv->host_uuid)) {
94 + char u1[UUID_STR_LEN], u2[UUID_STR_LEN];
95 + nd_uuid_unparse_lower(v->host_uuid.uuid, u1);
96 + nd_uuid_unparse_lower(nv->host_uuid.uuid, u2);
97 +
98 + nd_log(NDLS_DAEMON, NDLP_NOTICE,
99 + "DYNCFG: configuration '%s' changed host id from '%s' to '%s'",
100 + dictionary_acquired_item_name(item), u1, u2);
101 +
102 SWAP(v->host_uuid, nv->host_uuid);
103 changes++;
104 }
105
106 if(v->path != nv->path) {
107 + nd_log(NDLS_DAEMON, NDLP_NOTICE,
108 + "DYNCFG: configuration '%s' changed path from '%s' to '%s'",
109 + dictionary_acquired_item_name(item), string2str(v->path), string2str(nv->path));
110 +
111 SWAP(v->path, nv->path);
112 changes++;
113 }
src/plugins.d/pluginsd_dyncfg.c
+2 -1
@@ -6,7 +6,8 @@
6 // ----------------------------------------------------------------------------
7
8 PARSER_RC pluginsd_config(char **words, size_t num_words, PARSER *parser) {
9 - RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_CONFIG);
9 + // config command is only available to localhost
10 + RRDHOST *host = localhost; /* pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_CONFIG);*/
11 if(!host) return PARSER_RC_ERROR;
12
13 size_t i = 1;