Api to print clustername with heap percentage

Hi All,

Is there any api to print elastic search node heap percentage along with cluster name?

Any insight will be helpful.

Thanks

You can find all the information you need here: Nodes stats API | Elasticsearch Guide [8.11] | Elastic

If you want to execute this API from terminal you can use this snippet to get only the information you need:

curl -XGET "http://localhost:9200/_nodes/stats" | jq '.nodes | {hostname:.name, OSMemoryUsage:(.os.mem.used_in_bytes/.os.mem.total_in_bytes)} '

curl -XGET "http://localhost:9200/_nodes/stats" | jq '.nodes | {hostname:.name, heapPercent:.jvm.mem.heap_used_percent}'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.