Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for fetching stats of all containers #239

Open
RazCrimson opened this issue Feb 18, 2023 · 4 comments
Open

No support for fetching stats of all containers #239

RazCrimson opened this issue Feb 18, 2023 · 4 comments

Comments

@RazCrimson
Copy link
Contributor

Current Scenario
podman-py currently does not directly provide any means to fetch the stats of all containers.

But this is allowed in as per the Podman REST API.
Note that the containers parameter can take in multiple IDs or no ID to return data for all containers.
The current method that uses this API Container.stats does not allow such actions.

Proposed Solution
I propose to add an additional stats method under ContainerManager that would optionally take in cointainer_ids and stream the results.

Shall I go ahead and make a PR for this with the required changes or are there any other ways to implement this that would be considered better?

@TomSweeneyRedHat
Copy link
Member

@RazCrimson was this solved with your PR? (#237), or are there more bits to chase here?

@RazCrimson
Copy link
Contributor Author

RazCrimson commented Feb 23, 2023

No, it not done. @TomSweeneyRedHat

My earlier PR was on Container.stats (stats for one container), but this issue is for a new but similar method under ContainerManager to stream stats for all containers.

Would it be fine to raise a PR to add that?

Also something else I noticed after I created this issue is that, there is no support to stream pod stats. PodManager.stats seems to be returning immediately (just one single response).

The latest podman docs mentions that it supports live streaming for pod stats but the API endpoint doesn't accept any stream params. Not sure if that is an inconsistency with the documentation. Will check and update here.

@TomSweeneyRedHat
Copy link
Member

Thanks for the clarification @RazCrimson . FWIW, PR's are always gratefully accepted!

@umohnani8
Copy link
Member

@RazCrimson thank yo for your contributions! Did your PRs address this issue or is there still some work left?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants