示例#1
0
        public Task CheckRt(Models.Job job, int mintue)
        {
            return(Task.Run(() =>
            {
                if (job.RtStatus == 0)
                {
                    return;
                }

                var CkRt = _accessor.CheckRt(job, mintue);

                if (!CkRt.Ok)
                {
                    EmailHelper.Send(job.Emails, "预警触发通知", $@"  

                          <br>
                          <b>【响应超时】触发预警 </b> 

                          <p>超时率预警值:{job.RtRate * 100 + "%"}  当前值:{CkRt.Value.ToDouble() * 100 + "%"} </p>   

                          <p>任务标题:{job.Title}</p>

                          <p>监控节点:{job.Servers}</p>

                          <p>监控频率:{ParseJobCronString(job.CronLike)}</p>

                          <p>设定超时时间:{job.RtTime}ms</p>

                          <p>时间段:{CkRt.Time}</p>

                    ");
                }
            }));
        }