diff --git a/proto/info/info.proto b/proto/info/info.proto index a4885ed6..2bd5876a 100644 --- a/proto/info/info.proto +++ b/proto/info/info.proto @@ -1334,6 +1334,10 @@ message ZInfoKubeClusterUpdateStatus { // Error info in case of failure ErrorInfo error = 4; + + // Cluster UUID which will match config.EdgeNodeCluster.cluster_id passed + // in to the node by the controller. + string cluster_id = 5; } message ZInfoKubeCluster { diff --git a/proto/metrics/metrics.proto b/proto/metrics/metrics.proto index 2f910e54..060225b7 100644 --- a/proto/metrics/metrics.proto +++ b/proto/metrics/metrics.proto @@ -614,6 +614,8 @@ message ZMetricMsg { repeated ZMetricVolume vm = 8; repeated ZMetricProcess pr = 9; + + KubeClusterMetrics cm = 10; } // newlogMetric - stats for newlog @@ -710,3 +712,46 @@ message FlowlogCounters { // The number of failed attempts to publish a flow record. uint64 failed_attempts = 3; } + +// Resources used as reported by kubernetes api for the node objects. +message KubeNodeMetrics { + // Name of the node + string name = 1; + + // CPU cores in milli cores + uint32 cpu_cores = 2; + + // CPU usage in percentage + float cpu_usage = 3; + + // Memory usage in bytes + uint32 memory_usage = 4; + + // Memory usage in percentage + float memory_usage_percentage = 5; +} + +// Resources used as reported by kubernetes api for pods running eve user apps. +message KubeEVEAppPodMetrics { + // Name of the EVE application + string name = 1; + + // CPU cores in milli cores + uint32 cpu_cores = 2; + + // Memory usage in bytes + uint32 memory_usage = 3; +} + +// Parent cluster metrics object to be sent by the node which has leader election. +message KubeClusterMetrics { + // Cluster UUID which will match config.EdgeNodeCluster.cluster_id passed + // in to the node by the controller. + string cluster_id = 1; + + // Metrics of the nodes in the cluster + repeated KubeNodeMetrics nodes = 2; + + // Metrics of the EVE applications in the cluster + repeated KubeEVEAppPodMetrics eve_apps = 3; +}