钉钉报警设置

钉钉报警设置

[mysql@db_manager ~]$ cat /data/mysql/scripts/alarm_index.sh
#!/bin/bash
datetime=`date +"%Y-%m-%d/%H:%M:%S"`
Context="添加索引、删除索引、修改字段等完毕"
curl 'https://oapi.dingtalk.com/robot/send?access_token=f61dd7d7ead1a0c4ededec2df77818877c22b69472dda1d29c1261dcdaa6ebfe' -H 'Content-Type: application/json' \
-d ' {"msgtype": "text", "text": {"content": "'${datetime},"内容":${Context}'"}}'
[mysql@db_manager ~]$

  

posted @ 2020-07-02 09:55  davie2020  阅读(492)  评论(0)    收藏  举报