作者:火星小刘 邮箱:[email protected]
- 全部重写,代码更简洁易读
- 舍弃原有simplejson,使用requests模块
- 支持python2
- 注册微信企业号(团队类型) 点击注册 或 注册企业号微信 [点击注册](https://work.weixin.qq.com/)
- 近期腾讯把微信企业号升级为了企业微信,本脚本完全兼容。
- 安装方法一
pip install requests
pip install --upgrade requests
- 安装方法二
wget https://pypi.python.org/packages/c3/38/d95ddb6cc8558930600be088e174a2152261a1e0708a18bf91b5b8c90b22/requests-2.18.3.tar.gz
tar zxvf requests-2.18.3.tar.gz
cd requests-2.18.3
python setup.py build
python setup.py install
git clone https://github.com/X-Mars/Zabbix-Alert-WeChat.git
cp Zabbix-Alert-WeChat/wechat.py /etc/zabbix/alertscripts
chmod +x /etc/zabbix/alertscripts/wechat.py
登陆微信企业号控制台
点击左侧“通讯录”,新增部门(技术部)与子部门(运维部),并添加用户
点击(运维部)后方的三角,修改部门,记录部门ID
点击左侧“应用中心”,新建消息型应用,应用名称为“zabbix报警”
“应用可见范围”,添加刚刚新建的子部门(运维部)
点击“zabbix报警”,记录应用ID
点击左侧“设置”,权限管理,新建普通管理组,名称填写“zabbix报警组”
点击修改“通讯录权限”,勾选(技术部)后方的管理
点击修改“应用权限”,勾选刚刚创建的“zabbix报警”
点击刚刚创建的“zabbix报警组”,记录左侧的CorpID与Secret
- 记录应用ID
- 记录CorpID与Secret
- 记录子部门(运维部)ID
- 添加示警媒介
名称填写微信报警,类型选择脚本,脚本名称填写wechat.py
类型选择微信报警,收件人添加微信企业号通讯录内的,用户帐号
完成
zabbix-alert-wechat's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.