All Projects → hequan2017 → Cmdb

hequan2017 / Cmdb

资产管理、主机管理、批量执行命令|脚本、流量图、webssh 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Labels

Projects that are alternatives of or similar to Cmdb

Wordreview
📚 背单词网页 Django + MySQL + Pug + JS
Stars: ✭ 115 (-4.96%)
Mutual labels:  django
Drf Api Tracking
Fork of aschn/drf-tracking so that we can maintain and release newer versions
Stars: ✭ 117 (-3.31%)
Mutual labels:  django
Conf web
django + etcd + confd 配置管理平台
Stars: ✭ 120 (-0.83%)
Mutual labels:  django
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+1620.66%)
Mutual labels:  django
Copybook
用爬虫爬取小说网站上所有小说,存储到数据库中,并用爬到的数据构建自己的小说网站
Stars: ✭ 117 (-3.31%)
Mutual labels:  django
Paperweekly forum
paperweekly's forum
Stars: ✭ 118 (-2.48%)
Mutual labels:  django
Bag Of Holding
An application to assist in the organization and prioritization of software security activities.
Stars: ✭ 114 (-5.79%)
Mutual labels:  django
Ralph
Ralph is the CMDB / Asset Management system for data center and back office hardware.
Stars: ✭ 1,701 (+1305.79%)
Mutual labels:  django
Hydroshare
HydroShare is a collaborative website for better access to data and models in the hydrologic sciences.
Stars: ✭ 117 (-3.31%)
Mutual labels:  django
Metarec
PyTorch Implementations For A Series Of Deep Learning-Based Recommendation Models (IN PROGRESS)
Stars: ✭ 120 (-0.83%)
Mutual labels:  django
Maria Quiteria
Backend para coleta e disponibilização dos dados 📜
Stars: ✭ 115 (-4.96%)
Mutual labels:  django
Django Autocomplete Light
A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
Stars: ✭ 1,559 (+1188.43%)
Mutual labels:  django
Django Hardcopy
Render PDFs from HTML in Python/Django using Headless Chrome
Stars: ✭ 119 (-1.65%)
Mutual labels:  django
Django Jchart
📈 A Django package for plotting charts using the excellent Chart.JS library.
Stars: ✭ 115 (-4.96%)
Mutual labels:  django
W3develops
The w3develops.org open source codebase - Learn, build, and meetup with other developers on DISCORD https://discord.gg/WphGvTT and YOUTUBE http://bit.ly/codingyt
Stars: ✭ 120 (-0.83%)
Mutual labels:  django
Applicationinsights Python
Application Insights SDK for Python
Stars: ✭ 114 (-5.79%)
Mutual labels:  django
Django Admin Json Editor
Adds json-editor for JSONField in Django Administration
Stars: ✭ 118 (-2.48%)
Mutual labels:  django
Django Subadmin
A special kind of ModelAdmin that allows it to be nested within another ModelAdmin
Stars: ✭ 120 (-0.83%)
Mutual labels:  django
Website
Code for the Outreachy website, based on Python, Django, and Bootstrap.
Stars: ✭ 120 (-0.83%)
Mutual labels:  django
Sarenka
OSINT tool - gets data from services like shodan, censys etc. in one app
Stars: ✭ 120 (-0.83%)
Mutual labels:  django

CMDB

本项目停止更新

本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!

架构


图片

DEMO


  • github链接:https://github.com/hequan2017/cmdb

  • 博客: http://hequan.blog.51cto.com/

  • 群 号:620176501 cmdb开发讨论群

部署说明


  • 环境 python3.6.1 django1.11.4

  • 服务器请yum 安装 sshpass ,不然无法获取资产信息。

git  clone  [email protected]:hequan2017/cmdb.git

cd cmdb/

pip install -r requirements.txt     

pip install https://github.com/darklow/django-suit/tarball/v2

需要从这里下载 必须用这个版本,其他版本的suit不支持1.11版本django

配置 celery 异步任务

  • 执行 install_redis.sh

安装 supervisor

  • supervisor 只支持 python2,不影响启动python3

pip2 install supervisor

  • 生成配置文件,且放在/etc目录下

echo_supervisord_conf > /etc/supervisord.conf

  • 为了不将所有新增配置信息全写在一个配置文件里,这里新建一个文件夹,每个程序设置一个配置文件,相互隔离

mkdir /etc/supervisord.d/

  • 修改配置文件

vim /etc/supervisord.conf

  • 加入以下配置信息
[include]
files = /etc/supervisord.d/*.conf
  • 在supervisord.conf中设置通过web可以查看管理的进程,加入以下代码(默认即有,取消注释修改即可)
[inet_http_server] 
port=0.0.0.0:9001 
username=user
password=123
  • supervisor.conf 拷贝到 /etc/supervisord.d/下面

  • 执行install_webssh.sh 脚本, 安装webconsole模块。 需要修改的内容,可以看脚本。根据自己的情况修改。

  • /usr/bin/python2.7 /usr/bin/supervisord -c /etc/supervisord.conf

  • 登陆 0.0.0.0:9001 账号 user 密码 123 就可以登陆进程管理界面

  • python manage.py runserver 0.0.0.0:8001 ##启动服务

版本

版本2.4

  1. 进程管理 supervisor

图片

版本2.3

  1. celery 异步任务。 可进后台 点击 首页 › Djcelery › 进行管理 图片

版本2.2

  1. web版本ssh,利用webconsole 。 图片

版本2.1

  1. 利用SSH 获取CPU和内存使用率

  2. 利用django-crontab 做定时任务,每分钟获取一遍使用率,保存到monitor表里面,与host做关联。

版本2.0

  1. 第一版版本功能基本定型。 分为3块。 基础资源 主机(执行命令) 脚本(shell/python/yml)

  2. 接下来主要开发 利用zabbix api 调取数据 出图(暂未实现)

图片 图片 图片 图片 图片 图片

后台

图片

历史


版本更新1.7.5

  1. 批量执行shell/yml

版本更新 1.7

  1. 版本小优化

  2. 更新后台admin模块 为suit v2版本

版本更新 1.6

  1. 批量执行命令

版本更新1.5.5

  1. 版本小优化

版本更新1.5

  1. 增加资产更新,分别为 添加 查看 修改 更新 删除。 可真实获取到服务器资产

版本更新1.4

  1. 增加命令行模式

  2. 增加历史命令记录

版本更新1.3

  1. 新增主机管理板块,采用模态对话框。

  2. 增加更新服务器时间板块,采用ansible-playbook ,需要安装 ansible模块。 操作的命令可以看hostinfo/ansible_api/cmd.yml文件

版本更新1.2

  1. 新增权限模块,采用admin自带的auth ,实现简单的权限管理。

无添加权限的,看不见 添加板块 ,同时对权限进行判断, 无权限 打不可,显示 error界面。 2. 根据权限 判断 是否为 管理员。

版本更新1.1.2

1 .修复了echarts 自适应更改大小。

  1. 更换了admin,采用django-suit 界面更好看,中文化。 需要安装 django-suit 模块。 admin的 帐号密码是 admin 1qaz.2wsx http://42.62.6.54:8001/admin

版本更新1.1.1

  1. 新增 图形化展示数据, 采用百度 echart 动态展示 数据。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].