Skip to content

Commit 09c8b23

Browse files
authored
chore(docs): missing documentation for nodes_stats_summary (#424)
Signed-off-by: Marc Nuri <[email protected]>
1 parent ebdeb6a commit 09c8b23

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ In case multi-cluster support is enabled (default) and you have access to multip
249249
- `query` (`string`) **(required)** - query specifies services(s) or files from which to return logs (required). Example: "kubelet" to fetch kubelet logs, "/<log-file-name>" to fetch a specific log file from the node (e.g., "/var/log/kubelet.log" or "/var/log/kube-proxy.log")
250250
- `tailLines` (`integer`) - Number of lines to retrieve from the end of the logs (Optional, 0 means all logs)
251251

252+
- **nodes_stats_summary** - Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics
253+
- `name` (`string`) **(required)** - Name of the node to get stats from
254+
252255
- **pods_list** - List all the Kubernetes pods in the current cluster from all namespaces
253256
- `labelSelector` (`string`) - Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label
254257

pkg/kubernetes/nodes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func (k *Kubernetes) NodesLog(ctx context.Context, name string, query string, ta
3939

4040
func (k *Kubernetes) NodesStatsSummary(ctx context.Context, name string) (string, error) {
4141
// Use the node proxy API to access stats summary from the kubelet
42+
// https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/
4243
// This endpoint provides CPU, memory, filesystem, and network statistics
4344

4445
req, err := k.AccessControlClientset().NodesStatsSummary(ctx, name)

0 commit comments

Comments
 (0)