监控tomcat某个Java服务挂了并发送邮件通知实践
2021-05-04 22:28
标签:not 监控 增加 执行 ble highlight gre shel 邮件 增加shell脚本 然后使用crontab没隔5分钟执行shell脚本 监控tomcat某个Java服务挂了并发送邮件通知实践 标签:not 监控 增加 执行 ble highlight gre shel 邮件 原文地址:https://www.cnblogs.com/linlf03/p/13194180.html#!/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
文章标题:监控tomcat某个Java服务挂了并发送邮件通知实践
文章链接:http://soscw.com/index.php/essay/82455.html