Hi!
I'm have the elastic APM set up on some machines. It's working quite well and all the stats are showing perfectly fine, but I don't want to use just the GUI. I'd like to get metrics (CPU Usage, Disk Usage, etc) for each machine using the/an API. Is there any way to do this? I've looked into the docs and the only similar thing that I can find are node/cluster metrics.
Something like that, for example:
I have the APM installed on 4 machines and they're all configured to have SERVICE_NAME as let's say: "SERV_1". I can see the 4 machines under the instance section on SERV_1, the APM shows their CPU Usage, Memory Usage, etc on the GUI. Is there an API to get the CPU Usage of these machines as shown on the APM?
Sorry if I don't explain myself correctly, english is my second language
Different APM agents collect different metrics. Which language are you using??
Also the APM agent is not going to collect as detailed infrastructure metrics as metricbeat or the elastic agent which collect Up to literally hundreds of infrastructure metrics.
So the question is what are you looking for to do?.
Also, all this information is simply stored in elastic indexes so you will be able to get to that data through the rest API. But let's figure out what you want to do first
I'm looking to get infrastructure data, such as CPU Usage, System Memory Usage and Disk Space. I want to create a script that gets this data given a time period and stores it in some file(Like a CSV). I'm using Python for some machines, Javascript for some other machines and Ruby as well. The language for the script is going to be python.
I would take these steps. And no, I don't have a simple example for you.
Install metricbeat and collect system metrics. Send them to Elasticsearch It's very easy to do this as system metrics are the default collection meaning CPU, RAM disk, etc .
Then you can use the Python client to extract the data the way you like through the elastic API using the query DSL.
Ok, so here's my question: Which endpoint do I have to send a request to in order to get the metrics? I've been trying GET /metricbeat-/ with many options and GET /apm/ and nothing gives me what I need. I'm testing all this stuff with the dev tools console.
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.