summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2024-03-15 11:30:01 +0200
committerGitHub <noreply@github.com>2024-03-15 11:30:01 +0200
commit91c28d74addedb5020c47bf12722e129036c03a7 (patch)
tree3a0121b798e7b073f335f221b833133b6275b26c
parentf307d7a6af08e30e9cadc696a490cd147b9816e7 (diff)
Announce dynamic configuration capability to the cloud (#17162)
* Announce dyncfg capability * Set dyncfg status per node
-rw-r--r--src/aclk/aclk_capas.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/aclk/aclk_capas.c b/src/aclk/aclk_capas.c
index e109eb1b76..754e8f6767 100644
--- a/src/aclk/aclk_capas.c
+++ b/src/aclk/aclk_capas.c
@@ -18,7 +18,7 @@ const struct capability *aclk_get_agent_capas()
{ .name = "http_api_v2", .version = HTTP_API_V2_VERSION, .enabled = 1 },
{ .name = "health", .version = 1, .enabled = 0 }, // index 7, below
{ .name = "req_cancel", .version = 1, .enabled = 1 },
- //{ .name = "dyncfg", .version = 1, .enabled = 1 },
+ { .name = "dyncfg", .version = 1, .enabled = 1 },
{ .name = NULL, .version = 0, .enabled = 0 }
};
agent_capabilities[2].version = ml_capable() ? 1 : 0;
@@ -35,6 +35,7 @@ const struct capability *aclk_get_agent_capas()
struct capability *aclk_get_node_instance_capas(RRDHOST *host)
{
bool functions = (host == localhost || (host->receiver && stream_has_capability(host->receiver, STREAM_CAP_FUNCTIONS)));
+ bool dyncfg = (host == localhost || dyncfg_available_for_rrdhost(host));
struct capability ni_caps[] = {
{ .name = "proto", .version = 1, .enabled = 1 },
@@ -47,7 +48,7 @@ struct capability *aclk_get_node_instance_capas(RRDHOST *host)
{ .name = "http_api_v2", .version = HTTP_API_V2_VERSION, .enabled = 1 },
{ .name = "health", .version = 1, .enabled = host->health.health_enabled },
{ .name = "req_cancel", .version = 1, .enabled = 1 },
- //{ .name = "dyncfg", .version = 1, .enabled = 1 },
+ { .name = "dyncfg", .version = 1, .enabled = dyncfg },
{ .name = NULL, .version = 0, .enabled = 0 }
};