网站首页 > python 正文

Python电话告警短信告警通知API

admin 2025-02-27 14:39:21 python 43 ℃
正文

平台地址

https://www.opsalert.cn/pricing.html


注册送1个月时间,余额2元体验


import requests
import json

url = 'https://www.opsalert.cn/alert/api/密钥'
headers = {
    'Content-type': 'application/json'
}
data = {
    "uuid": "001",
    "title": "msg test",
    "priority": 3,
    "type": "trigger",
    "hostname": "TestHost",
    "content": "msg content",
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)


本文TAG:

蓝色枫叶