Skip to content

柠檬远程操控系统-基于企业微信、zabbix、ansible

License

Notifications You must be signed in to change notification settings

X-Mars/LemonRemoteControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LemonRemoteControl

项目介绍

基于企业微信、zabbix、ansible的服务器远程操控系统。
已经完成第一期功能:zabbix报警列表,近期会更新第二期功能:服务器操作。

应用场景

  1. zabbix 收到微信报警:tomcat 挂掉了
  2. 打开 柠檬,重启对应tomcat
  3. 服务恢复,收到zabbix ok信息

想想看这样的场景

和女朋友 刚开始前戏,收到一个zabbix报警,这时候爬起来开电脑,岂不是很扫兴,没准还会被女友骂没用

如果有了柠檬就不一样了,拿起手机,都不用拔出来,动动手指解决问题,继续和女友啪啪。

使用方法

企业微信相关:
  1. 注册企业微信 https://work.weixin.qq.com/?from=qyh_redirect
  2. 创建标签,仅允许该标签内的用户访问柠檬系统
  3. 创建应用,设置可见范围,并记录AgentIdSecret
  4. 设置网页授权及JS-SDK,对应你的域名
  5. 设置自定义菜单,跳转到url,比如:
    https://open.weixin.qq.com/connect/oauth2/authorize?appid=dddd&redirect_uri=http%3a%2f%2fwechat.ddddd.com%2flogin%2f&response_type=code&scope=snsapi_privateinfo&agentid=1000002&state=STATE#wechat_redirect
部署应用
  1. 下载应用
git clone https://github.com/X-Mars/LemonRemoteControl.git
pip3.6 install -r requirements.txt
  1. 修改setting.py
WECHAT_SETTING = {
    'corp_id': '222',
    'secret': '222222',
    'agent_id': '1000002',
    'tag_id': '1'
}

ZABBIX_SETTING = {
    'home_url': 'http://zabbix.cn',
    'username': '222',
    'password': '22222'
}
  1. 启动应用
python3.6 LemonRemoteControl/manage.py runserver 0.0.0.0:8000
打开企业微信访问即可

License

996ICU License

About

柠檬远程操控系统-基于企业微信、zabbix、ansible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published