2022-07-05 16:28:53 +08:00
|
|
|
|
<div align="center">
|
|
|
|
|
|
|
|
|
|
[![StarsL.cn](https://img.shields.io/badge/website-StarsL.cn-orange)](https://starsl.cn)
|
2022-07-05 18:13:08 +08:00
|
|
|
|
[![Commits](https://img.shields.io/github/commit-activity/m/starsliao/ConsulManager?color=ffff00)](https://github.com/starsliao/ConsulManager/commits/main)
|
2022-07-06 08:08:57 +08:00
|
|
|
|
[![open issues](http://isitmaintained.com/badge/open/starsliao/ConsulManager.svg)](https://github.com/starsliao/ConsulManager/issues)
|
2022-07-05 17:46:02 +08:00
|
|
|
|
[![GitHub Stargazers](https://img.shields.io/github/stars/starsliao/ConsulManager?color=ff69b4)](https://github.com/starsliao/ConsulManager/stargazers)
|
2022-07-05 17:42:26 +08:00
|
|
|
|
[![Python](https://img.shields.io/badge/python-%3E=v3.6.8-3776ab)](https://nodejs.org)
|
2022-07-06 08:08:57 +08:00
|
|
|
|
[![Node.js](https://img.shields.io/badge/node.js-%3E=v14-229954)](https://nodejs.org)
|
2022-07-05 17:38:40 +08:00
|
|
|
|
[![GitHub license](https://img.shields.io/badge/license-MIT-blueviolet)](https://github.com/starsliao/ConsulManager/blob/main/LICENSE)
|
2022-07-05 16:28:53 +08:00
|
|
|
|
[![OSCS Status](https://www.oscs1024.com/platform/badge/starsliao/ConsulManager.svg?size=small)](https://www.murphysec.com/dr/Zoyt5g0huRavAtItj2)
|
|
|
|
|
</div>
|
|
|
|
|
|
2022-06-16 13:03:34 +08:00
|
|
|
|
# 🏷目录
|
2022-06-16 13:00:45 +08:00
|
|
|
|
* [🚀概述](#概述)
|
2022-07-03 22:52:08 +08:00
|
|
|
|
* [🌈实现功能](#实现功能)
|
2022-06-16 13:00:45 +08:00
|
|
|
|
* [📌更新记录](#更新记录)
|
|
|
|
|
* [🎨截图预览](#截图预览点击查看完整截图)
|
|
|
|
|
* [💾部署说明](#部署说明)
|
|
|
|
|
* [🥇最佳实践](#最佳实践)
|
|
|
|
|
* [💖特别鸣谢](#特别鸣谢)
|
|
|
|
|
|
2022-07-03 22:56:46 +08:00
|
|
|
|
## 🦄概述
|
2022-07-09 23:13:36 +08:00
|
|
|
|
>**ConsulManager**是一个使用Flask+Vue开发的WEB运维平台,弥补了Consul官方UI对Services管理的不足;并且基于Consul的服务发现与键值存储:实现了各云厂商资源与Prometheus的无缝同步,以及对各类监控资源的优雅管理与展示。
|
2022-07-03 22:51:34 +08:00
|
|
|
|
|
|
|
|
|
## 🌈实现功能
|
2022-07-28 04:49:59 +08:00
|
|
|
|
### 🎡Consul管理(比官方更优雅的Consul Web UI)
|
2022-04-09 18:31:57 +08:00
|
|
|
|
- 支持Consul Services的增删改查,可以批量删除Service。
|
|
|
|
|
- 直观的查看每个Services实例的信息,及整体Services的健康状态。
|
2022-07-28 04:52:22 +08:00
|
|
|
|
- 可以便捷的对Services实例的Tags、Meta、健康检查配置管理与查询。
|
2022-04-09 18:31:57 +08:00
|
|
|
|
|
2022-07-03 22:51:34 +08:00
|
|
|
|
### 💎云资源监控管理
|
|
|
|
|
>**基于Consul实现Prometheus监控目标的自动发现。**
|
|
|
|
|
|
2022-07-28 04:40:47 +08:00
|
|
|
|
- ✔**当前已支持对接阿里云、腾讯云、华为云。**
|
|
|
|
|
|
2022-07-28 04:47:06 +08:00
|
|
|
|
- ✔支持多云ECS的**资源、分组、标签**自动同步到Consul(提供Prometheus自动发现)。
|
|
|
|
|
- ✔支持多云ECS信息自动同步到**JumpServer**。
|
|
|
|
|
- ✔支持多云**账户余额**与云资源**到期日**设置阈值告警通知。
|
2022-07-03 22:51:34 +08:00
|
|
|
|
- 支持自建主机接入WEB管理,并支持WEB批量导入自建主机到Consul。
|
|
|
|
|
- 提供了可查询分组与ECS信息的页面,指标中加入了ECS到期日等信息。
|
|
|
|
|
- 提供了按需生成Prometheus配置与ECS告警规则的功能。
|
|
|
|
|
- 设计了一个支持同步的各字段展示的Node_Exporter Grafana看板。
|
|
|
|
|
|
|
|
|
|
### 🚀站点与接口监控管理
|
|
|
|
|
>**基于Consul + Prometheus + Blackbox_Exporter实现站点的自动发现与监控。**
|
|
|
|
|
|
|
|
|
|
- 使用Web页面即可对监控目标增删改查,支持站点的分级分组查询管理。
|
|
|
|
|
- 支持对监控目标的批量删除与批量导入,数据实时同步到Consul。
|
|
|
|
|
- 提供了Blackbox的配置、Prometheus的配置以及Prometheus站点监控的告警规则。
|
|
|
|
|
- 设计了一个支持各分级分组字段展示的Blackbox_Exporter Grafana看板。
|
|
|
|
|
|
2022-07-03 22:58:11 +08:00
|
|
|
|
### 💫高危漏洞采集与实时告警
|
2022-06-14 22:17:08 +08:00
|
|
|
|
- 增加了高危风险漏洞采集与实时告警通知功能。
|
2022-06-13 01:39:33 +08:00
|
|
|
|
- 功能开启即可采集最新30个漏洞列表。
|
2022-06-13 14:55:44 +08:00
|
|
|
|
- 每小时采集一次,发现新漏洞立即推送到群机器人。
|
2022-06-14 10:29:04 +08:00
|
|
|
|
- 支持企微、钉钉、飞书群机器人通知。
|
2022-06-13 01:39:33 +08:00
|
|
|
|
|
2022-06-16 12:42:18 +08:00
|
|
|
|
## 📌[更新记录](https://github.com/starsliao/ConsulManager/releases)
|
2022-01-29 12:21:59 +08:00
|
|
|
|
|
2022-06-16 13:00:45 +08:00
|
|
|
|
## 🎨截图预览([点击查看完整截图](https://github.com/starsliao/ConsulManager/tree/main/screenshot#%E6%88%AA%E5%9B%BE))
|
2022-07-10 02:06:56 +08:00
|
|
|
|
|
|
|
|
|
<details><summary>💥点击展开</summary>
|
|
|
|
|
|
2022-04-10 12:25:11 +08:00
|
|
|
|
### Consul Web Manager 界面
|
2022-04-29 12:59:13 +08:00
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/consul3.PNG)
|
2022-07-27 10:53:52 +08:00
|
|
|
|
### 多云ECS同步Consul界面
|
2022-04-29 12:59:13 +08:00
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/ecs1.PNG)
|
2022-07-27 10:53:52 +08:00
|
|
|
|
### 多云ECS同步JumpServer界面
|
2022-07-26 04:45:42 +08:00
|
|
|
|
![图片](https://user-images.githubusercontent.com/3349611/180870935-56e536d2-0b71-4803-b5f8-0839a241c79a.png)
|
2022-06-14 21:28:47 +08:00
|
|
|
|
### Node Exporter Dashboard 截图
|
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/vue-consul/public/node1.png)
|
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/vue-consul/public/node2.png)
|
2022-02-11 01:36:36 +08:00
|
|
|
|
### Blackbox Manager 界面
|
2022-04-29 12:59:13 +08:00
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/blackbox1.PNG)
|
2022-06-14 21:28:47 +08:00
|
|
|
|
### Blackbox Exporter Dashboard 截图
|
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/vue-consul/public/blackbox.png)
|
2022-06-13 01:45:12 +08:00
|
|
|
|
### 高危漏洞采集与通知 界面
|
|
|
|
|
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/bug.png)
|
2022-06-14 21:29:34 +08:00
|
|
|
|
##### 钉钉告警通知
|
2022-06-13 09:30:50 +08:00
|
|
|
|
![图片](https://user-images.githubusercontent.com/3349611/173263960-4d69fff9-82fe-42a1-ba18-4c78775cf35e.png)
|
|
|
|
|
|
2022-07-10 02:06:56 +08:00
|
|
|
|
</details>
|
|
|
|
|
|
2022-06-04 17:59:56 +08:00
|
|
|
|
## 💾部署说明
|
2022-07-13 03:31:44 +08:00
|
|
|
|
##### 1. ConsulManager需要依赖`Consul`,请先完成Consul的部署。([Consul部署文档](https://github.com/starsliao/ConsulManager/blob/main/docs/Consul%E9%83%A8%E7%BD%B2%E8%AF%B4%E6%98%8E.md))
|
|
|
|
|
##### 2. 使用`docker-compose`来部署ConsulManager
|
|
|
|
|
- 下载:`wget https://starsl.cn/static/img/docker-compose.yml`(仓库根目录下`docker-compose.yml`)
|
2022-04-10 17:57:42 +08:00
|
|
|
|
- 编辑:`docker-compose.yml`,修改3个环境变量:
|
2022-07-13 03:25:25 +08:00
|
|
|
|
- **`consul_token`**:consul的登录token([如何获取?](https://github.com/starsliao/ConsulManager/blob/main/docs/Consul%E9%83%A8%E7%BD%B2%E8%AF%B4%E6%98%8E.md#%E8%8E%B7%E5%8F%96%E7%99%BB%E5%BD%95token%E8%AE%B0%E5%BD%95secretid%E5%8D%B3%E4%B8%BAconsul%E7%99%BB%E5%BD%95%E7%9A%84token))
|
2022-06-14 22:17:08 +08:00
|
|
|
|
- **`consul_url`**:consul的URL(http开头,/v1要保留)
|
2022-07-13 03:33:55 +08:00
|
|
|
|
- **`admin_passwd`**:登录ConsulManager Web的admin密码
|
2022-02-11 02:31:03 +08:00
|
|
|
|
- 启动:`docker-compose pull && docker-compose up -d`
|
2022-07-13 03:33:55 +08:00
|
|
|
|
- 访问:`http://{IP}:1026`,使用配置的ConsulManager admin密码登录
|
2022-02-11 01:07:06 +08:00
|
|
|
|
---
|
2022-06-16 12:42:18 +08:00
|
|
|
|
## 🥇最佳实践
|
2022-07-04 00:37:56 +08:00
|
|
|
|
- ### [ConsulManager:实践与FAQ](https://github.com/starsliao/ConsulManager/tree/main/docs)
|
2022-06-16 12:45:50 +08:00
|
|
|
|
- ### [应用场景1:如何优雅的基于Consul自动同步ECS主机监控](https://github.com/starsliao/ConsulManager/blob/main/docs/ECS%E4%B8%BB%E6%9C%BA%E7%9B%91%E6%8E%A7.md)
|
|
|
|
|
- ### [应用场景2:如何优雅的使用Consul管理Blackbox站点监控](https://github.com/starsliao/ConsulManager/blob/main/docs/blackbox%E7%AB%99%E7%82%B9%E7%9B%91%E6%8E%A7.md)
|
2022-07-27 10:53:52 +08:00
|
|
|
|
- ### [应用场景3:如何把云主机自动同步到JumpServer](https://github.com/starsliao/ConsulManager/blob/main/docs/%E5%A6%82%E4%BD%95%E6%8A%8A%E4%B8%BB%E6%9C%BA%E8%87%AA%E5%8A%A8%E5%90%8C%E6%AD%A5%E5%88%B0JumpServer.md)
|
2022-04-09 18:31:57 +08:00
|
|
|
|
|
|
|
|
|
|
2022-06-14 21:28:47 +08:00
|
|
|
|
## 💖特别鸣谢
|
2022-06-21 11:09:26 +08:00
|
|
|
|
### 赞赏与关注公众号【**云原生DevOps**】加入交流群(请备注:consul),获取更多...
|
2022-04-29 12:02:51 +08:00
|
|
|
|
![](https://starsl.cn/static/img/thanks.png)
|
2022-04-10 11:42:18 +08:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2022-06-04 17:59:56 +08:00
|
|
|
|
### 💰赞赏
|
2022-06-23 11:38:15 +08:00
|
|
|
|
@南城阿宇 @mac🐬 🌈 @Stephen @蔡志昆 @风与尘的誓约 @Initᯤ⁶ᴳ @254209 @Runner91 @烂泥
|
2022-04-20 04:55:56 +08:00
|
|
|
|
|
2022-04-09 19:19:28 +08:00
|
|
|
|
---
|
2022-04-09 19:15:47 +08:00
|
|
|
|
|
2022-06-04 17:59:56 +08:00
|
|
|
|
### ✅提交代码
|
2022-06-19 12:24:51 +08:00
|
|
|
|
[@dbdocker](https://github.com/dbdocker)
|
2022-04-10 11:42:18 +08:00
|
|
|
|
|
2022-04-09 19:19:28 +08:00
|
|
|
|
---
|
2022-04-09 19:11:00 +08:00
|
|
|
|
|
2022-06-04 17:59:56 +08:00
|
|
|
|
### 🎃提交bug
|
2022-06-23 11:38:15 +08:00
|
|
|
|
@会飞的鱼 [@奈](https://github.com/Wp516781950) @Swancavalier @Show Lo
|
2022-06-04 17:59:56 +08:00
|
|
|
|
|
2022-04-09 19:19:28 +08:00
|
|
|
|
---
|
2022-01-28 12:10:09 +08:00
|
|
|
|
|
2022-06-04 17:59:56 +08:00
|
|
|
|
### 📢提供建议
|
2022-06-13 01:39:33 +08:00
|
|
|
|
[@dong9205](https://github.com/dong9205) [@dissipator](https://github.com/dissipator)
|
2022-04-09 19:21:16 +08:00
|
|
|
|
|
2022-04-09 19:19:28 +08:00
|
|
|
|
---
|
2022-07-09 23:20:45 +08:00
|
|
|
|
|
|
|
|
|
### 🏆开源推荐
|
|
|
|
|
[🌉Go-Ldap-Admin: 基于Go+Vue实现的openLDAP后台管理项目](https://github.com/eryajf/go-ldap-admin)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2022-07-03 18:45:02 +08:00
|
|
|
|
# 💖感谢伟大的[Flask](https://github.com/pallets/flask)、[VUE](https://github.com/vuejs/vue)、[vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|