{"id":13522424,"url":"https://github.com/starsliao/TenSunS","last_synced_at":"2025-03-31T22:31:31.951Z","repository":{"id":37175622,"uuid":"452931090","full_name":"starsliao/TenSunS","owner":"starsliao","description":"🦄后羿 - TenSunS(原ConsulManager)：基于Consul的运维平台：更优雅的Consul管理UI\u0026多云与自建ECS/MySQL/Redis同步Prometheus/JumpServer\u0026ECS/MySQL/Redis云监控指标采集\u0026Blackbox站点监控维护\u0026漏洞通知/资源到期余额告警\u0026各类资源Grafana看板展示","archived":false,"fork":false,"pushed_at":"2025-02-18T02:44:56.000Z","size":5385,"stargazers_count":1426,"open_issues_count":14,"forks_count":259,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-03-27T05:34:19.314Z","etag":null,"topics":["blackbox-exporter","consul","node-exporter","prometheus"],"latest_commit_sha":null,"homepage":"https://StarsL.cn","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/starsliao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-28T03:50:19.000Z","updated_at":"2025-03-22T04:23:12.000Z","dependencies_parsed_at":"2024-01-13T16:25:26.935Z","dependency_job_id":"818d2599-8a21-48d3-a342-3591012e04c0","html_url":"https://github.com/starsliao/TenSunS","commit_stats":null,"previous_names":["starsliao/consulmanager"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starsliao%2FTenSunS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starsliao%2FTenSunS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starsliao%2FTenSunS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starsliao%2FTenSunS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starsliao","download_url":"https://codeload.github.com/starsliao/TenSunS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552479,"owners_count":20795824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blackbox-exporter","consul","node-exporter","prometheus"],"created_at":"2024-08-01T06:00:47.048Z","updated_at":"2025-03-31T22:31:31.945Z","avatar_url":"https://github.com/starsliao.png","language":"Vue","funding_links":[],"categories":["Vue","Monitor"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\r\n\r\n[![StarsL.cn](https://img.shields.io/badge/website-StarsL.cn-orange)](https://starsl.cn)\r\n[![Commits](https://img.shields.io/github/commit-activity/m/starsliao/TenSunS?color=ffff00)](https://github.com/starsliao/TenSunS/commits/main)\r\n[![open issues](http://isitmaintained.com/badge/open/starsliao/TenSunS.svg)](https://github.com/starsliao/TenSunS/issues)\r\n[![Python](https://img.shields.io/badge/python-%3C=v3.10-3776ab)](https://nodejs.org)\r\n[![Node.js](https://img.shields.io/badge/node.js-%3E=v14-229954)](https://nodejs.org)\r\n[![GitHub license](https://img.shields.io/badge/license-WTFPL-blueviolet)](https://github.com/starsliao/TenSunS/blob/main/LICENSE)\r\n[![OSCS Status](https://www.oscs1024.com/platform/badge/starsliao/TenSunS.svg?size=small)](https://www.murphysec.com/dr/Zoyt5g0huRavAtItj2)\r\n\u003c/div\u003e\r\n\r\n![tensuns-arch](https://raw.githubusercontent.com/starsliao/TenSunS/main/screenshot/tensuns-arch.png)\r\n\r\n- **v1.0.0开始支持自定义登录页，登录后你可以在`系统设置`中自定义登录页：[欢迎Show出你的登录页](https://github.com/starsliao/TenSunS/issues/75)。**\r\n- **如果你觉得本项目还不错，[烦请在这里留下脚印](https://github.com/starsliao/TenSunS/issues/74)，简单登记下，也可以分享您的使用经验与实践，感谢支持！**\r\n## 🏷目录\r\n* [🚀概述](#概述)\r\n* [🌈功能描述](#功能描述)\r\n* [💾部署说明](#部署说明)\r\n* [📌更新记录](#更新记录)\r\n* [🎨截图预览](#截图预览点击查看完整截图)\r\n* [🥇最佳实践](#最佳实践)\r\n* [💖特别鸣谢](#特别鸣谢)\r\n\r\n## 🦄概述\r\n\u003e**后羿 - TenSunS**(原ConsulManager)是一个使用Flask+Vue开发，基于Consul的WEB运维平台，弥补了Consul官方UI对Services管理的不足；并且基于Consul的服务发现与键值存储：实现了Prometheus自动发现多云厂商各资源信息；基于Blackbox对站点监控的可视化维护；以及对自建与云上资源的优雅管理与展示。\r\n\r\n## 🌈功能描述\r\n### 🎡1. Consul管理(比官方更优雅的Consul Web UI)\r\n- 支持Consul Services的增删改查，可以批量删除Service。\r\n- 直观的查看每个Services实例的信息，及整体Services的健康状态。\r\n- 可以便捷的对Services实例的Tags、Meta、健康检查配置管理与查询。\r\n\r\n### 💎2. 自建与云资源监控管理(ECS/RDS/Redis)\r\n\u003e**基于Consul实现Prometheus监控目标的自动发现。**\r\n\r\n- ✔**当前已支持对接阿里云、腾讯云、华为云、AWS。**\r\n\r\n  - ⭐支持多云ECS/RDS/Redis的**资源、分组、标签**自动同步到Consul并接入到Prometheus自动发现！(并提供云资源信息查询与自定义页面)\r\n  - ⭐支持多云ECS信息自动同步到**JumpServer**。\r\n  - ⭐支持多云**账户余额**与云资源**到期日**设置阈值告警通知。\r\n  - ⭐支持作为Exporter接入Prometheus：Prometheus增加TenSunS的JOB后可抓取云厂商的部分MySQL/Redis指标。(弥补原生Exporter无法获取部分云MySQL/Redis指标的问题)\r\n- ✔**支持自建主机/MySQL/Redis**接入WEB管理，支持增删改查、批量导入导出，自动同步到Consul并接入到Prometheus监控！\r\n- ✔提供了按需生成Prometheus配置与ECS/MySQL/Redis告警规则的功能。\r\n- ✔设计了多个支持同步的各字段展示的Node_Exporter、Mysqld_Exporter、Redis_Exporter Grafana看板。\r\n\r\n### 🚀3. 站点与接口监控管理\r\n\u003e**基于Consul + Prometheus + Blackbox_Exporter实现站点的自动发现与监控。**\r\n\r\n- 使用Web页面即可对监控目标增删改查，支持站点的分级分组查询管理。\r\n- 支持对监控目标的批量删除与批量导入，数据实时同步到Consul。\r\n- 提供了Blackbox的配置、Prometheus的配置以及Prometheus站点监控的告警规则。\r\n- 设计了一个支持各分级分组字段展示的Blackbox_Exporter Grafana看板。\r\n\r\n### 💫4. 高危漏洞采集与实时告警\r\n- 增加了高危风险漏洞采集与实时告警通知功能。\r\n- 功能开启即可采集最新30个漏洞列表。\r\n- 每小时采集一次，发现新漏洞立即推送到群机器人。\r\n- 支持企微、钉钉、飞书群机器人通知。\r\n\r\n---\r\n\r\n## 💾部署说明\r\n#### ♨TenSunS 版本更新只需在`docker-compose.yaml`所在目录执行`docker-compose pull \u0026\u0026 docker-compose up -d`即可完成更新。\r\n#### 💥新增基于docker/K8S的一键部署脚本,Consul独立部署脚本,安装脚本统一放置install目录\r\n##### 基于docker-compose安装\r\n- [`install/docker-compose/all_install.sh`](https://github.com/starsliao/TenSunS/blob/main/install/docker-compose/all_install.sh)（**推荐**）:\r\n  1. **前提**服务器需要先安装好**docker和docker-compose** (新版docker自带compose指令可以提供docker-compose的功能)\r\n  2. **一键安装**：`curl -s https://starsl.cn/static/img/all_install.sh|sudo bash`\r\n  3. 执行完成后注意检查输出是否有**异常信息**,如果有**iptables**相关的异常可能是docker引起的,可以重启docker(`systemctl restart docker`)后重试。\r\n  4. 运行该脚本后会使用docker-compose启动TenSunS和Consul,安装路径是:/opt/tensuns\r\n  5. 脚本运行完成后会有使用提示及自动生成登录密码,**打开浏览器立刻登录TenSunS,开始体验吧!**\r\n  6. 编辑`docker-compose.yaml`的变量`admin_passwd`的值可以修改登录的密码,修改完成后必须执行`docker-compose up -d`使修改密码生效。\r\n\r\n- [`install/docker-compose/consul_install_only.sh`](https://github.com/starsliao/TenSunS/blob/main/install/docker-compose/consul_install_only.sh) 独立的Consul安装脚本\r\n- [`install/docker-compose/tensuns_install_only.sh`](https://github.com/starsliao/TenSunS/blob/main/install/docker-compose/tensuns_install_only.sh) 独立的TenSunS安装脚本（已经有Consul的用户可以使用这个脚本）\r\n##### 基于K8S安装\r\n- [`install/k8s/install.sh`](https://github.com/starsliao/TenSunS/blob/main/install/k8s/install.sh)：\r\n  1. 运行后需要设置admin用户的密码。\r\n  2. 脚本执行完成后**只会生成TenSunS的安装yaml文件和Consul的安装yaml文件**，不会做其它操作，需要执行`kubectl apply`命令来完成安装。\r\n     \u003eTenSunS是无状态的，有一个初始化容器检查consul连接是否成功，所以建议先安装Consul。Consul是StatefulSet，需要先配置好存储（volumeClaimTemplates），默认是华为云自动创建存储的配置例子，请自行参考修改。\r\n  3. 完成安装后即可使用任意K8S节点IP+31026端口访问，调用的service是tensuns。\r\n##### 注意\r\n- 所有安装方式Consul的管理token会自动生成，可以在Consul的配置文件或TenSunS的docker-compose.yaml中查看。\r\n- 已经部署Consul的用户可以在TenSunS的docker-compose.yaml或者K8S yaml文件的环境变量部分找到:`consul_token`,`consul_url`,并配置上你的Consul信息;环境变量`admin_passwd`是TenSunS登录admin账号的密码。\r\n- **安装使用中遇到问题，以及问题排查，请参考：[FAQ](https://github.com/starsliao/TenSunS/blob/main/docs/FAQ.md)**\r\n##### 🎉活动\r\n- **登录后你可以在`系统设置`中来`自定义登录页`：[欢迎Show出你的登录页](https://github.com/starsliao/TenSunS/issues/75)。**\r\n- **如果你觉得本项目还不错，[烦请在这里留下脚印](https://github.com/starsliao/TenSunS/issues/74)，简单登记下，也可以分享您的使用经验与实践，感谢支持！**\r\n\r\n## 📌[更新记录](https://github.com/starsliao/TenSunS/releases)\r\n\r\n## 🎨截图预览（[点击查看完整截图](https://github.com/starsliao/TenSunS/tree/main/screenshot#%E6%88%AA%E5%9B%BE)）\r\n\r\n\u003cdetails\u003e\u003csummary\u003e💥点击展开\u003c/summary\u003e\r\n  \r\n### Consul Web Manager 界面\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/screenshot/consul3.PNG)\r\n### 多云ECS同步Consul界面\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/screenshot/ecs1.PNG)\r\n### 多云ECS同步JumpServer界面\r\n![图片](https://user-images.githubusercontent.com/3349611/180870935-56e536d2-0b71-4803-b5f8-0839a241c79a.png)\r\n### Node Exporter Dashboard 截图\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/vue-consul/public/node1.png)\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/vue-consul/public/node2.png)\r\n### Blackbox Manager 界面\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/screenshot/blackbox1.PNG)\r\n### Blackbox Exporter Dashboard 截图\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/vue-consul/public/blackbox.png)\r\n### 高危漏洞采集与通知 界面\r\n![](https://raw.githubusercontent.com/starsliao/TenSunS/main/screenshot/bug.png)\r\n##### 钉钉告警通知\r\n![图片](https://user-images.githubusercontent.com/3349611/173263960-4d69fff9-82fe-42a1-ba18-4c78775cf35e.png)\r\n\r\n\u003c/details\u003e\r\n\r\n---\r\n## 🥇最佳实践\r\n- #### [TenSunS：实践与FAQ](https://github.com/starsliao/TenSunS/tree/main/docs)\r\n- #### [应用场景1：如何优雅的基于Consul自动同步ECS主机监控](https://github.com/starsliao/TenSunS/blob/main/docs/ECS%E4%B8%BB%E6%9C%BA%E7%9B%91%E6%8E%A7.md)\r\n- #### [应用场景2：如何优雅的使用Consul管理Blackbox站点监控](https://github.com/starsliao/TenSunS/blob/main/docs/blackbox%E7%AB%99%E7%82%B9%E7%9B%91%E6%8E%A7.md)\r\n- #### [应用场景3：如何把云主机自动同步到JumpServer](https://github.com/starsliao/TenSunS/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)\r\n- #### [应用场景4：使用1个mysqld_exporter监控所有的MySQL实例](https://github.com/starsliao/TenSunS/blob/main/docs/%E5%A6%82%E4%BD%95%E4%BC%98%E9%9B%85%E7%9A%84%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AAmysqld_exporter%E7%9B%91%E6%8E%A7%E6%89%80%E6%9C%89%E7%9A%84MySQL%E5%AE%9E%E4%BE%8B.md)\r\n- #### [应用场景5：使用1个redis_exporter监控所有的Redis实例](https://github.com/starsliao/TenSunS/blob/main/docs/%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AAredis_exporter%E7%9B%91%E6%8E%A7%E6%89%80%E6%9C%89%E7%9A%84Redis%E5%AE%9E%E4%BE%8B.md)\r\n\r\n\r\n## 💖特别鸣谢\r\n### 赞赏与关注公众号【**云原生DevOps**】加入交流群（请备注：后羿），获取更多...\r\n\r\n**如果看不到图片请点击该链接：[https://starsl.cn/static/img/thanks.png](https://starsl.cn/static/img/thanks.png)**\r\n![](https://starsl.cn/static/img/thanks.png)\r\n\r\n---\r\n\r\n### 💰赞赏\r\n##### 🥇榜一大哥：**@浩哥**\r\n##### 🥈榜二大哥：**@南城阿宇** **@weibw** **@星星**\r\n##### 🥉榜三大哥：**@新的奇迹** **@李宫俊** **@锋** **@小明SQLBOY** **@Swancavalier** **@烂泥**\r\n\r\n---\r\n\r\n### ✅提交代码\r\n**[@Yvan](https://github.com/406226161) [@ZZYhho](https://github.com/ZZYhho)** [@dbdocker](https://github.com/dbdocker) [@anatsking](https://github.com/anatsking) [@ylighgh](https://github.com/ylighgh)\r\n\r\n---\r\n\r\n### 🎃提交bug与建议\r\n@会飞的鱼 [@奈](https://github.com/Wp516781950) @Swancavalier [@Show_Lo](https://github.com/ShowXian) @郑不错 @init @weibw  @Martin [@dong9205](https://github.com/dong9205) @MiracleWong [@dissipator](https://github.com/dissipator) @烂泥 [@SkipperSky](https://github.com/klllmxx)\r\n\r\n---\r\n\r\n### 🏆开源推荐\r\n[🌉Go-Ldap-Admin: 基于Go+Vue实现的openLDAP后台管理项目](https://github.com/eryajf/go-ldap-admin)\r\n\r\n---\r\n\r\n## 💖感谢伟大的[Flask](https://github.com/pallets/flask)、[VUE](https://github.com/vuejs/vue)、[vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarsliao%2FTenSunS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarsliao%2FTenSunS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarsliao%2FTenSunS/lists"}