Ali cloud event monitoring open source projects address
https://github.com/AliyunContainerService/kube-eventer
What variables need to be modified
--sink = dingtalk: [your_webhook_url] & label = [your_cluster_id] & level = [Normal or Warning (default)]
Description
custom fields for nails Image your_cluster_id
python nail test
import json
import requests
url = "https://oapi.dingtalk.com/robot/send?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
header = {
"Content-Type": "application/json",
"charset": "utf-8"
}
data = {
"msgtype": "text",
"text": {
"content": "Newhope告警测试"
},
"at": {
"isAtAll": True # at为非必须
}
}
if __name__ == "__main__":
sendData = json.dumps(data)
request = requests.post(url, data=sendData, headers=header)
print(request.text)