summaryrefslogtreecommitdiffstats
path: root/aclk/aclk-schemas/proto/chart/v1/stream.proto
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /aclk/aclk-schemas/proto/chart/v1/stream.proto
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/aclk-schemas/proto/chart/v1/stream.proto')
-rw-r--r--aclk/aclk-schemas/proto/chart/v1/stream.proto86
1 files changed, 86 insertions, 0 deletions
diff --git a/aclk/aclk-schemas/proto/chart/v1/stream.proto b/aclk/aclk-schemas/proto/chart/v1/stream.proto
new file mode 100644
index 000000000..9473538f2
--- /dev/null
+++ b/aclk/aclk-schemas/proto/chart/v1/stream.proto
@@ -0,0 +1,86 @@
+syntax = "proto3";
+
+package chart.v1;
+
+import "google/protobuf/timestamp.proto";
+
+import "proto/chart/v1/instance.proto";
+import "proto/chart/v1/dimension.proto";
+
+option go_package = "chart/stream/v1;chartstream";
+
+// StreamChartsAndDimensions is a Command produced by the Cloud, consumed by the Agent.
+//
+// It instructs the Agent to start sending ChartsAndDimensionsUpdated messages for a NodeInstance
+// after the last sequence_id that the Cloud has successfully ingested.
+message StreamChartsAndDimensions {
+ // claim_id, node_id pair is used to identify the Node Instance
+ string claim_id = 1;
+ string node_id = 2;
+
+ // sequence_id last verified sequence sent by the Agent
+ uint64 sequence_id = 3;
+ // batch_id identifies the stream_id and gets incremented every time the Cloud sends a new StreamChartsAndDimensions command
+ uint64 batch_id = 4;
+ // seq_id_created_at autogenerated timestamp in Agent's DB upon sequence_id creation
+ google.protobuf.Timestamp seq_id_created_at = 5;
+}
+
+
+// ChartsAndDimensionsAck is an Event produced by the Cloud, consumed by the Agent.
+//
+// This Event is an acknowledgment from the Cloud side that Chart messages up to a specific last_sequence_id
+// have been successfully ingested, and could be potentially deleted from the Agent's DB.
+message ChartsAndDimensionsAck {
+ string claim_id = 1;
+ string node_id = 2;
+ // the last verified stored message's seq_id
+ uint64 last_sequence_id = 3;
+}
+
+// ResetChartMessages is a Command produced by the Agent, consumed by the Cloud.
+//
+// This Command instructs the Cloud to clear its Chart state for a specific NodeInstance and re-sync
+// because of a ResetReason.
+message ResetChartMessages {
+ // claim_id, node_id pair is used to identify the Node Instance
+ string claim_id = 1;
+ string node_id = 2;
+
+ ResetReason reason = 3;
+}
+
+enum ResetReason {
+ DB_EMPTY = 0;
+ SEQ_ID_NOT_EXISTS = 1;
+ TIMESTAMP_MISMATCH = 2;
+}
+
+// ChartsAndDimensionsUpdated is a wrapper Event (`fat` message) produced by the Agent, consumed by the Cloud.
+//
+// It potentially includes a collection of ChartInstanceUpdated messages and|or a collection of ChartDimensionUpdated messages.
+message ChartsAndDimensionsUpdated {
+ repeated chart.v1.ChartInstanceUpdated charts = 1;
+ repeated chart.v1.ChartDimensionUpdated dimensions = 2;
+ uint64 batch_id = 3;
+}
+
+// RetentionUpdated includes the available retentions (in seconds) of the dimensions - of a specific node instance and memory-mode -
+// on a per update_every level.
+// This message is sent over upon Agent Database rotation events to inform the Cloud in total about the newly updated data retentions
+// of a node instance's dimensions.
+message RetentionUpdated {
+ // claim_id, node_id pair is used to identify the Node Instance
+ string claim_id = 1;
+ string node_id = 2;
+ // the memory_mode used by the node instance's chart instances
+ chart.v1.MemoryMode memory_mode = 3;
+ // this mapping identifies the newly updated available retention (in seconds) of the node instance's dimensions
+ // the keys are the update_every categories of various dimensions (1, 2, 4, 10 etc.),
+ // and the values are the available retention (in seconds) of each dimension belonging to the update_every category
+ // denoted by the key
+ map<uint32, uint32> interval_durations = 4;
+ // the timestamp when the db rotation event took place. Can be used in conjunction with the interval_durations
+ // to compute the beginning of each `updated_every` group's retention
+ google.protobuf.Timestamp rotation_timestamp = 5;
+}