2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 | 简体中文 23 | | 24 | English 25 |
26 | 27 | ## 关于 Lite-monitor 28 | 29 | **** 30 | 31 | 这是一个快速、准确、轻量化的服务器监控系统,拥有秒级的监控粒度,支持历史数据查看便于拥有多平台服务器的用户集中管理: 32 | 33 |  34 | 35 | 支持一键 SSH 到目标主机,便于快速操作: 36 | 37 |  38 | 39 | 支持多用户管理不同主机: 40 | 41 |  42 | 43 | **** 44 | 45 | ## 服务端部署 46 | 47 | **** 48 | 49 | ### 环境依赖 50 | 51 | **** 52 | 53 | - JDK17 54 | - SpringBoot3 55 | - Vue3 56 | - MySQL 5.7+ 57 | - Redis 58 | - InfluxDB 59 | - RabbitMQ 60 | 61 | **** 62 | 63 | ### 手动部署 64 | 65 | **** 66 | 67 | 部署 Redis: 68 | 69 | - 设置端口 `6379` 70 | - 使用 `0` 号数据库 71 | 72 | 部署 MySQL: 73 | 74 | - 设置用户 `root`,密码 `monitormysqlroot` 75 | - 创建数据库 `lite-monitor-db`,字符集设置为 `utf8mb4` 76 | - 执行导入 SQL 脚本,文件为 [`lite-monitor-db.sql`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-db.sql) 77 | 78 | 部署 InfluxDB: 79 | 80 | - 访问主机的 `8086` 端口进入 InfluxDB 的控制台 81 | - 设置用户为 `admin`,密码 `monitorinfluxdbadmin` 82 | - 创建新的 Bucket,名称为:`lite-monitor`,推荐设置过期时间为 7 天 83 | 84 | 部署 RabbitMQ: 85 | 86 | - 添加用户 `admin`,密码 `monitorrabbitmqadmin`,虚拟主机 `/` 87 | - 在 vhost / 下创建队列:mail 和 report 88 | - `rabbitmqadmin declare queue name=mail auto_delete=false durable=true --vhost /` 89 | - `rabbitmqadmin declare queue name=report auto_delete=false durable=true --vhost /` 90 | 91 | 92 | 部署 Redis: 93 | 94 | - 无需设置密码验证 95 | 96 | 部署后端: 97 | 98 | - 拉取本项目仓库到本地,对 `lite-monitor-server` 执行 `maven` 构建 99 | - 如果数据库等配置不与本例相同,请注意修改 `application-prod.yml` 中的配置 100 | - 使用 `maven` 打包,注意勾选 `prod` 环境配置并跳过测试 101 | - 将打包好的后端 `jar` 上传到管理监控的主机执行,主机需要 `Java17` 运行环境,默认监听 `8010` 端口 102 | 103 | 部署前端: 104 | 105 | - 配置 [`main.js`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/main.js) 的 `axios.defaults.baseURL` 中的主机 `ip` 106 | - 配置 [`Terminal.vue`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/component/Terminal.vue) 的 `ws` 地址为主机 `ip` 107 | - 本地执行 `npm` 构建,将打包后的前端文件上传到主机 108 | 109 | 部署 Nginx: 110 | 111 | - 根据实际需要进行配置 112 | 113 | 默认登录用户为 `admin`,密码默认为 `123456`,可在【安全】管理界面修改邮箱和密码 114 | 115 | **** 116 | 117 | ### Docker 部署 118 | 119 | **** 120 | 121 | 拉取本项目仓库到本地 122 | 123 | 修改前端路由: 124 | 125 | - 配置 [`main.js`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/main.js) 的 `axios.defaults.baseURL` 中的主机 `ip` 126 | - 配置 [`Terminal.vue`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/component/Terminal.vue) 的 `ws` 地址为主机 `ip` 127 | 128 | 执行 [`docker-compose.yml`](https://github.com/Doge2077/lite-monitor/blob/main/docker-compose.yml) 到目标服务器 129 | 130 | 初始化 MySQL: 131 | 132 | - 执行导入 SQL 脚本,文件为 [`lite-monitor-db.sql`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-db.sql) 133 | 134 | 初始化 InfluxDB: 135 | 136 | - 访问主机的 `8086` 端口进入 InfluxDB 的控制台 137 | - 设置用户为 `admin`,密码 `monitorinfluxdbadmin` 138 | - 创建新的 Bucket,名称为:`lite-monitor`,推荐设置过期时间为 7 天 139 | 140 | 默认登录用户为 `admin`,密码默认为 `123456`,可在【安全】管理界面修改邮箱和密码 141 | 142 | **** 143 | 144 | ## 客户端部署 145 | 146 | **** 147 | 148 | ### 环境依赖 149 | 150 | **** 151 | 152 | - JDK17 153 | - SpringBoot3 154 | 155 | **** 156 | 157 | ### 手动部署 158 | 159 | **** 160 | 161 | - 拉取本项目仓库到本地,对 `lite-monitor-client` 执行 `maven` 构建 162 | - 使用 `maven` 打包,注意勾选 `prod` 环境配置并跳过测试 163 | - 将打包好的后端 `jar` 上传到需要被监控的主机执行,主机需要 `Java17` 运行环境 164 | - 首次运行会在当前目录创建 `config-local` 目录,并要求注册到服务端,输入服务端主机 `ip:port` 和服务端生成的 `token` 即可 165 | - 支持将客户端以 `systemd` 方式注册为服务,具体配置可参考其他资料 166 | 167 | **** 168 | -------------------------------------------------------------------------------- /lite-monitor-web/src/component/CreateSubAccount.vue: -------------------------------------------------------------------------------- 1 | 75 | 76 | 77 |
4 |
5 |
6 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 | 简体中文 25 | | 26 | English 27 |
28 | 29 | ## About Lite-monitor 30 | 31 | **** 32 | 33 | This is a fast, accurate, lightweight server monitoring system with second-level monitoring granularity, supporting historical data view for multi-platform server users: 34 | 35 |  36 | 37 | Supports one-click SSH to the target host, which is convenient for quick operations: 38 | 39 |  40 | 41 | Supports multi-user management of different hosts: 42 | 43 |  44 | 45 | **** 46 | 47 | ## Server Deployment 48 | 49 | **** 50 | 51 | ### Environment Dependencies 52 | 53 | **** 54 | 55 | - JDK17 56 | - SpringBoot3 57 | - Vue3 58 | - MySQL 5.7+ 59 | - Redis 60 | - InfluxDB 61 | - RabbitMQ 62 | 63 | **** 64 | 65 | ### Manual Deployment 66 | 67 | **** 68 | 69 | Redis Deployment: 70 | 71 | - Set port `6379` 72 | - Use the `0` database 73 | 74 | MySQL Deployment: 75 | 76 | - Set user `root`, password `monitormysqlroot` 77 | - Create database `lite-monitor-db` with character set `utf8mb4` 78 | - Run the import SQL script, the file is [`lite-monitor-db.sql`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-db.sql) 79 | 80 | InfluxDB Deployment: 81 | 82 | - Access the host's console on port `8086` 83 | - Set the user to `admin` with the password `monitorinfluxdbadmin` 84 | - Create a new Bucket with the name: `lite-monitor`, we recommend setting an expiration time of 7 days 85 | 86 | RabbitMQ Deployment: 87 | 88 | - Add user `admin`, password `monitorrabbitmqadmin`, virtual host `/` 89 | - `rabbitmqadmin declare queue name=mail auto_delete=false durable=false --vhost` 90 | - `rabbitmqadmin declare queue name=report auto_delete=false durable=false --vhost` 91 | 92 | Redis Deployment: 93 | 94 | - No password validation required 95 | 96 | Backend Deployment: 97 | 98 | - Pull this project repository locally, run `maven` build for `lite-monitor-server` 99 | - If database configurations differ from this example, please modify the configurations in `application-prod.yml` 100 | - Package with `maven`, ensure `prod` environment config is selected and tests are skipped 101 | - Upload the packaged backend `jar` to the monitoring host for running. The host requires `Java17` runtime environment and listens on port `8010` by default 102 | 103 | Frontend Deployment: 104 | 105 | - Configure the host `ip` in [`main.js`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/main.js) under `axios.defaults.baseURL` 106 | - Configure the `ws` address in [`Terminal.vue`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/component/Terminal.vue) to the host `ip` 107 | - Run `npm` build locally and upload the built frontend files to the host 108 | 109 | Nginx Deployment: 110 | 111 | - Configure based on actual needs 112 | 113 | The default login user is `admin` with the default password `123456`, you can modify the email and password in the [Security] management page 114 | 115 | **** 116 | 117 | ### Docker Deployment 118 | 119 | **** 120 | 121 | Pull this project repository locally 122 | 123 | Modify frontend routing: 124 | 125 | - Configure the host `ip` in [`main.js`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/main.js) under `axios.defaults.baseURL` 126 | - Configure the `ws` address in [`Terminal.vue`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-web/src/component/Terminal.vue) to the host `ip` 127 | 128 | Run [`docker-compose.yml`](https://github.com/Doge2077/lite-monitor/blob/main/docker-compose.yml) on the target server 129 | 130 | MySQL Initialization: 131 | 132 | - Run the import SQL script, the file is [`lite-monitor-db.sql`](https://github.com/Doge2077/lite-monitor/blob/main/lite-monitor-db.sql) 133 | 134 | InfluxDB Initialization: 135 | 136 | - Access the host console on port `8086` 137 | - Set user to `admin`, password `monitorinfluxdbadmin` 138 | - Create a new Bucket named `lite-monitor`, we recommend a 7-day expiration time 139 | 140 | The default login user is `admin` with the default password `123456`, you can modify the email and password on the [Security] management page 141 | 142 | **** 143 | 144 | ## Client Deployment 145 | 146 | **** 147 | 148 | ### Environment Dependencies 149 | 150 | **** 151 | 152 | - JDK17 153 | - SpringBoot3 154 | 155 | **** 156 | 157 | ### Manual Deployment 158 | 159 | **** 160 | 161 | - Pull the repository locally, run `maven` build for `lite-monitor-client` 162 | - Package with `maven`, ensure `prod` environment config is selected and tests are skipped 163 | - Upload the packaged backend `jar` to the host that needs monitoring. The host needs the `Java17` runtime environment 164 | - The first run will create a `config-local` directory in the current directory, requiring registration with the server. Enter server host `ip:port` and the `token` generated by the server 165 | - Support for registering the client as a `systemd` service, specific configurations can refer to other documentation -------------------------------------------------------------------------------- /lite-monitor-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |