[script,docs]docker-compose部署脚本迁到script目录,文档更新
This commit is contained in:
17
README.md
17
README.md
@@ -14,15 +14,16 @@
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
**官网: [hertzbeat.com](https://hertzBeat.com) | [tancloud.cn](https://tancloud.cn)**
|
||||
**官网: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
|
||||
|
||||
## 🎡 <font color="green">介绍</font>
|
||||
|
||||
> [HertzBeat赫兹跳动](https://github.com/dromara/hertzbeat) 是由[Dromara](https://dromara.org)孵化,[TanCloud](https://tancloud.cn)开源的一个支持网站,API,PING,端口,数据库等监控类型,拥有易用友好的可视化操作界面的开源监控告警项目。
|
||||
> [HertzBeat赫兹跳动](https://github.com/dromara/hertzbeat) 是由[Dromara](https://dromara.org)孵化,[TanCloud](https://tancloud.cn)开源的一个支持网站,API,PING,端口,数据库,操作系统等监控类型,拥有易用友好的可视化操作界面的开源监控告警项目。
|
||||
> 我们也提供了对应的 **[SAAS版本监控云](https://console.tancloud.cn)**,中小团队和个人无需再为了监控自己的网站资源,而去部署一套繁琐的监控系统,**[登录即可免费开始](https://console.tancloud.cn)**。
|
||||
> HertzBeat 支持[自定义监控](https://hertzbeat.com/docs/advanced/extend-point) ,只用通过配置YML文件我们就可以自定义需要的监控类型和指标,来满足常见的个性化需求。
|
||||
> HertzBeat 模块化,`manager, collector, scheduler, warehouse, alerter` 各个模块解耦合,方便理解与定制开发。
|
||||
@@ -83,19 +84,19 @@
|
||||
### 🍞 HertzBeat安装
|
||||
> HertzBeat支持通过源码安装启动,Docker容器运行和安装包方式安装部署。
|
||||
|
||||
##### Docker方式快速安装
|
||||
##### 方式一:Docker方式快速安装
|
||||
`docker run -d -p 1157:1157 -v /opt/application.yml:/opt/hertzbeat/config/application.yml --name hertzbeat tancloud/hertzbeat:[版本tag]`
|
||||
|
||||
详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy)
|
||||
|
||||
##### 通过安装包安装
|
||||
##### 方式二:通过安装包安装
|
||||
1. 下载您系统环境对应的安装包 [GITEE Release](https://gitee.com/dromara/hertzbeat/releases) [GITHUB Release](https://github.com/dromara/hertzbeat/releases)
|
||||
2. 配置HertzBeat的配置文件 hertzbeat/config/application.yml
|
||||
3. 部署启动 `$ ./startup.sh `
|
||||
|
||||
详细步骤参考 [通过安装包安装HertzBeat](https://hertzbeat.com/docs/start/package-deploy)
|
||||
|
||||
##### 本地代码启动
|
||||
##### 方式三:本地代码启动
|
||||
1. 此为前后端分离项目,本地代码调试需要分别启动后端工程manager和前端工程web-app
|
||||
2. 后端:需要`maven3+`和`java8+`环境,修改YML配置信息并启动manager服务
|
||||
3. 前端:需要`nodejs npm angular-cli`环境,待本地后端启动后,在web-app目录下启动 `ng serve --open`
|
||||
@@ -103,6 +104,12 @@
|
||||
|
||||
详细步骤参考 [参与贡献之本地代码启动](CONTRIBUTING.md)
|
||||
|
||||
##### 方式四:Docker-compose统一安装hertzbeat及其依赖服务
|
||||
|
||||
通过 [docker-compose部署脚本](script/docker-compose) 一次性把mysql数据库,tdengine数据库和hertzbeat安装部署。
|
||||
|
||||
详细步骤参考 [docker-compose安装](script/docker-compose/README.md)
|
||||
|
||||
**HAVE FUN**
|
||||
|
||||
## 💬 社区交流
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
## docker-compose部署方案
|
||||
|
||||
- 如果您不想部署而是直接使用,我们提供SAAS监控云-[TanCloud探云](https://console.tancloud.cn),即刻 **[登录注册](https://console.tancloud.cn)** 免费使用。
|
||||
- 如果你想自己本地快速部署的话,可以参考下面进行操作。
|
||||
|
||||
###
|
||||
|
||||
##### 安装Docker&Docker-compose
|
||||
|
||||
1. docker &docker-compos 安装自行百度,如果这也不会,那这个部署方式可能不适合您。
|
||||
|
||||
##### 下载并解压部署包-hertzbeat-for-dockercompose
|
||||
|
||||
1.进入 hertzbeat-for-dockercompose目录
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
2.创建tdengine数据库
|
||||
|
||||
`$ docker exec -it tdengine /bin/bash
|
||||
root@tdengine-server:~/TDengine-server-2.4.0.4#`
|
||||
|
||||
创建名称为hertzbeat的数据库 进入容器后,执行 taos shell 客户端程序。
|
||||
|
||||
`root@tdengine-server:~/TDengine-server-2.4.0.4# taos
|
||||
Welcome to the TDengine shell from Linux, Client Version:2.4.0.4
|
||||
Copyright (c) 2020 by TAOS Data, Inc. All rights reserved.
|
||||
taos>`
|
||||
|
||||
执行创建数据库命令
|
||||
|
||||
`taos> show databases;`
|
||||
|
||||
`taos> CREATE DATABASE hertzbeat KEEP 90 DAYS 10 BLOCKS 6 UPDATE 1;`
|
||||
|
||||
##### 重启应用
|
||||
|
||||
`docker-compose restart hertzbeat`
|
||||
|
||||
|
||||
---
|
||||
怎么样是不是很简单,只要几分钟就可以部署完成,赶紧试试吧!
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
id: contributing
|
||||
title: 参与贡献
|
||||
sidebar_label: 参与贡献
|
||||
---
|
||||
|
||||
Contributing to Sureness
|
||||
=======================================
|
||||
Very welcome to Contribute this project, go further and better with sureness.
|
||||
Firstly, thanks for your interest in contributing! I hope that this will be a pleasant first experience for you, and that you will return to continue contributing.
|
||||
|
||||
Components of Repository:
|
||||
- [sureness's kernel code--sureness-core](https://github.com/usthe/sureness/tree/master/core)
|
||||
- [sureness integration springboot sample(configuration file scheme)--sample-bootstrap](https://github.com/usthe/sureness/tree/master/sample-bootstrap)
|
||||
- [sureness integration springboot sample(database scheme)-sample-tom](https://github.com/usthe/sureness/tree/master/sample-tom)
|
||||
- [sample projects using sureness in each framework(javalin,ktor,quarkus)--samples](https://github.com/usthe/sureness/tree/master/samples)
|
||||
|
||||
## How to contribute?
|
||||
|
||||
Most of the contributions that we receive are code contributions, but you can
|
||||
also contribute to the documentation or simply report solid bugs
|
||||
for us to fix.
|
||||
|
||||
For new contributors, please take a look at issues or pull requests with a tag called below.
|
||||
|
||||
[Good first issue](https://github.com/usthe/sureness/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
|
||||
[Help wanted](https://github.com/usthe/sureness/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
|
||||
[Good first pull request](https://github.com/usthe/sureness/issues?q=label%3A%22good+first+pull+request%22+)
|
||||
|
||||
## Join discussion
|
||||
|
||||
[Github Discussion](https://github.com/usthe/sureness/discussions)
|
||||
[Gitter Channel](https://gitter.im/usthe/sureness)
|
||||
|
||||
----
|
||||
----
|
||||
|
||||
参与贡献
|
||||
=======================================
|
||||
|
||||
非常欢迎参与项目贡献,我们致力于维护一个互相帮助的快乐社区。
|
||||
|
||||
仓库的组成部分:
|
||||
- [sureness的核心代码--sureness-core](https://github.com/usthe/sureness/tree/master/core)
|
||||
- [使用sureness集成springboot搭建权限项目(配置文件方案)--sample-bootstrap](https://github.com/usthe/sureness/tree/master/sample-bootstrap)
|
||||
- [使用sureness集成springboot搭建权限项目(数据库方案)--sample-tom](https://github.com/usthe/sureness/tree/master/sample-tom)
|
||||
- [各个框架使用sureness的样例项目(javalin,ktor,quarkus)--samples](https://github.com/usthe/sureness/tree/master/samples)
|
||||
|
||||
|
||||
## 如何贡献?
|
||||
|
||||
我们不仅仅接收代码的贡献提交,您也可以通过提交文档的更新或者BUG的报告来参与社区贡献。
|
||||
|
||||
如果是新的贡献者,请首先了解参考如下样例的提交Issues,提交Pull Requests如果工作。
|
||||
|
||||
[Good first issue](https://github.com/usthe/sureness/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
|
||||
[Help wanted](https://github.com/usthe/sureness/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
|
||||
[Good first pull request](https://github.com/usthe/sureness/issues?q=label%3A%22good+first+pull+request%22+)
|
||||
|
||||
## 加入交流
|
||||
|
||||
[Github Discussion](https://github.com/usthe/sureness/discussions)
|
||||
[Gitter Channel](https://gitter.im/usthe/sureness)
|
||||
QQ交流群:390083213
|
||||
微信公众号:sureness
|
||||
@@ -11,6 +11,7 @@ slug: /
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
@@ -26,7 +27,7 @@ slug: /
|
||||
|
||||
## 🎡 <font color="green">介绍</font>
|
||||
|
||||
> [HertzBeat赫兹跳动](https://github.com/dromara/hertzbeat) 是由[Dromara](https://dromara.org)孵化,[TanCloud](https://tancloud.cn)开源的一个支持网站,API,PING,端口,数据库等监控类型,拥有易用友好的可视化操作界面的开源监控告警项目。
|
||||
> [HertzBeat赫兹跳动](https://github.com/dromara/hertzbeat) 是由[Dromara](https://dromara.org)孵化,[TanCloud](https://tancloud.cn)开源的一个支持网站,API,PING,端口,数据库,操作系统等监控类型,拥有易用友好的可视化操作界面的开源监控告警项目。
|
||||
> 当然,我们也提供了对应的[SAAS云监控版本](https://console.tancloud.cn),中小团队和个人无需再为了监控自己的网站资源,而去部署一套繁琐的监控系统,[登录即可免费开始](https://console.tancloud.cn)监控之旅。
|
||||
> HertzBeat 支持自定义监控,只用通过配置YML文件我们就可以自定义需要的监控类型和指标,来满足常见的个性化需求。
|
||||
> HertzBeat 模块化,`manager, collector, scheduler, warehouse, alerter` 各个模块解耦合,方便理解与定制开发。
|
||||
|
||||
68
home/docs/others/contributing.md
Normal file
68
home/docs/others/contributing.md
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
id: contributing
|
||||
title: 参与贡献
|
||||
sidebar_label: 参与贡献
|
||||
---
|
||||
|
||||
参与贡献
|
||||
=======================================
|
||||
|
||||
非常欢迎参与项目贡献,我们致力于维护一个互相帮助的快乐社区。
|
||||
|
||||
### 模块
|
||||
|
||||
- **[manager](https://github.com/dromara/hertzbeat/tree/master/manager)** 提供监控管理,系统管理基础服务
|
||||
> 提供对监控的管理,监控应用配置的管理,系统用户租户后台管理等。
|
||||
- **[collector](https://github.com/dromara/hertzbeat/tree/master/collector)** 提供监控数据采集服务
|
||||
> 使用通用协议远程采集获取对端指标数据。
|
||||
- **[scheduler](https://github.com/dromara/hertzbeat/tree/master/scheduler)** 提供监控任务调度服务
|
||||
> 采集任务管理,一次性任务和周期性任务的调度分发。
|
||||
- **[warehouse](https://github.com/dromara/hertzbeat/tree/master/warehouse)** 提供监控数据仓储服务
|
||||
> 采集指标结果数据管理,数据落盘,查询,计算统计。
|
||||
- **[alerter](https://github.com/dromara/hertzbeat/tree/master/alerter)** 提供告警服务
|
||||
> 告警计算触发,监控状态联动,告警配置,告警通知。
|
||||
- **[web-app](https://github.com/dromara/hertzbeat/tree/master/web-app)** 提供可视化控制台页面
|
||||
> 监控告警系统可视化控制台前端
|
||||
|
||||

|
||||
|
||||
## 如何贡献?
|
||||
|
||||
我们不仅仅接收代码的贡献提交,您也可以通过提交文档的更新或者BUG的报告来参与社区贡献。
|
||||
|
||||
如果是新的贡献者,请首先了解参考仓库提交Issues,提交Pull Requests如何工作。
|
||||
|
||||
https://github.com/dromara/hertzbeat/issues
|
||||
https://github.com/dromara/hertzbeat/pulls
|
||||
https://gitee.com/dromara/hertzbeat/issues
|
||||
https://gitee.com/dromara/hertzbeat/pulls
|
||||
|
||||
## 本地代码工程启动
|
||||
|
||||
此为前后端分离项目,本地代码启动需将后端 [manager](https://github.com/dromara/hertzbeat/tree/master/manager) 和前端 [web-app](https://github.com/dromara/hertzbeat/tree/master/web-app) 分别启动生效。
|
||||
|
||||
### 后端启动
|
||||
|
||||
1. 部署启动依赖服务`MYSQL`和`TDengine`数据库
|
||||
2. 需要`maven3+`和`java8+`环境
|
||||
3. 修改配置文件的依赖服务地址等信息-`manager/src/main/resources/application.yml`
|
||||
4. 启动`manager`服务 `manager/src/main/java/com/usthe/manager/Manager.java`
|
||||
|
||||
### 前端启动
|
||||
|
||||
1. 需要nodejs npm环境
|
||||
下载地址:https://nodejs.org/en/download
|
||||
2. 安装yarn `npm install -g yarn`
|
||||
3. 在前端工程目录web-app下执行 `yarn install`
|
||||
4. 全局安装angular-cli `npm install -g @angular/cli@12 --registry=https://registry.npm.taobao.org`
|
||||
5. 待本地后端启动后,在web-app目录下启动本地前端 `ng serve --open`
|
||||
6. 浏览器访问 localhost:4200 即可开始
|
||||
|
||||
## 加入交流
|
||||
|
||||
[Github Discussion](https://github.com/dromara/hertzbeat/discussions)
|
||||
加微信号 tan-cloud 拉您进微信交流群
|
||||
加QQ群号 718618151 进QQ交流群, 验证信息: tancloud
|
||||
微信公众号:tancloudtech
|
||||
[Dromara社区网站](https://dromara.org/)
|
||||
[HertzBeat用户网站](https://support.qq.com/products/379369)
|
||||
@@ -31,16 +31,30 @@ sidebar_label: 快速开始
|
||||
### 🍞 HertzBeat安装
|
||||
> HertzBeat支持通过源码安装启动,Docker容器运行和安装包方式安装部署。
|
||||
|
||||
#### Docker方式快速安装
|
||||
#### 方式一:Docker方式快速安装
|
||||
`docker run -d -p 1157:1157 -v /opt/application.yml:/opt/hertzbeat/config/application.yml --name hertzbeat tancloud/hertzbeat:[版本tag]`
|
||||
|
||||
详细步骤参考 [通过Docker方式安装HertzBeat](docker-deploy.md)
|
||||
|
||||
#### 通过安装包安装
|
||||
#### 方式二:通过安装包安装
|
||||
1. 下载您系统环境对应的安装包 [GITEE Release](https://gitee.com/dromara/hertzbeat/releases) [GITHUB Release](https://github.com/dromara/hertzbeat/releases)
|
||||
2. 配置HertzBeat的配置文件 hertzbeat/config/application.yml
|
||||
3. 部署启动 `$ ./startup.sh `
|
||||
|
||||
详细步骤参考 [通过安装包安装HertzBeat](package-deploy.md)
|
||||
|
||||
#### 方式三:本地代码启动
|
||||
1. 此为前后端分离项目,本地代码调试需要分别启动后端工程manager和前端工程web-app
|
||||
2. 后端:需要`maven3+`和`java8+`环境,修改YML配置信息并启动manager服务
|
||||
3. 前端:需要`nodejs npm angular-cli`环境,待本地后端启动后,在web-app目录下启动 `ng serve --open`
|
||||
4. 浏览器访问 localhost:4200 即可开始
|
||||
|
||||
详细步骤参考 [参与贡献之本地代码启动](../others/contributing)
|
||||
|
||||
#### 方式四:Docker-Compose统一安装hertzbeat及其依赖服务
|
||||
|
||||
通过 [docker-compose部署脚本](https://gitee.com/dromara/hertzbeat/tree/master/script/docker-compose) 一次性把mysql数据库,tdengine数据库和hertzbeat安装部署。
|
||||
|
||||
详细步骤参考 [docker-compose安装](https://gitee.com/dromara/hertzbeat/tree/master/script/docker-compose/README.md)
|
||||
|
||||
**HAVE FUN**
|
||||
|
||||
@@ -97,7 +97,8 @@
|
||||
"others/design",
|
||||
"others/sponsor",
|
||||
"others/private",
|
||||
"others/resource"
|
||||
"others/resource",
|
||||
"others/contributing"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
1
home/static/img/badge/os-monitor.svg
Normal file
1
home/static/img/badge/os-monitor.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="55" height="20" role="img" aria-label="操作系统"><title>操作系统</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="55" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="0" height="20" fill="#4c1"/><rect x="0" width="55" height="20" fill="#4c1"/><rect width="55" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="275" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="450">操作系统</text><text x="275" y="140" transform="scale(.1)" fill="#fff" textLength="450">操作系统</text></g></svg>
|
||||
|
After Width: | Height: | Size: 929 B |
52
script/docker-compose/README.md
Normal file
52
script/docker-compose/README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
## docker-compose部署方案
|
||||
|
||||
- 如果不想部署而是直接使用,我们提供SAAS监控云-[TanCloud探云](https://console.tancloud.cn),即刻 **[登录注册](https://console.tancloud.cn)** 免费使用。
|
||||
- 如果想自己本地快速部署的话,可以参考下面进行操作。
|
||||
|
||||
##### 安装Docker & Docker-compose
|
||||
|
||||
1. 下载安装 docker 环境 & docker-compose 环境
|
||||
请参考 [Docker官网文档](https://docs.docker.com/get-docker/), [Compose安装](https://docs.docker.com/compose/install/)
|
||||
```
|
||||
$ docker -v
|
||||
Docker version 20.10.12, build e91ed57
|
||||
```
|
||||
|
||||
##### docker compose部署heartbeat及其依赖服务
|
||||
|
||||
1. 下载hertzbeat-docker-compose安装部署脚本文件
|
||||
脚本文件位于代码仓库下`script/docker-compose` 链接 [script/docker-compose](https://gitee.com/dromara/hertzbeat/tree/master/script/docker-compose)
|
||||
|
||||
|
||||
2. 进入部署脚本 docker-compose 目录, 执行
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
3. 进入tdengine创建hertzbeat数据库
|
||||
|
||||
`$ docker exec -it tdengine /bin/bash
|
||||
root@tdengine-server:~/TDengine-server-2.4.0.4#`
|
||||
|
||||
创建名称为hertzbeat的数据库 进入容器后,执行 taos shell 客户端程序。
|
||||
|
||||
`root@tdengine-server:~/TDengine-server-2.4.0.4# taos
|
||||
Welcome to the TDengine shell from Linux, Client Version:2.4.0.4
|
||||
Copyright (c) 2020 by TAOS Data, Inc. All rights reserved.
|
||||
taos>`
|
||||
|
||||
执行创建数据库命令
|
||||
|
||||
`taos> show databases;`
|
||||
|
||||
`taos> CREATE DATABASE hertzbeat KEEP 90 DAYS 10 BLOCKS 6 UPDATE 1;`
|
||||
|
||||
##### 重启应用
|
||||
|
||||
`docker-compose restart hertzbeat`
|
||||
|
||||
##### 开始探索HertzBeat
|
||||
浏览器访问 http://ip:1157/console 开始使用HertzBeat进行监控告警。
|
||||
|
||||
---
|
||||
|
||||
怎么样是不是很简单,只要几分钟就可以部署完成,赶紧试试吧!
|
||||
@@ -39,7 +39,7 @@ spring:
|
||||
mail:
|
||||
# 请注意邮件服务器地址:qq邮箱为 smtp.qq.com qq企业邮箱为 smtp.exmail.qq.com
|
||||
host: smtp.qq.com
|
||||
username: 936751812@qq.com
|
||||
username: example@qq.com
|
||||
# 请注意此非邮箱账户密码 此需填写邮箱授权码
|
||||
password: xxqzvuqbnqvbbdac
|
||||
port: 465
|
||||
@@ -13,6 +13,7 @@ excludedResource:
|
||||
- /account/auth/**===*
|
||||
- /===get
|
||||
- /i18n/**===get
|
||||
- /apps/hierarchy===get
|
||||
# web ui 静态资源
|
||||
- /console/**===get
|
||||
- /**/*.html===get
|
||||
@@ -1,2 +1,2 @@
|
||||
*
|
||||
.gitignore
|
||||
!.gitignore
|
||||
@@ -1,2 +1,2 @@
|
||||
*
|
||||
.gitignore
|
||||
!.gitignore
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
- heartzbeat
|
||||
|
||||
TDengine:
|
||||
image: "tdengine/tdengine:latest"
|
||||
image: "tdengine/tdengine:2.4.0.12"
|
||||
container_name: tdengine
|
||||
hostname: tdengine
|
||||
restart: always
|
||||
@@ -97,19 +97,22 @@ export class MonitorService {
|
||||
): Observable<Message<Page<Monitor>>> {
|
||||
pageIndex = pageIndex ? pageIndex : 0;
|
||||
pageSize = pageSize ? pageSize : 8;
|
||||
status = status ? status : 9;
|
||||
// 注意HttpParams是不可变对象 需要保存set后返回的对象为最新对象
|
||||
let httpParams = new HttpParams();
|
||||
httpParams = httpParams.appendAll({
|
||||
name: searchValue,
|
||||
host: searchValue,
|
||||
status: status,
|
||||
pageIndex: pageIndex,
|
||||
pageSize: pageSize
|
||||
});
|
||||
if (status != undefined && status != 9) {
|
||||
httpParams = httpParams.append('status', status);
|
||||
}
|
||||
if (app != undefined) {
|
||||
httpParams = httpParams.append('app', app);
|
||||
}
|
||||
if (searchValue != undefined && searchValue != '' && searchValue.trim() != '') {
|
||||
httpParams = httpParams.append('name', searchValue);
|
||||
httpParams = httpParams.append('host', searchValue);
|
||||
}
|
||||
const options = { params: httpParams };
|
||||
return this.http.get<Message<Page<Monitor>>>(monitors_uri, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user