Giter VIP home page Giter VIP logo

opendevops-cn / codo-tools Goto Github PK

View Code? Open in Web Editor NEW
128.0 8.0 97.0 777 KB

CODO运维工具支持:告警管理、告警自愈、项目管理、事件管理、加密解密、随机密码、提醒管理等

Home Page: http://www.opendevops.cn/

License: GNU General Public License v3.0

Dockerfile 0.76% Python 99.02% Shell 0.22%
tools password mycrypto reminder alert prometheus-alertmanager project-management

codo-tools's Introduction

运维工具

实现一些运维场景中用到的记录及提醒功能,目前包含以下功能

功能

  • 告警管理
  • 提醒管理
  • 项目管理
  • 事件管理
  • 故障管理
  • 加密解密
  • 随机密码
  • 持续更新....

Demo

告警管理

对接Promethues AlertManager WebHooks,平台控制哪些告警信息发送给哪些人。

示例参考

告警内容

[Prometheus AlertManager]


状态:firing  
名称:Node主机CPU利用率过高
告警实例:172.16.1.53:9100
Namespace:monitoring/k8s
告警级别:严重

描述信息:
172.16.1.53:9100: CPU利用率过高于75% (当前值: 92.73333333355065)

恢复内容

[Prometheus AlertManager]


状态:resolved
名称:Node主机CPU利用率过高
告警实例:172.16.1.53:9100
Namespace:monitoring/k8s
告警级别:严重

描述信息:
172.16.1.53:9100: CPU利用率过高于75% (当前值: 92.75000000023283)

报警截图示例

  • Email

  • SNS

提醒管理

项目管理

事件管理

故障管理

部署文档

创建数据库

create database `codo_tools` default character set utf8mb4 collate utf8mb4_unicode_ci;

修改配置

  • 修改settings.py配置信息

初始化表结构

python3 db_sync.py
#也可以直接source doc/codo_tools.sql

Docker部署方式(建议)

  • 修改settings.py配置文件信息,主要是MySQL和Redis配置

  • 修改doc/nginx_ops.conf 域名地址

  • Build 镜像 docker build . -t codo_tools

  • 启动,docker-compose up -d

  • 启动后默认端口:8040

  • 启动后默认日志:

    • 服务日志:/var/log/supervisor/tools.log
    • 定时提醒:/var/log/supervisor/cron_jobs.log

本地部署方式

建议使用虚拟环境 具体参考Dockerfile 内的安装步骤

  • 修改settings.py配置文件信息,主要是MySQL和Redis配置

  • 安装依赖

pip3 install --user --upgrade pip
pip3 install -U git+https://github.com/ss1917/ops_sdk.git
pip3 install -r /var/www/codo-tools/doc/requirements.txt
  • doc目录获取supervisor配置文件 使用 supervisor启动 supervisorctl restart

  • 若启动多进程请使用nginx代理出来,可参看doc/nginx_ops.conf配置文件

  • Debug参考run.sh文件,直接启动

服务注册

由于我们每个模板都是单独部署的,微服务需要在API网关进行注册

示例

rewrite_conf = {
    [gw_domain_name] = {
        rewrite_urls = {
            {
                uri = "/tools",
                rewrite_upstream = "tools.opendevops.cn:8040"  #nginx配置的域名
            },
            {
                uri = "/mg",
                rewrite_upstream = "mg.opendevops.cn:8010"
            },
            {
                uri = "/accounts",
                rewrite_upstream = "mg.opendevops.cn:8010"
            },
        }
    }
}

codo-tools's People

Contributors

ss1917 avatar yanghongfei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codo-tools's Issues

[BUG] 故障管理在未配置存储桶时,无法使用

[BUG] 故障管理在未配置存储桶时,无法使用
必须在系统设置里正确配置存储信息,才能使用,按实际使用来看,这种玩法太苛刻,如果没有存储桶,则无法使用故障管理模块,建议改由用户默认使用数据库存储,如果配置了其他存储,则读取其他存储

404

访问地址是什么。还有人在维护吗

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.