📜  在 bash 中向 slack 添加警报 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:14.804000             🧑  作者: Mango

代码示例1
if curl -s --head --request GET https://abr.business.gov.au | grep "200 OK" > /dev/null; then
echo "https://abr.business.gov.au is UP"
else
echo "https://abr.business.gov.au is DOWN"
curl -X POST -H 'Content-type: application/json' --data '{"text":"https://abr.business.gov.au is DOWN"}' https://hooks.slack.com/services/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
fi