Hi everyone,
I'd like to gather cpu level with rest api for any nodes. I am using the method on this page.
if my request type
http://localhost:9200/_nodes/172.28../stats/os
Response
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "Master169",
"nodes" : {
"f42pBKbpQ3-XodDyh8Z-yw" : {
"timestamp" : 1550044795008,
"name" : "",
"transport_address" : "",
"host" : "***",
"ip" : "*",
"roles" : [
"master",
"data",
"ingest"
],
"attributes" : {
"ml.machine_memory" : "25757966336",
"xpack.installed" : "true",
"ml.max_open_jobs" : "20",
"ml.enabled" : "true"
},
"os" : {
"timestamp" : 1550044795008,
"cpu" : {
"percent" : 1
},
"mem" : {
"total_in_bytes" : 25757966336,
"free_in_bytes" : 14517907456,
"used_in_bytes" : 11240058880,
"free_percent" : 56,
"used_percent" : 44
},
"swap" : {
"total_in_bytes" : 29516062720,
"free_in_bytes" : 17683697664,
"used_in_bytes" : 11832365056
}
}
}
}
}
but How can ı collector only cpu percent
REQUEST
http://localhost:9200/_nodes/172.28../stats/os/cpu/percent but no response
I want to response only return cpu information
"os" : {
"timestamp" : 1550044795008,
"cpu" : {
"percent" : 1
},
The finally
I'd like to os.cpu.load_average.1m below write http query http://localhost:9200/_nodes/stats/os/cpu/load/average/1m
Best regards.