From 3609249490192ad0712d0c7eb7db6398e770246e Mon Sep 17 00:00:00 2001 From: pengtao Date: Sun, 29 Sep 2019 14:25:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0zabbix=20=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=8A=B6=E6=80=81=E7=9B=91=E6=8E=A7=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- monitor_ad_interface.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 monitor_ad_interface.py diff --git a/monitor_ad_interface.py b/monitor_ad_interface.py new file mode 100644 index 0000000..b0d9e31 --- /dev/null +++ b/monitor_ad_interface.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +import json +import requests + +url = "http://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=selfChecking" + +r = requests.get(url) +if r.status_code != 200: + print(1) +else: + print(json.loads(r.content).get('errcode', 1))