焦油zxvf heirloom-mailx_12.5.orig.tar。广州
12.5 cd传家宝——mailx/
做,,使安装UCBINSTALL=/usr/bin/安装
cp/etc/nail.rc/etc/nail.rc.贝克
vim/etc/nail.rc
设置从=xxx@126.com发送邮箱
设置smtp=smtp.126.com发送邮箱smtp地址
设置smtp-auth-user=xxx@126.com接收邮箱
设置smtp-auth-password=xxx邮箱密码
设置smtp-auth=登录
回声123 | mailx - v - s“zabbix测试”邮件xxx@126.com
/root/health_crm联系。sh
/tmp/health_crm/health_crm联系。日志
vim/root/health_crm.sh
# !/bin/bash
设置我=10
,而真正的
让我=+ 10”
反应=http://xx.com/的卷发——沉默我| egrep“HTTP/1.1”| awk - f ' ' '{打印$ 2}'
代码=' curl http://xxx.com/聊脑诒?/tmp/health_tomcat/health_crm。日志”
如果[$响应!=200]
然后
回声“美元反应”|邮件- s”你的网站不是现在!“xx@xx.com其他
curl http://xx.com/聊脑诒?/tmp/health_crm/health_crm。睡眠日志
300
fi做
#做
crontab - e
5 * * * *根/bin/sh/root/health_crm。sh
服务crond重启,,ntpd服务重启