| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #ifndef ACLK_SCHEMA_WRAPPER_NODE_INFO_H |
| 4 | #define ACLK_SCHEMA_WRAPPER_NODE_INFO_H |
| 5 | |
| 6 | #include <stdlib.h> |
| 7 | #include <stdint.h> |
| 8 | |
| 9 | #include "capability.h" |
| 10 | #include "database/rrd.h" |
| 11 | |
| 12 | #ifdef __cplusplus |
| 13 | extern "C" { |
| 14 | #endif |
| 15 | |
| 16 | struct machine_learning_info { |
| 17 | bool ml_capable; |
| 18 | bool ml_enabled; |
| 19 | }; |
| 20 | |
| 21 | struct aclk_node_info { |
| 22 | const char *name; |
| 23 | |
| 24 | const char *os; |
| 25 | const char *os_name; |
| 26 | const char *os_version; |
| 27 | const char *kernel_name; |
| 28 | const char *kernel_version; |
| 29 | const char *architecture; |
| 30 | uint32_t cpus; |
| 31 | const char *cpu_frequency; |
| 32 | const char *memory; |
| 33 | const char *disk_space; |
| 34 | const char *version; |
| 35 | const char *release_channel; |
| 36 | const char *timezone; |
| 37 | const char *virtualization_type; |
| 38 | const char *container_type; |
| 39 | const char *custom_info; |
| 40 | const char *machine_guid; |
| 41 | |
| 42 | RRDLABELS *host_labels_ptr; |
| 43 | struct machine_learning_info ml_info; |
| 44 | }; |
| 45 | |
| 46 | struct update_node_info { |
| 47 | char *node_id; |
| 48 | char *claim_id; |
| 49 | struct aclk_node_info data; |
| 50 | struct timeval updated_at; |
| 51 | char *machine_guid; |
| 52 | int child; |
| 53 | |
| 54 | struct machine_learning_info ml_info; |
| 55 | |
| 56 | struct capability *node_capabilities; |
| 57 | struct capability *node_instance_capabilities; |
| 58 | }; |
| 59 | |
| 60 | struct collector_info { |
| 61 | const char *module; |
| 62 | const char *plugin; |
| 63 | }; |
| 64 | |
| 65 | struct update_node_collectors { |
| 66 | char *claim_id; |
| 67 | char *node_id; |
| 68 | DICTIONARY *node_collectors; |
| 69 | }; |
| 70 | |
| 71 | char *generate_update_node_info_message(size_t *len, struct update_node_info *info); |
| 72 | |
| 73 | char *generate_update_node_collectors_message(size_t *len, struct update_node_collectors *collectors); |
| 74 | |
| 75 | #ifdef __cplusplus |
| 76 | } |
| 77 | #endif |
| 78 | |
| 79 | #endif /* ACLK_SCHEMA_WRAPPER_NODE_INFO_H */ |