(echo, channel, keyword, name)
| 45 | |
| 46 | |
| 47 | def push_msg(echo, channel, keyword, name): |
| 48 | data = get_cron_log(echo) |
| 49 | if not data[0]: return |
| 50 | data = data[1] |
| 51 | if keyword: |
| 52 | if keyword in data: |
| 53 | data = public.get_push_info('计划任务shell告警', ["任务名称:{}".format(name),"告警关键词:{}".format(keyword)]) |
| 54 | send_msg(channel, data) |
| 55 | |
| 56 | |
| 57 | def send_msg(channels, data): |
no test coverage detected