"os_load_average": jmespath.search("os.load_average", node_dict) if jmespath.search("os.load_average", node_dict) is not None else jmespath.search("os.cpu.load_average.\"1m\"", node_dict),
"os_cpu_percent": jmespath.search("os.cpu_percent", node_dict) if jmespath.search("os.cpu_percent", node_dict) is not None else jmespath.search("os.cpu.percent", node_dict),
General information
Issue Description
The _nodes/stats API of ES 6.2.2 returns CPU percent and load_average like following:
But in
Task.py
,os.load_average
andos.cpu_percent
are used to get the two metrics. Should beos.cpu.percent
andos.cpu.load_average.XXX
.Source Code / Logs
Now:
One possible solution: