增加shell脚本

#!/bin/bash
n=`curl -I -s  http://127.0.0.1:8088/projectName/index.jsp | grep "HTTP/1.1 200" | wc -l`
if [ $n -ne 1 ]
    then
      title='projectName监控通知'
      notice='[www.xxx.com] projectName is not available'
      echo $notice
      echo  $notice | mail -s $title  xxx@163.com

fi

  然后使用crontab没隔5分钟执行shell脚本

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2021-08-11
  • 2021-11-28
  • 2022-01-17
  • 2021-11-27
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2021-05-21
  • 2022-12-23
  • 2021-08-12
  • 2021-09-11
  • 2022-12-23
  • 2021-08-20
相关资源
相似解决方案