发微信的python脚本/usr/local/zabbix/alertscripts/zabbix_wx.py
gettoken_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=' + corpid + '&corpsecret=' + corpsecret
token_file = urllib2.urlopen(gettoken_url)
token_data = token_file.read().decode('utf-8')
token_json = json.loads(token_data)
my_token = token_json['access_token']
touser=sys.argv[1] #many user: 'zhangsan|wangwu'
json_content = json.dumps(post_content)
url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + my_token
response = urllib2.urlopen(url,json_content)
print(response.read().decode('utf-8'))
/usr/local/zabbix/alertscripts/zabbix_wx.py 'zhuang_weihong' 'disk is not enough'