Giter Club home page Giter Club logo

fms's Introduction

FMS(Fault Management System: 运维故障管理系统)

Build Status Python Version Django Version

FMS现有功能:

  • 故障管理
  • 用户管理
  • 邮件管理
  • 统计Dashboard
  • 支持Zabbix故障数据及统计

部署

安装依赖

pip3 install -i https://pypi.douban.com/simple/  -r requirements.txt

修改配置

MySQL配置修改settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'fms',
        'USER': 'root',
        'PASSWORD': 'xxxx',
        'HOST': '127.0.0.1',
        'PORT': '3306',
    }
}

修改故障通知邮箱settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = False
EMAIL_HOST = 'service.simlinux.com'
EMAIL_PORT = 25
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'xxx'
DEFAULT_FROM_EMAIL = 'geekwolf <[email protected]>'

配置同步Zabbix 故障数据settings.py:

ZABBIX_AUTO_RECORD = True
ZABBIX_DB_HOST = '192.168.104.152'
ZABBIX_DB_PORT = '3306'
ZABBIX_DB_USER = 'test'
ZABBIX_DB_PASSWORD = 'geekwolf'
ZABBIX_DB_NAME = 'zabbix'
ZABBIX_SYNC_INTERVAL = 600  # 10分钟

初始化数据

python manage.py makemigrations
python manage.py migrate
python manage.py loaddata default_types
python manage.py loaddata default_user

启动同步进程

screen python manage.py zbxsync
注释:若ZABBIX_AUTO_RECORD = False 可以忽略此步骤

登录

python manage.py runserver
http://127.0.0.1:8000
admin admin

Docker

	docker-compose up
	
	#首次启动需要初始化
	docker exec -it fms_app python manage.py makemigrations
	docker exec -it fms_app python manage.py migrate
	docker exec -it fms_app python manage.py loaddata default_types
	docker exec -it fms_app python manage.py loaddata default_user
	docker exec -it fms_app python manage.py runserver 0.0.0.0:8000

交流

赞赏 微信

QQ群1: 541071512

fms fms fms fms fms

fms's People

Contributors

geekwolf avatar nxsre avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.