2021
01-03
01-03
python 检测nginx服务邮件报警的脚本
$catcheckserver.py#!/usr/bin/python#-*-coding:utf-8-*- importosimportsocketimportsmtplibfromemail.mime.textimportMIMETextfromemail.headerimportHeader mail_host="smtp.exmail.qq.com"mail_user="yunwei-monitor@111.com"mail_pass="yNE8dcsx" sender='yunwei-monitor@111.com'receivers=['lixinliang@111.com'] defCheckserverdown(): #三个参数...
继续阅读 >