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 <[email protected]>
  • Loading branch information
andrewd-zededa committed Nov 5, 2024
1 parent ee10555 commit debd51b
Show file tree
Hide file tree
Showing 2 changed files with 49 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
45 changes: 45 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,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;
}

0 comments on commit debd51b

Please sign in to comment.