Commit 25d9442b authored by litaolemo's avatar litaolemo

update

parent 1f7dbc97
......@@ -131,15 +131,19 @@ def parse_node_stats(data):
def main_task(ip_list):
while True:
for ip in ip_list:
data = get_cluster_stats(ip)
res = parse_cluster_stats(data)
if res:
send_msg_to_dingtalk(ip+res,access_token=access_token,secret=secret)
for data in get_node_status(ip):
parse_node_stats(data)
res = parse_node_stats(data)
try:
data = get_cluster_stats(ip)
res = parse_cluster_stats(data)
if res:
send_msg_to_dingtalk(res, access_token=access_token, secret=secret)
send_msg_to_dingtalk(ip+res,access_token=access_token,secret=secret)
for data in get_node_status(ip):
parse_node_stats(data)
res = parse_node_stats(data)
if res:
send_msg_to_dingtalk(res, access_token=access_token, secret=secret)
except Exception as e:
print(ip,e)
time.sleep(10)
......
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