首页 > 微信 > 详细

【Problem Resolved】zabbix微信报警,一开始可以成功报警,之后报警突然不行

时间:2018-02-24 14:47:12      阅读:374      评论:0      收藏:0      [点我收藏+]
Traceback (most recent call last): File "/usr/lib/zabbix/alertscripts/wechat.py", line 61, in <module> access_token_response = msgsender.geturl(msgsender.gettoken_url, msgsender.gettoken_content) File "/usr/lib/zabbix/alertscripts/wechat.py", line 41, in geturl response = urllib2.urlopen(‘%s?%s‘ % (url,data)) File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib64/python2.7/urllib2.py", line 449, in _open ‘_open‘, req) File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 1258, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

?
解决办法:检测zabbix-server的网络是否可以解析外网域名,本人是因为zabbix-server的dns出现问题,所以修改/etc/resolv.conf 添加nameserver 114.114.114.114 (可用的DNS服务器)

【Problem Resolved】zabbix微信报警,一开始可以成功报警,之后报警突然不行

原文:http://blog.51cto.com/jackor/2072608

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!