elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
124 stars 134 forks source link

[Elastic Agent] Fleet managed Elastic Agent stays healthy when it can't connect to Fleet Server #87

Open BenB196 opened 2 years ago

BenB196 commented 2 years ago

Expected:

I'd expect the top level status to be UNHEALTHY as the Agent can no longer talk to Fleet server and therefore no longer pull policy updates, or do other things that require contact with the Fleet Server.

Issue:

This problem matters because it makes it hard to detect when the Elastic Agent itself enters a state that it can no longer properly function in. While I can see the agent Offline in Kibana because it hasn't checked in recently. If I have a tool like Puppet which periodically checks agents that are unhealthy and attempts to fix them, I run into an issue, where Puppet wouldn't be able to detect this issue, and therefore not automatically fix the issue, requiring manual intervention.

elasticmachine commented 2 years ago

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

ph commented 2 years ago

I think we aren't correctly aggregating the internal fleet status with the overall Agent status.

blakerouse commented 2 years ago

Yes the local heathly status is not propogated to the status subcommand. It would show unhealthy in Fleet UI.

Something we should look at improving.

iamjosh007 commented 1 year ago

any updates on this??, Seems like the whole fleet functionality within the Stack is buggy and need some immediate fixes on all fronts.