diff options
Diffstat (limited to 'aclk/aclk-schemas/proto/nodeinstance')
3 files changed, 217 insertions, 0 deletions
diff --git a/aclk/aclk-schemas/proto/nodeinstance/connection/v1/connection.proto b/aclk/aclk-schemas/proto/nodeinstance/connection/v1/connection.proto new file mode 100644 index 000000000..f0c02461e --- /dev/null +++ b/aclk/aclk-schemas/proto/nodeinstance/connection/v1/connection.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +option go_package = "nodeinstance/connection/v1;nodeinstanceconnection"; + +package nodeinstance.v1; + +import "google/protobuf/timestamp.proto"; +import "proto/aclk/v1/lib.proto"; + +message UpdateNodeInstanceConnection { + string claim_id = 1; + string node_id = 2; + + // liveness whether node data are actively streamed to the agent. + bool liveness = 3; + + // queryable whether the agent has data about the node. + bool queryable = 4; + + int64 session_id = 5; + + google.protobuf.Timestamp updated_at = 6; + + // mqtt_broker_addr shard to use for reaching the agent + // cloud injects this information. + string mqtt_broker_addr = 7; + + // vmq_instance_id broker shard to use for reaching the agent + // cloud injects this information. + int32 vmq_instance_id = 8; + + // hops is the number of streaming hops between collection of node data + // and the claimed agent. Zero if no streaming is involved. + int32 hops = 9; + + // capabilities of node instance NOT the NODE or agent!!! + repeated aclk_lib.v1.Capability capabilities = 10; +} diff --git a/aclk/aclk-schemas/proto/nodeinstance/create/v1/creation.proto b/aclk/aclk-schemas/proto/nodeinstance/create/v1/creation.proto new file mode 100644 index 000000000..922337154 --- /dev/null +++ b/aclk/aclk-schemas/proto/nodeinstance/create/v1/creation.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +option go_package = "node_instance/creation/v1;node_instancecreation"; + +package nodeinstance.create.v1; + +message CreateNodeInstance { + // Claim ID of the Agent the Node Instance belongs to. + // Eventually, the NodeInstance will be identified by the compilation of + // this claim_id and NodeID returned by `CreateNodeInstanceResult` + string claim_id = 1; + // Machine GUID of the Machine the request comes from + // Used to look for an existing NodeID in the space claim_id belongs to + string machine_guid = 2; + string hostname = 3; + + // vmq_instance_id broker shard to use for reaching the agent + // cloud injects this information. + int32 vmq_instance_id = 4; + // mqtt_broker_addr shard to use for reaching the agent + // cloud injects this information. + string mqtt_broker_addr = 5; + + // hops is the number of streaming hops between collection of node data + // and the claimed agent. Zero if no streaming is involved. + int32 hops = 6; +} + +message CreateNodeInstanceResult { + string node_id = 1; + string machine_guid = 2; +} + diff --git a/aclk/aclk-schemas/proto/nodeinstance/info/v1/info.proto b/aclk/aclk-schemas/proto/nodeinstance/info/v1/info.proto new file mode 100644 index 000000000..7aa9d0448 --- /dev/null +++ b/aclk/aclk-schemas/proto/nodeinstance/info/v1/info.proto @@ -0,0 +1,148 @@ +syntax = "proto3"; +option go_package = "node_instance/info/v1;nodeinstanceinfo"; + +package nodeinstance.info.v1; + +import "google/protobuf/timestamp.proto"; +import "proto/aclk/v1/lib.proto"; + +// UpdateNodeInfo (Command) +// +// pulsar topic: `UpdateNodeInfo` (sharded) +// +// key: `claim_id,node_id` +// +// Publishers: `netdata/agent` +// Subscribers: `cloud-node-mqtt-output-service` +// +// When: +// On nodeinstance connect +// +message UpdateNodeInfo { + string node_id = 7; + + string claim_id = 1; + + NodeInfo data = 2; + // to be obsoleted in future + // all new fields should go into node_info + // or node_instance_info respectively + + google.protobuf.Timestamp updated_at = 3; + + int64 session_id = 4; + + string machine_guid = 5; + + bool child = 6; + + MachineLearningInfo ml_info = 8; + // to be obsoleted in far future + + NodeInfo2 node_info = 9; + // node_info shows data about actual node + // for example feature (ml) for this + // node (child) might be available/enabled on the node (child) directly + // but not available trough the parent (node_instance) + + NodeInstanceInfo node_instance_info = 10; + // info specific to the node_instance for this node available trough agent + // who sends this message. + // e.g. machine learning is enabled for this node and processing is done + // by the actual agent (parent). (child itself might or might not be + // ml ml_capable by itself (see node_info)) +} + +message NodeInfo2 { + repeated aclk_lib.v1.Capability capabilities = 1; +} + +message NodeInstanceInfo { + repeated aclk_lib.v1.Capability capabilities = 1; +} + +// NodeInfo describes the metadata of a node +message NodeInfo { + string name = 1; + + string os = 2; + string os_name = 3; + string os_version = 4; + + string kernel_name = 5; + string kernel_version = 6; + + string architecture = 7; + + // number of cpu cores in the node + uint32 cpus = 8; + + // human readable (value + unit) frequency of cpu + string cpu_frequency = 9; + + // human readable (value + unit) size of node's memory + string memory = 10; + + // human readable (value + unit) size of all (sum) node's disks + string disk_space = 11; + + // version of the netdata agent + string version = 12; + + // release channel of netdata agent (example: nightly) + string release_channel = 13; + + string timezone = 14; + + // virtualization_type example: kvm (optional) + string virtualization_type = 15; + + // container_type example: docker (optional) + string container_type = 16; + + string custom_info = 17; + + // [Obsolete] repeated string services = 18; + reserved 18; + + string machine_guid = 19; + + // [Obsolete] repeated MirroredHostStatus mirrored_hosts_status = 20; + reserved 20; + + map<string, string> host_labels = 21; + + MachineLearningInfo ml_info = 22; + + // [Obsolete] repeated string collectors = 23; + reserved 23; +} + +message MachineLearningInfo { + // have ML capability + bool ml_capable = 1; + + // runs ML functionality + bool ml_enabled = 2; +} + +// UpdateNodeCollectors (Command) +// +// key: `claim_id,node_id` +// +// Publishers: `netdata/agent` +// +// When: +// On nodeinstance connect (after agent settles) and on detection of change of collectors +// + +message CollectorInfo { + string module = 1; + string plugin = 2; +} + +message UpdateNodeCollectors { + string claim_id = 1; + string node_id = 2; + repeated CollectorInfo collectors = 3; +} |