#!/bin/sh Ding_url="https://oapi.dingtalk.com/robot/send?" Headline="告警" IP=`hostname -i` errorExit() { msg="[${Headline}] IP: ${IP} msg: " Ding "${msg}" systemctl stop keepalived.service } Ding() { curl ${Ding_url} -H 'Content-Type: application/json' -d '{"msgtype": "text", "text": { "content": "'""'" } }' } curl --silent --max-time 2 --insecure https://${IP}:6443/ -o /dev/null || errorExit "Error GET https://${IP}:6443/"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)