# Fleet of agents healthy but not sending data

**URL:** https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440
**Category:** Beats
**Tags:** fleet
**Created:** [August 25, 2021, 5:26am UTC](https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440 "2021-08-25T05:26:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yzpls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yzpls/32/93677_2.png) [@yzpls](https://discuss.elastic.co/u/yzpls)
#### Post date: [August 25, 2021, 5:26am UTC](https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440/1 "2021-08-25T05:26:03Z")

</div>

I have a Fleet of Elastic Agents running on a fresh k8s cluster (running latest ECK). I added a couple integrations via Kibana, like the Kubernetes metrics. But the Kubernetes Dashboards are all empty, and nothing shows up in Metrics.

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/8/085298e9e0a3458cc9ccaea7be9240617439c049.png)

The agents all report healthy in Fleet Management. I can spot no clues from the logs on fleet-server nor elastic-agent pods. Any help would be greatly appreciated.

===

Here are some more details of my debugging journey:

Initially, I saw that the [official quickstart](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-fleet-quickstart.html) has a couple of typos, but the one specific to this issue was: `https://fleet-server-agent-http.default.svc:8220` should be `https://fleet-server-quickstart-agent-http.default.svc:8220` After fixing and applying this, the elastic-agent logs still kept saying:

```auto
2021-08-25T04:54:11.727Z WARN [transport] transport/tcp.go:52 DNS lookup failure "fleet-server-agent-http.default.svc": lookup fleet-server-agent-http.default.svc on 10.100.0.10:53: no such host
2021-08-25T04:54:11.728Z ERROR fleet/fleet_gateway.go:180 failed to dispatch actions, error: fail to communicate with updated API client hosts: Get "https://fleet-server-agent-http.default.svc:8220/api/status?": lookup fleet-server-agent-http.default.svc on 10.100.0.10:53: no such host

```

I forced restart the elastic agents and kibana, but that didn't work. I had to go into the kibana UI and find a random Fleet setting that still said `fleet-server-agent...` which I had to change to `fleet-server-quickstart-agent...` .

All of that takes me to my current situation.

---

<div class="post-metadata">

### Author: ![yzpls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yzpls/32/93677_2.png) [@yzpls](https://discuss.elastic.co/u/yzpls)
#### Post date: [August 27, 2021, 11:59pm UTC](https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440/2 "2021-08-27T23:59:09Z")

</div>

Bump

---

<div class="post-metadata">

### Author: ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)
#### Post date: [August 28, 2021, 12:40am UTC](https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440/3 "2021-08-28T00:40:21Z")

</div>

If you aren't seeing data, make sure that the Agent can connect to Elasticsearch correctly. I ran into a similar issue. The agent reports `healthy` if it can talk to the Fleet Server, it doesn't take into account whether the agent can talk to Elasticsearch.

There can be a few issues:

- The URL to Elasticsearch could contain a typo, resulting in the agent trying to talk to the wrong thing
- The Agent could be missing the root CA file (if your Elasticsearch cluster is protected by a private CA or self-signed cert)

Also, with Agent using Kubernetes, make sure you read the [known limitation](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-fleet-known-limitation.html) about the Agent needing to be in the same namespace as the Elasticsearch cluster.

---

<div class="post-metadata">

### Author: ![dkow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkow/32/47340_2.png) [@dkow](https://discuss.elastic.co/u/dkow)
#### Post date: [September 2, 2021, 9:23am UTC](https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440/4 "2021-09-02T09:23:10Z")

</div>

Hey @yzpls, thanks for your question and finding the mistake in the quickstart. It should be [fixed](https://github.com/elastic/cloud-on-k8s/pull/4810) soon.

Regarding the need to update those settings via UI, that's something we are [looking at](https://github.com/elastic/kibana/issues/105400) as well.

As to your issue, I'd start with looking at the logs of individual Beats. You can do this by `kubectl exec -it $POD_NAME bash` into the Elastic Agent Pod and looking at files in `/usr/share/elastic-agent/state/data/logs/default`. Those should contain logs that better indicate what is the issue Beats are having.

You can also try to apply any of our other configuration [examples](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-fleet-configuration-examples.html). Depending on the integration enabled and their configuration, different RBAC rules or Pod template might be needed.

Let me know if you'll have any more questions, I'll be glad to help.

Thanks,  
David

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 30, 2021, 9:23am UTC](https://discuss.elastic.co/t/fleet-of-agents-healthy-but-not-sending-data/282440/5 "2021-09-30T09:23:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
