-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
elastic-agent docker: support healthcheck for the container #24503
Comments
Pinging @elastic/agent (Team:Agent) |
@simitt How are you handling this for the Cloud container? |
@ruflin no special handling for the healthcheck yet; instead, if the legacy APM Server cannot be started or dies, it sends a signal to terminate the Elastic Agent, resulting in the whole container being terminated. For sub processes managed by Elastic Agent, we have discussed in the past that the Elastic Agent should provide a healthcheck endpoint providing details per sub process but also an overall health indicator. |
@michalpristas @ph Do we have this overall healthcheck already tracked somewhere? I remember we discussed this in the past. Does Agent already has some http endpoint or similar? |
From our perspective (users) it's valuable if the healthcheck signals green if the default policy is assigned for the first time. |
I think an Agent should be healthy, as soon as the first policy is received and acked. This does not have to be the default policy. We should improve this healthcheck later on to have more fine grained status information depending on processes / inputs status. |
IMO if the agent is started in Fleet Server mode, then the Agent's health should consider the Fleet Server's health, ideally by consuming a health endpoint from the Fleet Server. |
As we're observing some flakiness with booting the agent I did a short exercise to check responses fro
Please mind the gap between HEALTHY states. It seems that the Fleet Server got restarted then which means that we need a different workaround :) |
With the Fleet Server enabled in the agent's Docker container, we need to find a way to signal that the container is healthy. Before 7.13.0-SNAPSHOT we used the following healthcheck: https://github.com/elastic/elastic-package/blob/master/internal/install/static_snapshot_yml.go#L85
Do you have any recommendation how to signal that the container is healthy - it has a default policy assigned? Do you think you can add the healthcheck definition to the official Docker image?
The text was updated successfully, but these errors were encountered: