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 support for Docker container health checks to the collector image #30798

Open
sjparkinson opened this issue Jan 26, 2024 · 5 comments
Open
Labels
enhancement New feature or request extension/healthcheck Health Check Extension needs triage New item requiring triage Stale

Comments

@sjparkinson
Copy link

sjparkinson commented Jan 26, 2024

Component(s)

extension/healthcheck

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

We are setting up an OTel Collector as an AWS ECS Fargate service.

The task definitions support configuration for a container health check, and the results are surfaced when viewing the containers belonging to a task in an ECS cluster, and used by the ECS service to support managing the lifecycle of the container:

Screenshot 2024-01-26 at 19 02 35

But because the collector is a FROM scratch image, we cannot use the typical configurations (e.g. curl -f http://localhost: 13133/ || exit 1) as they rely on having a shell and a few CLIs like curl installed.

Describe the solution you'd like

I would love for a way to configure a Docker container health check that works on ECS and other hosting platforms that utilise this Docker capability.

The convention with Go based images from what I've seen seems to be to include some sort of health check executable or extra command in the main CLI.

I note that this is resolved in the ADOT distribution with aws-observability/aws-otel-collector#1285.

Describe alternatives you've considered

Additional context

Sorry to ping you Juraci, but I couldn't think of a better component to select when creating this.

@sjparkinson sjparkinson added enhancement New feature or request needs triage New item requiring triage labels Jan 26, 2024
@github-actions github-actions bot added the extension/healthcheck Health Check Extension label Jan 26, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@jpkrohling
Copy link
Member

cc @mwear, who's in the process of building the next version of this component.

@sjparkinson
Copy link
Author

Hey @mwear, any thoughts on the addition of a healthcheck executable to add support for native Docker health checks?

@nesty92
Copy link

nesty92 commented Mar 20, 2024

It will be great to have it in the official image for now this works

FROM public.ecr.aws/aws-observability/aws-otel-collector:latest as aws-otel
FROM otel/opentelemetry-collector-contrib as otel-collector

COPY --from=aws-otel /healthcheck /healthcheck

HEALTHCHECK --interval=5s --timeout=6s --retries=5 CMD ["/healthcheck"]

Remember to enable the healthcheck extension

image

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extension/healthcheck Health Check Extension needs triage New item requiring triage Stale
Projects
None yet
Development

No branches or pull requests

3 participants