Restart Elastic Agent from Fleet Server

I want to restart Elastic Agent from Fleet server, because many time elastic agent gets in offline state and every time I restart it manually,

Hello and welcome,

That's not possible, if an agent is offline you need to start it yourself, fleet server has no control over the agents in this state.

@leandrojmp
It is in the elastic roadmap in 2022 and still we are waiting for this feature. We are using fleet server in centralized architecture. What is the use of fleet server to be in centralized architecture if it can't able to start or stop and restart the agent. Means we can't able to perform a basic central server feature from it.

@leandrojmp
Many time elastic agent get stuck or shows offline during policy update or push. So do we need to update our 100 of agent manual. Even doing restart agent activity into 50 machines or 20 machines it is a issue for anyone. Do elastic have any mechanism for remote restart of agents or bulk restart of agents

There are some issues about being able to remotely restart an agent, like this one, but this requires the agent to be running.

If the agent is not running, then there is nothing that Fleet can do, it is out of its scope.

There is a little difference here.

Fleet is used to centralize configurations and the management of the agents, but it requires the agents to be able to communicate with the Fleet server, so it requires the agents to be in a running state, that's one of the reasons for the elastic agent to run as a service as it will be restarted on reboots and can restart itself in some cases, but if the agente is in a stop state, then this becomes an infrastructure issue that needs to be solved in other ways.

If the Agent is not running, it cannot communicate with Fleet, so Fleet cannot manage it.

Not yet, from the issues available publicly on github, being able to remotely restart agents is on the plans, but again, you will be able to restart a running agent.