Commit a8149de5 authored by 段英荣's avatar 段英荣

modify

parent 84019468
...@@ -222,12 +222,16 @@ class ESPerform(object): ...@@ -222,12 +222,16 @@ class ESPerform(object):
for item in es_nodes_info_list: for item in es_nodes_info_list:
try: try:
item_list = item.split(" ") item_list = item.split(" ")
if len(item_list)>4: if len(item_list)==11:
cpu_load = item_list[4] cpu_load = item_list[4]
int_cpu_load = int(cpu_load) elif len(item_list)==10:
if int_cpu_load > 60: cpu_load = item_list[3]
high_num += 1 else:
es_nodes_list.append(int_cpu_load) continue
int_cpu_load = int(cpu_load)
if int_cpu_load > 60:
high_num += 1
es_nodes_list.append(int_cpu_load)
except: except:
logging.error("catch exception,item:%s,err_msg:%s" % (str(item),traceback.format_exc())) logging.error("catch exception,item:%s,err_msg:%s" % (str(item),traceback.format_exc()))
return True return True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment