python3 钉钉机器人告警通知的使用

#### 前言

为了便于团队开发通知,及运维维护管理通知,现集成了钉钉机器人

 

#### 使用

```

import requests

sendData = "test"

postUrl = "xxx"    # 从钉钉机器人中获取webhook的urt

data = {

    "msgtype": "text",
    "text": {
        "content": sendData
    }
}
requests.post(postUrl, data=json.dumps(data), headers=headers)

 

```


版权声明:本文为weixin_42715225原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。