@cryptotaxi247 / netdata-1 / commits / 2efceb842

Route dyncfg GET requests through plugin (#21249)

Costa Tsaousis committed Oct 31, 2025 at 16:31 UTC 2efceb842643867702168e2de7833637cc20d833
1 file changed +5 -2
src/daemon/dyncfg/dyncfg-tree.c
+5 -2
@@ -240,10 +240,13 @@ static int dyncfg_config_execute_cb(struct rrd_function_execute *rfe, void *data
240 goto cleanup;
241 }
242 }
243 - else if((cmd == DYNCFG_CMD_USERCONFIG || cmd == DYNCFG_CMD_TEST) && df->current.status != DYNCFG_STATUS_ORPHAN) {
243 + else if((cmd == DYNCFG_CMD_USERCONFIG || cmd == DYNCFG_CMD_TEST || cmd == DYNCFG_CMD_GET) && df->current.status != DYNCFG_STATUS_ORPHAN) {
244 const char *old_rfe_function = rfe->function;
245 char buf2[2048];
246 - snprintfz(buf2, sizeof(buf2), "config %s %s %s", dictionary_acquired_item_name(item), action, name?name:"");
246 + if(cmd == DYNCFG_CMD_GET)
247 + snprintfz(buf2, sizeof(buf2), "config %s %s", dictionary_acquired_item_name(item), action);
248 + else
249 + snprintfz(buf2, sizeof(buf2), "config %s %s %s", dictionary_acquired_item_name(item), action, name?name:"");
250 rfe->function = buf2;
251 dictionary_acquired_item_release(dyncfg_globals.nodes, item);
252 item = NULL;