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

Supports Host Process Container metrics #1886

Open
laozc opened this issue Feb 14, 2025 · 2 comments
Open

Supports Host Process Container metrics #1886

laozc opened this issue Feb 14, 2025 · 2 comments

Comments

@laozc
Copy link

laozc commented Feb 14, 2025

Problem Statement

Currently the container metrics only collects HCS container.
https://github.com/prometheus-community/windows_exporter/blob/master/internal/collector/container/container.go#L220-L223

HPC is supported since 1.26 in Kubernetes
https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/

HPC container not implemented in HCS container on Windows
so the user won't be able to get any metrics if the container is deployed as HPC.

Proposed Solution

No response

Additional information

No response

Acceptance Criteria

No response

@jkroepke
Copy link
Member

Thats currently expected and unknown, how to gain metrics about everything.

Additionally, it unknown to me, if the V1 API supports Job containers

ref: microsoft/hcsshim#2370

@jkroepke
Copy link
Member

It turns out that Host Process Containers are Win32 Job Objects. It's not in the responsibility of the HCS. containerd/runc binary directly invoke the Win32 Job Object API. the hcsshim library handle the host process containers internally as job container.

Not sure, if I should add a generic collector for job objects, since Job objects are used by other software components, e.g. kubelet and MSSQL. That may confused end-users, but from Windows point of view, normal containers and hostprocess containers are using distinct Windows APIs.

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

No branches or pull requests

2 participants