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

Add container.health and container.status to container attributes #1515

Open
Markus78 opened this issue Oct 24, 2024 · 1 comment
Open

Add container.health and container.status to container attributes #1515

Markus78 opened this issue Oct 24, 2024 · 1 comment

Comments

@Markus78
Copy link

Markus78 commented Oct 24, 2024

Area(s)

area:container

Is your change request related to a problem? Please describe.

It is usefull to be able to the tell the health and status of running containers in docker or podman. These attributes would make it easier to keep track of the status of containers and their health.

Describe the solution you'd like

I would like 2 new attributes for containers

Name: container.health integer with the following definitions

Value Description
-1 unknown ( no healthcheck exists )
0 healthy
1 unhealthy
2 starting

Name: container.status integer with the following definitions

Value Description
-1 unknown
0 created
1 error
2 exited
3 paused
4 running
5 degraded
6 stopped

These 2 attributes makes overview of running containers possible. Inspiration from prometheus-podman-exporter

Describe alternatives you've considered

No response

Additional context

No response

@ChrsMark
Copy link
Member

ChrsMark commented Oct 31, 2024

Hey @Markus78!

Could these be modeled as metrics like the hw.status in https://opentelemetry.io/docs/specs/semconv/system/hardware-metrics/#hwbattery---battery-metrics as it was suggested at #1032 (comment)?

My second question is if these two metrics could be re-used as K8s related metrics as well. For example there is https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/k8sclusterreceiver/documentation.md#k8scontainerready but I'm not sure if we could expand here and have a common set of metrics for both K8s and generic containers. Also there is open-telemetry/opentelemetry-collector-contrib#35668. @povilasv do you have any thoughts on this?

/cc @open-telemetry/semconv-container-approvers @open-telemetry/semconv-k8s-approvers

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