# All of my agents stayed inactive

**URL:** <https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168>\
**Category:** Elastic Agent\
**Created:** [June 27, 2024, 3:22pm UTC](https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168 "2024-06-27T15:22:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmrlixos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmrlixos/32/99836_2.png) [@dmrlixos](https://discuss.elastic.co/u/dmrlixos)\
**Post date:** [June 27, 2024, 3:22pm UTC](https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168/1 "2024-06-27T15:22:28Z")

</div>

I have 65 agents and today all these are inactive, I don't did any changes to the cluster to affect these agents.

There's a way to recover these agents, my fleet server API are respond healthy

```auto
curl -f https://localhost:8220/api/status -k
{"name":"fleet-server","status":"HEALTHY"}

```

Some can help me ?

Thks

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 27, 2024, 3:47pm UTC](https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168/2 "2024-06-27T15:47:03Z")

</div>

Per default the agents will be marked as inactive is they cannot perform a health check with the fleet server for more than 1209600 seconds, which is something around 14 days.

So, were you agents offline before that?

Can you run these requests in Kibana Dev Tools and share the response:

```auto
GET kbn:/api/fleet/agent_status

```

And

```auto
GET kbn:/api/fleet/agents?page=1&perPage=10&showInactive=true

```

---

<div class="post-metadata">

**Author:** ![dmrlixos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmrlixos/32/99836_2.png) [@dmrlixos](https://discuss.elastic.co/u/dmrlixos)\
**Post date:** [June 27, 2024, 5:05pm UTC](https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168/3 "2024-06-27T17:05:18Z")

</div>

```auto
{
  "results": {
    "online": 4,
    "error": 0,
    "inactive": 84,
    "offline": 1,
    "updating": 0,
    "unenrolled": 9,
    "other": 0,
    "events": 0,
    "total": 5,
    "all": 98,
    "active": 5
  }
}

```

Of these 5, 4 are fleet server and the other one are offline, the reason i didnt found yet

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 27, 2024, 9:33pm UTC](https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168/4 "2024-06-27T21:33:10Z")

</div>

Please share the response of the other endpoint as asked, it will show information about some agents.

---

<div class="post-metadata">

**Author:** ![dmrlixos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmrlixos/32/99836_2.png) [@dmrlixos](https://discuss.elastic.co/u/dmrlixos)\
**Post date:** [June 28, 2024, 2:53pm UTC](https://discuss.elastic.co/t/all-of-my-agents-stayed-inactive/362168/5 "2024-06-28T14:53:57Z")

</div>

Hi @leandrojmp sorry to forgot.

But i found the error, ahead of fleet servers, i have an LB, and some acl on this alb was causing this issue.  
I fix this and now all agents are online again

thks for you help
