diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-08 16:27:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-08 16:27:08 +0000 |
commit | 81581f9719bc56f01d5aa08952671d65fda9867a (patch) | |
tree | 0f5c6b6138bf169c23c9d24b1fc0a3521385cb18 /aclk/aclk_capas.c | |
parent | Releasing debian version 1.38.1-1. (diff) | |
download | netdata-81581f9719bc56f01d5aa08952671d65fda9867a.tar.xz netdata-81581f9719bc56f01d5aa08952671d65fda9867a.zip |
Merging upstream version 1.39.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/aclk_capas.c')
-rw-r--r-- | aclk/aclk_capas.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/aclk/aclk_capas.c b/aclk/aclk_capas.c index 290e7d8f..55f6fd3b 100644 --- a/aclk/aclk_capas.c +++ b/aclk/aclk_capas.c @@ -7,13 +7,16 @@ const struct capability *aclk_get_agent_capas() { static struct capability agent_capabilities[] = { - { .name = "json", .version = 2, .enabled = 0 }, - { .name = "proto", .version = 1, .enabled = 1 }, - { .name = "ml", .version = 0, .enabled = 0 }, - { .name = "mc", .version = 0, .enabled = 0 }, - { .name = "ctx", .version = 1, .enabled = 1 }, - { .name = "funcs", .version = 1, .enabled = 1 }, - { .name = NULL, .version = 0, .enabled = 0 } + { .name = "json", .version = 2, .enabled = 0 }, + { .name = "proto", .version = 1, .enabled = 1 }, + { .name = "ml", .version = 0, .enabled = 0 }, + { .name = "mc", .version = 0, .enabled = 0 }, + { .name = "ctx", .version = 1, .enabled = 1 }, + { .name = "funcs", .version = 1, .enabled = 1 }, + { .name = "http_api_v2", .version = 1, .enabled = 1 }, + { .name = "health", .version = 1, .enabled = 0 }, + { .name = "req_cancel", .version = 1, .enabled = 1 }, + { .name = NULL, .version = 0, .enabled = 0 } }; agent_capabilities[2].version = ml_capable() ? 1 : 0; agent_capabilities[2].enabled = ml_enabled(localhost); @@ -21,27 +24,34 @@ const struct capability *aclk_get_agent_capas() agent_capabilities[3].version = enable_metric_correlations ? metric_correlations_version : 0; agent_capabilities[3].enabled = enable_metric_correlations; + agent_capabilities[7].enabled = localhost->health.health_enabled; + return agent_capabilities; } struct capability *aclk_get_node_instance_capas(RRDHOST *host) { struct capability ni_caps[] = { - { .name = "proto", .version = 1, .enabled = 1 }, - { .name = "ml", .version = ml_capable(), .enabled = ml_enabled(host) }, + { .name = "proto", .version = 1, .enabled = 1 }, + { .name = "ml", .version = ml_capable(), .enabled = ml_enabled(host) }, { .name = "mc", .version = enable_metric_correlations ? metric_correlations_version : 0, .enabled = enable_metric_correlations }, - { .name = "ctx", .version = 1, .enabled = 1 }, - { .name = "funcs", .version = 0, .enabled = 0 }, - { .name = NULL, .version = 0, .enabled = 0 } + { .name = "ctx", .version = 1, .enabled = 1 }, + { .name = "funcs", .version = 0, .enabled = 0 }, + { .name = "http_api_v2", .version = 2, .enabled = 1 }, + { .name = "health", .version = 1, .enabled = host->health.health_enabled }, + { .name = "req_cancel", .version = 1, .enabled = 1 }, + { .name = NULL, .version = 0, .enabled = 0 } }; - if (host == localhost || (host->receiver && stream_has_capability(host->receiver, STREAM_CAP_FUNCTIONS))) { - ni_caps[4].version = 1; - ni_caps[4].enabled = 1; - } struct capability *ret = mallocz(sizeof(ni_caps)); memcpy(ret, ni_caps, sizeof(ni_caps)); + + if (host == localhost || (host->receiver && stream_has_capability(host->receiver, STREAM_CAP_FUNCTIONS))) { + ret[4].version = 1; + ret[4].enabled = 1; + } + return ret; } |