summaryrefslogtreecommitdiffstats
path: root/aclk/schema-wrappers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:10 +0000
commit34a0b66bc2d48223748ed1cf5bc1b305c396bd74 (patch)
treefbd36be86cc6bc4288fe627f2b5beada569848bb /aclk/schema-wrappers
parentAdding upstream version 1.32.1. (diff)
downloadnetdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.tar.xz
netdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.zip
Adding upstream version 1.33.0.upstream/1.33.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/schema-wrappers')
-rw-r--r--aclk/schema-wrappers/node_info.cc8
-rw-r--r--aclk/schema-wrappers/node_info.h9
2 files changed, 17 insertions, 0 deletions
diff --git a/aclk/schema-wrappers/node_info.cc b/aclk/schema-wrappers/node_info.cc
index f6638aa5f..f6f15ffb2 100644
--- a/aclk/schema-wrappers/node_info.cc
+++ b/aclk/schema-wrappers/node_info.cc
@@ -62,6 +62,10 @@ static int generate_node_info(nodeinstance::info::v1::NodeInfo *info, struct acl
if (data->machine_guid)
info->set_machine_guid(data->machine_guid);
+ nodeinstance::info::v1::MachineLearningInfo *ml_info = info->mutable_ml_info();
+ ml_info->set_ml_capable(data->ml_info.ml_capable);
+ ml_info->set_ml_enabled(data->ml_info.ml_enabled);
+
map = info->mutable_host_labels();
label = data->host_labels_head;
while (label) {
@@ -86,6 +90,10 @@ char *generate_update_node_info_message(size_t *len, struct update_node_info *in
msg.set_machine_guid(info->machine_guid);
msg.set_child(info->child);
+ nodeinstance::info::v1::MachineLearningInfo *ml_info = msg.mutable_ml_info();
+ ml_info->set_ml_capable(info->ml_info.ml_capable);
+ ml_info->set_ml_enabled(info->ml_info.ml_enabled);
+
*len = PROTO_COMPAT_MSG_SIZE(msg);
char *bin = (char*)malloc(*len);
if (bin)
diff --git a/aclk/schema-wrappers/node_info.h b/aclk/schema-wrappers/node_info.h
index 4acb671a5..41daf94c8 100644
--- a/aclk/schema-wrappers/node_info.h
+++ b/aclk/schema-wrappers/node_info.h
@@ -11,6 +11,11 @@
extern "C" {
#endif
+struct machine_learning_info {
+ bool ml_capable;
+ bool ml_enabled;
+};
+
struct aclk_node_info {
char *name;
@@ -49,6 +54,8 @@ struct aclk_node_info {
char *machine_guid;
struct label *host_labels_head;
+
+ struct machine_learning_info ml_info;
};
struct update_node_info {
@@ -58,6 +65,8 @@ struct update_node_info {
struct timeval updated_at;
char *machine_guid;
int child;
+
+ struct machine_learning_info ml_info;
};
char *generate_update_node_info_message(size_t *len, struct update_node_info *info);