In code I see that exception - link. Golang documentation says:
When Read encounters an error or end-of-file condition after successfully reading n > 0 bytes, it returns the number of bytes read. It may return the (non-nil) error from the same call or return the error (and n == 0) from a subsequent call.
APM-server is installed by the installing the .deb package, not by Fleet-server. Elasticsearch and APM-Server vesrions is 8.4.1.
What an error could caused by? What about this error actually? How can I decide it?
UPD: also I can't enable APM integration in the Kibana :c
try using --data-binary instead of -d: curl --request POST http://*.*.*.*:*/intake/v2/events -H "Content-Type: application/x-ndjson" --data-binary @payload.ndjson
Have you installed the APM Integration? You can follow the guide for installing the APM Integration. This is required for setting up index templates, ingest pipelines etc and the APM Server won't start ingesting data to Elasticsearch until it can find these assets.
You described earlier that you managed to successfully send sample data to the APM Server. Could you verify if these data are actually indexed into Elasticsearch or if there is any error logged in the APM Server logs?
Oh, I deeped down to the problem and created and configured roles, users and index templates for apm-server:
role apm-server with all (for test) privilleges for metrics-apm*, logs-apm* and traces-apm* and with monitor, cluster:admin/xpack/monitoring/bulk cluster privilleges
user apm-server with role apm-server
index templates logs-apm, metrics-apm and traces-apm configured as data streams with patterns logs-apm*, metrics-apm* and traces-apm*
It is absolutely true that my test requests are processing cause sample data are indexing. I see indices in the UI and in responses using Search API.
After several apm-server restarts I get a few errors.
IDK why I see this error. I have index template with neccessary index pattern:
Nov 29 10:22:26 fleet-server apm-server[11648]: {"log.level":"error","@timestamp":"2022-11-29T10:22:26.852Z","log.logger":"beater","log.origin":{
"file.name":"beater/waitready.go","file.line":62},"message":"precondition 'apm integration installed' failed: error querying Elasticsearch for in
tegration index templates: unexpected HTTP status: 404 Not Found ({\"error\":{\"root_cause\":[{\"type\":\"resource_not_found_exception\",\"reason
\":\"index template matching [logs-apm.error] not found\"}],\"type\":\"resource_not_found_exception\",\"reason\":\"index template matching [logs-
apm.error] not found\"},\"status\":404}): to remediate, please install the apm integration: https://ela.st/apm-integration-quickstart","service.n
ame":"apm-server","ecs.version":"1.6.0"}
And the second error:
Nov 29 10:22:26 fleet-server apm-server[11648]: {"log.level":"error","@timestamp":"2022-11-29T10:22:26.858Z","log.logger":"kibana","log.origin":{
"file.name":"kibana/connecting_client.go","file.line":79},"message":"failed to obtain connection to Kibana: fail to get the Kibana version: fail
to unmarshal the response from GET https://{KIBANA}:443/api/status. Response: <!DOCTYPE html> <html class=\"login-pf\"> <head>
<meta charset=\"utf-8\"> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /> <meta name=\"robots\" content=\"n
oindex, nofollow\"> <link rel=\"icon\" type=\"image/x-icon\" href=\".... (truncated). Kibana status api returns: invalid character '<' lookin
g for beginning of value","service.name":"apm-server","ecs.version":"1.6.0"}
This happened after I configured apm-server.kibana section in apm-server.yml. I haven't this section before so it possible that it is cause with apm-server integration installing issue. But it is not work. I think cause is enabled SSO on Kibana side. Are there ways to configure apm-server.kibana to work with SSO?
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.