diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2022-11-16 04:05:33 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 23:05:33 +0200 |
commit | f289ba344990ae1f16f6019c72de1e52dcf260bf (patch) | |
tree | 3ba507d9d104bf7cbce257baa76ae3f7301177da /database/sqlite | |
parent | 224b051a2b2bab39a4b536e531ab9ca590bf31bb (diff) |
Add 'funcs' capability (#13992)
* cleanup capas + add func capa
* make it const
* fixes
* freez
Diffstat (limited to 'database/sqlite')
-rw-r--r-- | database/sqlite/sqlite_aclk_node.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/database/sqlite/sqlite_aclk_node.c b/database/sqlite/sqlite_aclk_node.c index 3f4ed7e5f2..afe774997d 100644 --- a/database/sqlite/sqlite_aclk_node.c +++ b/database/sqlite/sqlite_aclk_node.c @@ -4,6 +4,7 @@ #include "sqlite_aclk_node.h" #include "../../aclk/aclk_contexts_api.h" +#include "../../aclk/aclk_capas.h" #ifdef ENABLE_ACLK DICTIONARY *collectors_from_charts(RRDHOST *host, DICTIONARY *dict) { @@ -71,14 +72,7 @@ void sql_build_node_info(struct aclk_database_worker_config *wc, struct aclk_dat node_info.ml_info.ml_capable = ml_capable(localhost); node_info.ml_info.ml_enabled = ml_enabled(wc->host); - struct capability instance_caps[] = { - { .name = "proto", .version = 1, .enabled = 1 }, - { .name = "ml", .version = ml_capable(localhost), .enabled = ml_enabled(wc->host) }, - { .name = "mc", .version = enable_metric_correlations ? metric_correlations_version : 0, .enabled = enable_metric_correlations }, - { .name = "ctx", .version = 1, .enabled = 1 }, - { .name = NULL, .version = 0, .enabled = 0 } - }; - node_info.node_instance_capabilities = instance_caps; + node_info.node_instance_capabilities = aclk_get_node_instance_capas(wc->host); now_realtime_timeval(&node_info.updated_at); @@ -126,6 +120,7 @@ void sql_build_node_info(struct aclk_database_worker_config *wc, struct aclk_dat rrd_unlock(); freez(node_info.claim_id); + freez(node_info.node_instance_capabilities); freez(host_version); wc->node_collectors_send = now_realtime_sec(); |