I created an simple nodejs application and trying to monitoring the API using elastic-node-apm package and visualize it using kibana but when I check the discover tab of my kibana dashboard I found that my elastic-node-apm hitting again and again a request after every 30 seconds. I don't have any idea why this happening if anyone has any idea Why this is happening please tell here.
I just want to know that why are there are so many hits and Is it necessary to stop them ? And if Yes, so how I can stop them ? Please explain me this, I am searching for this from a long time.
@Piyush_Mittal What is your query and index for the "Discover" tab screenshot? Some of those "hits" might be things other than "requests to your application". For example the data for the one hit shown in your screenshot is a "metric" data object sent by the APM agent. In addition to sending trace data ("transactions" and "spans"), then APM agent also periodically gathers system and application metrics and sends those. Those are sent every metricsInterval which defaults to 30s.
They are not necessary, no. These collected metrics are a feature of the Elastic APM system. You can read more about how metrics differ from "transactions", "spans", and "errors" that are collected here: Data Model | APM User Guide [8.11] | Elastic
Yes, there is some load from gathering and sending metrics, but very little. Typically it is on the order of a handful of milliseconds after 30s.
Yes, you can stop them by setting metricsInterval="0s" in the APM agent config (Configuration options | APM Node.js Agent Reference [4.x] | Elastic). Note that disabling metrics will mean that some charts in the APM UI in Kibana will not have data to show. Tracing will still be fine.
Yes, you can set metricsInterval to a larger time span. The resolution of metrics data will be affected, but that may be fine for your case.
From your limited screenshots, I do not know what data that "failed to find message" is showing. That string does not appear in the Node.js APM agent code, nor its dependencies, so I don't know where it is coming from.
"failed to find message" comes from the Logs app in Kibana, when a log entry is missing the message field. We would need to see more details of the log entry to further diagnose.
Did you customise the indices for the Logs app? This is a metrics document, in the metrics index. It is not a log record, so that's why the Logs app is having trouble finding the log message.
Hey @axw I am just try to configure this on my ec2 instance, elasticsearch, kibana is configured and now I am looking for apm-server. I installed the package which is mentioned in document but I am not able to find apm-server.yml file. Can u please tell me how I could filnd it ? It's an ubuntu ec2 instance.
The directory layout depends on how exactly you installed the APM Server, the docs describing the directory layout should give you the right pointers where you can find the apm-server.yml.
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.