UnHealthy agent

PS C:\Program Files\Elastic\Agent> .'.\elastic-agent.exe' status
┌─ fleet
│ └─ status: (STARTING)
└─ elastic-agent
├─ status: (DEGRADED) 1 or more components/units in a degraded state
└─ endpoint-default
├─ status: (HEALTHY) Healthy: communicating with endpoint service
├─ endpoint-default
│ └─ status: (DEGRADED) Applied policy 'Elastic-Defend-Windows' (Defend policy rev. 1. Agent policy rev. 13.)
└─ endpoint-default-39061217-bf17-4efe-9940-c483d78af6e6
└─ status: (DEGRADED) Applied policy 'Elastic-Defend-Windows' (Defend policy rev. 1. Agent policy rev. 13.)

Hello @harry22

As per the error message "The endpoint's connection to Elasticsearch is either down or misconfigured" , please check the endpoint configured for “Elastic-Defend-Windows” & if it is correct check if Elasticsearch is Running without any issues.

Thanks!!

This has been cross checked and verified that Elastic agent service restarting and then status: (DEGRADED)
I triedRestart-Service ElasticEndpoint

.\elastic-agent.exe status and then becoming unhealthy . tried all commands

PS C:\Program Files\Elastic\Agent> Get-Service elastic

Status Name DisplayName


Running Elastic Agent Elastic Agent
Running ElasticEndpoint Elastic Endpoint

Hello @harry22

To know more about the issue we can check the elastic agent logs which can help to know the exact cause as you have checked the endpoint details are correct as well as elasticsearch is up.

Thanks!!