script/检查作业成功率
halliday b1a22f817c 处理登录认证 2024-03-19 17:29:51 +08:00
..
tools 提交代码 2023-12-15 11:26:02 +08:00
SendEmail.py 处理登录认证 2024-03-19 17:29:51 +08:00
check_job_sucessful.sh 修改名称 2024-01-31 09:21:11 +08:00
readme.txt 修改名称 2024-01-31 09:21:11 +08:00

readme.txt

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

用途:
检查指定的代理策略的成功率,并将结果发邮件

使用方法:
1. 修改check_job_sucessful.sh脚本
        1.1 数据库的连接信息
        1.2 添加要检查的代理和策略
            check_sucessful  "代理机器的名称"  "主机ID"  "策略名"
            例如:
            check_sucessful  "6.9长期mh_MySQL定时备份_13.167"  "811da1a9258bb690d58aaef5aa958027"  "长期任务-mysql物理多通道"

2. 修改SendEmail.py指定收发件人的邮件地址

3. 将check_job_sucessful.sh和SendEmail.py上传到服务器

4. 试运行一下脚本,看是否能正常运行
    bash  check_job_sucessful.sh
        --会在当前目录中产生一个 check_report.txt 里面保存着所有的检测信息并会给步骤2中指定的邮箱地址发邮件

5. 做定时任务例如每周一和周五的12点运行一次
    0 12 * * 1,5  bash /home/mh/checkSucess/check_job_sucessful.sh