没有项目描述
serverchecks的Python项目详细描述
服务器检查
Python3模块,用于在广泛范围内快速并行执行运行状况检查
具有多协议警报功能的流行Internet基础设施协议。
使用asyncio
库在纯python中实现(不调用shell命令)。
安装
该模块提供了多种口味,使用 第三方python库。
Flavor | Features | Install |
---|---|---|
Core | Checks: TCP, DNS (basic), TLS, URL, POP3, SMTP, IMAP. Alerts: console ,SMTP | ^{ |
DNS | Checks: DNS (full) | ^{ |
DNSSEC | Checks: DNSSEC, DNS (full) | ^{ |
XMPP | Alerts: XMPP | ^{ |
Telegram | Alerts: Telegram | ^{ |
Matrix | Alerts: Matrix | ^{ |
安装所有口味的快捷方式:
pip3 install serverchecks[dnssec,xmpp,telegram,matrix]
用法
创建基本配置文件checks.yaml
:
verbose:yesalert_mode:alwaysalerts:console:-dummy:checks:basicdns:-fqdn:webcookies.org-fqdn:ipsec.pl
运行:
python -m serverchecks.main test.yaml
样本输出:
$ python -m serverchecks.main test.yaml
Initialized alert class <Console>
2 tests completed in 0.03 seconds, 2 successful, 0 failed
✓ webcookies.org 94.130.162.156
✓ ipsec.pl 98.143.148.71