elasticsearchkibanaelastic-stackfilebeatmetricbeat

elastic-agent is not collecting data


I have two elastic agents. One is running on my elasticsearch server and the other one on my other server. The agent on my elastic host got the fleet server intergration and the system intergration. The agent on my other hosts just has the system intergration. The system intergration on the fleet server agent is working fine. I can see data being written and the host shows up in the Observability and the Security overview. The agent on my "Other" host doesnt report anything. I cant see it in Observability nor Security. And if i take a look at the logs-* overview i can only see documents originating from the fleet server agent. Both agents show up in my fleet server overview and are marked as healthy. Does anyone know what the problem might be or how i find out?

This is how I installed the fleet server:

./elastic-agent install --fleet-server-es=http://localhost:9200 --fleet-server-service-token=my_token --fleet-server-policy=my-policy --fleet-server-insecure-http --insecure --fleet-server-es-insecure

This is how i installed the agent on my other host:

./elastic-agent install --url=http://my_ip:8220 --enrollment-token=my_token --insecure

Solution

  • On your other host, you are issuing install command instead of enroll

    ./elastic-agent enroll --url=http://my_ip:8220 --enrollment-token=my_token --insecure