Original install method (e.g. download page, yum, deb, from source, etc.) and version: deb/apt
Fresh install or upgraded from other version? fresh installation
Is there anything special in your setup? ElasticAgent is configured to interact with ES and fleet directly.
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I configured APM integration following the manual located in APM | Kibana Guide [7.17] | Elastic
Install Elastic APM integration following elastic.co manual
Try to access APM API - get 404
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
22:09:05.916
[elastic_agent][error] Could not communicate with fleet-server Checking API will retry, error: fail to checkin to fleet-server: Post "https://elastic3.***:8220/api/fleet/agents/4f590859-53da-4d56-a605-c6bff181389d/checkin?": context canceled
22:09:05.916
[elastic_agent][error] Could not communicate with fleet-server Checking API will retry, error: fail to checkin to fleet-server: Post "https://elastic3.***:8220/api/fleet/agents/4f590859-53da-4d56-a605-c6bff181389d/checkin?": context canceled
Hi @dthapostle ,
the APM Agent Configuration API is available via the Kibana endpoint, not the Fleet Server endpoint. Can you please try with that and let us know if it works.
The apm agent configuration settings can be set and updated directly via Kibana, but are consumed by the APM agents through the APM Server. This way the APM agents do not require a direct connection to Kibana.
So for consuming the APM agent configuration, you need to configure the APM Server URL (not the Kibana URL) in the agents. The APM Server URL defaults to port 8200.
root@elastic3:/var/lib/elastic-agent/data/elastic-agent-6118f2/install/apm-server-8.1.2-linux-x86_64# grep host apm-server.yml | head -n 5
# Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket.
host: "elastic3.****:8200"
# An origin is made of a protocol scheme, host and port, without the url path.
# Array of hosts to connect to.
# In case you specify and additional path, the scheme is required: `http://localhost:9200/path`.
The APM agents should not require any specific configuration, the central config management is enabled by default and the apm agent is fetching the information from the configured APM Server URL.
The shared screenshot in No access to APM API - #2 by simitt suggested that you had the Kibana URL configured in your .NET apm agent. When setting that to the APM Server URL (see this config example), the .NET agent should be good to fetch the information from the APM Server.
You shouldn't have to configure anything in the Elastic Agent related to this. When running APM Server managed by Elastic Agent, the APM central configuration settings are automatically passed down from Kibana to the APM Server via the Fleet/Elastic Agent mechanism.
So in summary, please ensure that you
use the Kibana path for setting the concrete apm agent central config values
configure the APM Server URL in the .NET apm agent
No further config should be required related to this Feature.
@simitt
I have 3 ES nodes: logcollect, elastic2 and elastic3. Elastic agent is installed on elastic3 with ElasticAPM (via Agent policy). There's APM process on elastic3 but it doesn't listen TCP 8200.
I can't specify elastic3:8200 in .Net APM agent because built-in APM server on elastic3 doesn't listen TCP 8200:
root@elastic3:~# netstat -ano | grep 82[0,2]0
tcp 0 0 192.168.152.24:45272 192.168.152.24:8220 ESTABLISHED keepalive (8.10/0/0)
tcp6 0 0 :::8220 :::* LISTEN off (0.00/0/0)
tcp6 0 0 192.168.152.24:8220 192.168.152.24:45272 ESTABLISHED keepalive (8.10/0/0)
tcp6 0 0 192.168.152.24:8220 192.168.152.76:59210 ESTABLISHED keepalive (1.79/0/0)
root@elastic3:~#
Please follow the guide to add the APM Integration. When running inside a container, also ensure to configure the host via the Fleet UI to listen to all interfaces, see this example:
Can you spot anything helpful in the Elastic Agent or APM Server logs? You should be able to view them via Kibana or access them directly from the elastic3 container (see the default logging parameters).
I don't have that on-prem setup running right now to check, but I'm surprised the only LISTENING is a unix socket (for the HTTP metrics) but nothing on port 8200 (or whatever you have configured) — unless that's what you'd expect, Silvia?
Otherwise the logs might be interesting around what this is binding to.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.