Skip to content

Conversation

@akhilerm
Copy link
Member

@akhilerm akhilerm commented Sep 10, 2024

Implement the following CRI APIs

  • ListPodSandboxMetrics
  • ListMetricDescriptors

Fixes: #10506

TESTING

crictl metricsp command can be used to test the pod sandbox metrics returned by the runtime.

Output

Ref: https://gist.github.com/akhilerm/625d12b805d482cd577311be3a4f7551

Part of kubernetes/enhancements#2371

* **Pod Sandbox Metrics** ([#10691](https://github.com/containerd/containerd/pull/10691))
  
  Full implementation of Kubernetes CRI pod-level metrics API
  * **ListPodSandboxMetrics**: Query metrics for  running pods/sandboxes
  * **ListMetricsDescriptors**: Discover available metrics and their descriptions

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@akhilerm
Copy link
Member Author

/cc @mikebrow

@zvonkok
Copy link

zvonkok commented Nov 28, 2024

@akhilerm You still working on this?

@akhilerm
Copy link
Member Author

@akhilerm You still working on this?

Yepp. I am working on it. Couldnt focus for sometime, but will pickup from next week onwards.

@zvonkok
Copy link

zvonkok commented Nov 28, 2024

/cc @zvonkok

@k8s-ci-robot
Copy link

@zvonkok: GitHub didn't allow me to request PR reviews from the following users: zvonkok.

Note that only containerd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @zvonkok

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@zvonkok
Copy link

zvonkok commented Dec 16, 2024

@akhilerm Is this still on your roadmap?

@zvonkok
Copy link

zvonkok commented Dec 20, 2024

AFAIC some metrics are missing if we want to be on par with cAdvisor.

@akhilerm
Copy link
Member Author

@akhilerm Is this still on your roadmap?

Yes

AFAIC some metrics are missing if we want to be on par with cAdvisor.

The ListMetricDescriptors should have every metrics and this was added over from cadvisor. I will cross check if I missed something while adding from the cadvisor code.

@akhilerm akhilerm force-pushed the list-pod-sandbox-metrics branch from 44e5695 to 0b4a872 Compare December 31, 2024 09:22
@zvonkok
Copy link

zvonkok commented Jan 1, 2025

@akhilerm I mostly referring to this table: https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md AFAIR the FS were missing?

@akhilerm akhilerm force-pushed the list-pod-sandbox-metrics branch from 0b4a872 to 41203bc Compare January 7, 2025 15:25
@k8s-ci-robot k8s-ci-robot added size/L and removed size/S labels Jan 7, 2025
@zvonkok
Copy link

zvonkok commented Jan 9, 2025

This is the e2e test which metrics we will need: kubernetes/kubernetes#126213

Signed-off-by: Akhil Mohan <[email protected]>
Signed-off-by: Davanum Srinivas <[email protected]>
Signed-off-by: Akhil Mohan <[email protected]>
Signed-off-by: Akhil Mohan <[email protected]>
Signed-off-by: Akhil Mohan <[email protected]>
Signed-off-by: Akhil Mohan <[email protected]>
Signed-off-by: Davanum Srinivas <[email protected]>
Signed-off-by: Akhil Mohan <[email protected]>
@akhilerm akhilerm force-pushed the list-pod-sandbox-metrics branch from c5d36b1 to a418e28 Compare October 22, 2025 04:11
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from Needs Reviewers to Review In Progress in Pull Request Review Oct 23, 2025
Copy link
Member

@dims dims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan dmcgowan added this pull request to the merge queue Oct 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2025
@dmcgowan dmcgowan added this pull request to the merge queue Oct 24, 2025
@dmcgowan dmcgowan moved this from Review In Progress to Merge on Green in Pull Request Review Oct 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2025
@dmcgowan dmcgowan added this pull request to the merge queue Oct 24, 2025
Merged via the queue into containerd:main with commit 3d0df86 Oct 24, 2025
94 of 96 checks passed
@github-project-automation github-project-automation bot moved this from Merge on Green to Done in Pull Request Review Oct 24, 2025
@akhilerm akhilerm deleted the list-pod-sandbox-metrics branch October 24, 2025 10:27
@akhilerm
Copy link
Member Author

A few more additional metrics will be added as mentioned in kubernetes-sigs/cri-tools#1931 for the conformance

@mxpv
Copy link
Member

mxpv commented Oct 24, 2025

@akhilerm could you pls create a follow up issue to address #10691 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

[CRI] The ListPodSandboxMetrics method in containerd is not yet implemented

9 participants