#!/bin/bash a=`curl -o /dev/null -s -w %{http_code} "http://www.baidu.com"` if [ $a -eq 200 ] then echo ok else echo down| mail -s "mongod down" [email protected] fi
时间: 2024-10-07 13:44:30
#!/bin/bash a=`curl -o /dev/null -s -w %{http_code} "http://www.baidu.com"` if [ $a -eq 200 ] then echo ok else echo down| mail -s "mongod down" [email protected] fi