Skip to content

Commit

Permalink
KubeClusterMetrics: node and app cpu/mem usage.
Browse files Browse the repository at this point in the history
For kubevirt-eve images this adds per node
and eve-user-app cpu/memory usage metrics.

Fix: add cluster_id to ZInfoKubeClusterUpdateStatus

Signed-off-by: Andrew Durbin <andrewd@zededa.com>
  • Loading branch information
andrewd-zededa authored and eriknordmark committed Nov 7, 2024
1 parent ee10555 commit 26158c9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proto/info/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
48 changes: 48 additions & 0 deletions proto/metrics/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ message ZMetricMsg {
repeated ZMetricVolume vm = 8;

repeated ZMetricProcess pr = 9;

KubeClusterMetrics cm = 10;
}

// newlogMetric - stats for newlog
Expand Down Expand Up @@ -710,3 +712,49 @@ 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 running eve user apps.
message KubeAppMetrics {
// 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 pod applications in the cluster
repeated KubeAppMetrics eve_pod_apps = 3;

// Metrics of the EVE vmi applications in the cluster
repeated KubeAppMetrics eve_vmi_apps = 4;
}

0 comments on commit 26158c9

Please sign in to comment.