Commit f14045ad authored by litaolemo's avatar litaolemo

update

parent 71a1f1f3
...@@ -26,9 +26,9 @@ import requests ...@@ -26,9 +26,9 @@ import requests
import datetime import datetime
from meta_base_code.send_msg_to_dingding.send_msg import send_msg_to_dingtalk from meta_base_code.send_msg_to_dingding.send_msg import send_msg_to_dingtalk
data_dict = {} data_dict = {}
memory_used_rate_top = 0.1 memory_used_rate_top = 0
fs_free_rate_top = 0.1 fs_free_rate_top = 0
cpu_top = 0.1 cpu_top = 0
secret = 'SECbbfd6b7403869cf8a31e63e2d623378bd8a55b5a31083fad6421ee817794f485' secret = 'SECbbfd6b7403869cf8a31e63e2d623378bd8a55b5a31083fad6421ee817794f485'
access_token = '6eb687358606347cef617237cddab6a80e2f5981b46fe04950a96152e387f35c' access_token = '6eb687358606347cef617237cddab6a80e2f5981b46fe04950a96152e387f35c'
...@@ -60,7 +60,7 @@ def get_node_status(ip): ...@@ -60,7 +60,7 @@ def get_node_status(ip):
node_requests_url = "http://{ip}:9200/_nodes/stats".format(ip=ip) node_requests_url = "http://{ip}:9200/_nodes/stats".format(ip=ip)
node_requests_res = requests.get(node_requests_url) node_requests_res = requests.get(node_requests_url)
res_json = node_requests_res.json() res_json = node_requests_res.json()
print(res_json) # print(res_json)
for data_name in res_json["nodes"]: for data_name in res_json["nodes"]:
data = res_json['nodes'][data_name] data = res_json['nodes'][data_name]
node_name = data['name'] node_name = data['name']
......
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