Skip to content

Commit

Permalink
Merge branch 'apache:master' into improve-add-flink-on-yarn-monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangshenghang authored Jun 12, 2024
2 parents 0514c74 + 009a512 commit 1cc86c8
Show file tree
Hide file tree
Showing 66 changed files with 4,099 additions and 3,137 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ Detailed config refer to [Install HertzBeat via Package](https://hertzbeat.apach

Detailed steps refer to [CONTRIBUTING](CONTRIBUTING.md)

##### 4:Install All(hertzbeat+mysql+tsdb) via Docker-compose
##### 4:Install All(hertzbeat+postgresql+tsdb) via Docker-compose

Install the mysql/postgresql database, iotdb/tdengine/victoria-metrics database and hertzbeat at one time through [docker-compose deployment script](script/docker-compose).
Install the postgresql/mysql database, victoria-metrics/iotdb/tdengine database and hertzbeat at one time through [docker-compose deployment script](script/docker-compose).

Detailed steps refer to [Install via Docker-Compose](script/docker-compose/README.md)

##### 5. Install All(hertzbeat+collector+mysql+tsdb) via kubernetes helm charts
##### 5. Install All(hertzbeat+collector+postgresql+tsdb) via kubernetes helm charts

Install HertzBeat cluster in a Kubernetes cluster by Helm chart.

Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MAN

详细步骤参考 [参与贡献之本地代码启动](CONTRIBUTING.md)

##### 方式四:Docker-Compose 统一安装 hertzbeat+mysql+tsdb
##### 方式四:Docker-Compose 统一安装 hertzbeat+postgresql+tsdb

通过 [Docker-Compose 部署脚本](script/docker-compose) 一次性把 mysql/postgresql 数据库, iotdb/tdengine/victoria-metrics 时序数据库和 hertzbeat 安装部署。
通过 [Docker-Compose 部署脚本](script/docker-compose) 一次性把 postgresql/mysql 数据库, victoria-metrics/iotdb/tdengine 时序数据库和 hertzbeat 安装部署。

详细步骤参考 [通过Docker-Compose安装HertzBeat](script/docker-compose/README.md)

##### 方式五:Kubernetes Helm Charts 部署 hertzbeat+collector+mysql+tsdb
##### 方式五:Kubernetes Helm Charts 部署 hertzbeat+collector+postgresql+tsdb

通过 Helm Chart 一次性将 HertzBeat 集群组件部署到 Kubernetes 集群中。

Expand Down
147 changes: 147 additions & 0 deletions home/blog/2024-06-11-hertzbeat-v1.6.0-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# HertzBeat 1.6.0 Upgrade Guide

**Note: This guide is applicable for upgrading from versions prior to 1.6.0 to version 1.6.0.**

## Binary Installation Package Upgrade

### Upgrade Java Environment

Since version 1.6.0 uses Java 17 and the installation package no longer provides a built-in JDK version, use the new Hertzbeat according to the following situations:

- When the default environment variable on your server is Java 17, you do not need to take any action for this step.
- When the default environment variable on your server is not Java 17, such as Java 8 or Java 11, and if there are no other applications on your server that require a lower version of Java, download the appropriate version from [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) according to your system, and search the engine for how to set a new environment variable pointing to the new Java 17.
- When the default environment variable on your server is not Java 17, such as Java 8 or Java 11, and if there are other applications on your server that require a lower version of Java, download the appropriate version from [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) according to your system, and rename the extracted folder to `java`, then copy it to the Hertzbeat extraction directory.

### Upgrade Database

Go to [https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), choose the directory of your database and execute the corresponding `V160__update_column.sql` file for the upgrade SQL.

### Upgrade Configuration Files

Due to significant changes in `application.yml` and `sureness.yml`, it is recommended to directly use the new `yml` configuration files and then modify them based on your own needs.

#### `application.yml` generally needs to modify the following parts:

Default is:
```yaml
datasource:
driver-class-name: org.h2.Driver
username: sa
password: 123456
url: jdbc:h2:./data/hertzbeat;MODE=MYSQL
hikari:
max-lifetime: 120000

jpa:
show-sql: false
database-platform: org.eclipse.persistence.platform.database.MySQLPlatform
database: h2
properties:
eclipselink:
logging:
level: SEVERE
```
If you change to a MySQL database, here is an example:
```yaml
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
hikari:
max-lifetime: 120000

jpa:
show-sql: false
database-platform: org.eclipse.persistence.platform.database.MySQLPlatform
database: mysql
properties:
eclipselink:
logging:
level: SEVERE
```
#### `sureness.yml` modification is optional, usually when you need to change account passwords:

```yaml
# account info config
# eg: admin has role [admin,user], password is hertzbeat
# eg: tom has role [user], password is hertzbeat
# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289
account:
- appId: admin
credential: hertzbeat
role: [admin]
- appId: tom
credential: hertzbeat
role: [user]
- appId: guest
credential: hertzbeat
role: [guest]
- appId: lili
# credential = MD5(password + salt)
# plain password: hertzbeat
# attention: digest authentication does not support salted encrypted password accounts
credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
role: [user]
```

### Add the corresponding database drivers

Due to the Apache Foundation's requirements for license compliance, HertzBeat's installation package cannot include dependencies with GPL licenses such as MySQL, Oracle, etc. Users need to add them themselves. Users can download the drivers from the following links and copy them to the `ext-lib` directory of the installation:

- MySQL: [https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip)
- Oracle (If you want to monitor Oracle, these two drivers are required):
- [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar)
- [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar)

Next, run the start-up script as before to experience the latest HertzBeat 1.6.0!

## Docker Upgrade - Mysql Database

- Stop the HertzBeat container:
```
docker stop hertzbeat
```

- Upgrade the database script:
- Go to [https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), choose the directory of your database and execute the corresponding `V160__update_column.sql` file in MySQL.

- Upgrade the configuration files:
- As mentioned, due to significant changes in `application.yml` and `sureness.yml`, it is recommended to directly mount and use the new `yml` configuration files, and then modify them based on your own needs.

- Add the corresponding database drivers:
- Due to the Apache Foundation's license compliance requirements, HertzBeat's installation package cannot include MySQL, Oracle, and other GPL-licensed dependencies. Users need to add them themselves by downloading the driver jars from the above links and placing them in the local `ext-lib` directory, then mounting `ext-lib` to the container's `/opt/hertzbeat/ext-lib` directory when starting.

Next, run HertzBeat using Docker as before to experience the latest HertzBeat 1.6.0!

## Docker Installation Upgrade - H2 Built-in Database (Not recommended for production use)

- Stop the HertzBeat container:
```
docker stop hertzbeat
```

- Edit the H2 database files:
- Assuming you have mounted the H2 database files in the `data` directory to the local system, or copied the `/opt/hertzbeat/data` directory from the old container manually.
- Download the H2 driver jar from [https://mvnrepository.com/artifact/com.h2database/h2/2.2.220](https://mvnrepository.com/artifact/com.h2database/h2/2.2.220).
- Start the database locally using the H2 driver jar:
```
java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456
```

- Upgrade the configuration files:
- As mentioned, due to significant changes in `application.yml` and `sureness.yml`, it is recommended to directly mount and use the new `yml` configuration files, and then modify them based on your own needs.

- Add the corresponding database drivers:
- As mentioned, due to the Apache Foundation's license compliance requirements, HertzBeat's installation package cannot include MySQL, Oracle, and other GPL-licensed dependencies. Users need to add them themselves by downloading the driver jars from the above links and placing them in the local `ext-lib` directory, then mounting `ext-lib` to the container's `/opt/hertzbeat/ext-lib` directory when starting.

Next, run the Docker to start HertzBeat as before to experience the latest HertzBeat 1.6.0!

## Upgrade via Export and Import

If you do not want to go through the tedious script upgrade method mentioned above, you can directly export and import the monitoring tasks and threshold information from the old environment.

- Deploy a new environment with the latest version.
- Export the monitoring tasks and threshold information from the old environment on the page
18 changes: 12 additions & 6 deletions home/docs/community/how-to-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,20 +578,25 @@ The rename the release-1.6.0-rc1 branch to release-1.6.0.
> `Send to`: general@incubator.apache.org <br />
> `cc`: dev@hertzbeat.apache.org <br />
> `Title`: [ANNOUNCE] Release Apache HertzBeat (incubating) 1.6.0 <br />
> `Title`: [ANNOUNCE] Apache HertzBeat (incubating) 1.6.0 released <br />
> `Body`:
```
Hi Incubator Community,
Hi Community,
We are glad to announce the release of Apache HertzBeat (incubating) 1.6.0.
Once again I would like to express my thanks to your help.
Thanks again for your help.
Apache HertzBeat (https://hertzbeat.apache.org/) - a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
Apache HertzBeat(https://hertzbeat.apache.org/) - a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
Download Link:
https://hertzbeat.apache.org/docs/download/
Download Links: https://hertzbeat.apache.org/download/
Release Note:
https://github.com/apache/hertzbeat/releases/tag/v1.6.0
Release Notes: https://github.com/apache/hertzbeat/releases/tag/v1.6.0
Website:
https://hertzbeat.apache.org/
HertzBeat Resources:
- Issue: https://github.com/apache/hertzbeat/issues
Expand All @@ -600,6 +605,7 @@ HertzBeat Resources:
Apache HertzBeat Team
Best,
ChunJin Mu
```
Expand Down
2 changes: 1 addition & 1 deletion home/docs/start/greptime-init.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: greptime-init
title: Use Time Series Database GreptimeDB to Store Metrics Data (Optional)
sidebar_label: Use GreptimeDB Store Metrics
sidebar_label: Metrics Store GreptimeDB
---

Apache HertzBeat (incubating)'s historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment)
Expand Down
2 changes: 1 addition & 1 deletion home/docs/start/influxdb-init.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: influxdb-init
title: Use Time Series Database InfluxDB to Store Metrics Data (Optional)
sidebar_label: Use InfluxDB Store Metrics
sidebar_label: Metrics Store InfluxDB
---

Apache HertzBeat (incubating)'s historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment)
Expand Down
2 changes: 1 addition & 1 deletion home/docs/start/iotdb-init.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: iotdb-init
title: Use Time Series Database IoTDB to Store Metrics Data (Optional)
sidebar_label: Use IoTDB Store Metrics
sidebar_label: Metrics Store IoTDB
---
Apache HertzBeat (incubating)'s historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment)

Expand Down
58 changes: 37 additions & 21 deletions home/docs/start/mysql-change.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: mysql-change
title: Use MYSQL Replace H2 Database to Store Metadata(Optional)
sidebar_label: Use MYSQL Instead of H2
sidebar_label: Meta Store MYSQL
---
MYSQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat (incubating) allow you to use MYSQL to store structured relational data such as monitoring information, alarm information and configuration information.

Expand Down Expand Up @@ -49,29 +49,45 @@ MYSQL is a reliable relational database. In addition to default built-in H2 data
Replace `spring.database` data source parameters, URL account and password.

For example:
```yaml
spring:
datasource:
driver-class-name: org.h2.Driver
username: sa
password: 123456
url: jdbc:h2:./data/hertzbeat;MODE=MYSQL
jpa:
database: h2
```
```yaml
spring:
datasource:
driver-class-name: org.h2.Driver
username: sa
password: 123456
url: jdbc:h2:./data/hertzbeat;MODE=MYSQL
hikari:
max-lifetime: 120000

jpa:
show-sql: false
database-platform: org.eclipse.persistence.platform.database.MySQLPlatform
database: h2
properties:
eclipselink:
logging:
level: SEVERE
```
Specific replacement parameters are as follows and you need to configure account according to the mysql environment:
```yaml
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 123456
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
platform: mysql
```yaml
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 123456
url: jdbc:mysql://mysql:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false
hikari:
max-lifetime: 120000
jpa:
show-sql: false
database-platform: org.eclipse.persistence.platform.database.MySQLPlatform
database: mysql
```
properties:
eclipselink:
logging:
level: SEVERE
```
- It is recommended to set the host field in the MySQL URL or Redis URL to the public IP address when using Hertzbeat in docker.
- It is recommended to set the host field in the MySQL URL to the public IP address when using Hertzbeat in docker.
**Start HertzBeat visit http://ip:1157/ on the browser You can use HertzBeat monitoring alarm, default account and password are admin/hertzbeat**
48 changes: 28 additions & 20 deletions home/docs/start/postgresql-change.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: postgresql-change
title: Use PostgreSQL Replace H2 Database to Store Metadata(Optional)
sidebar_label: Use PostgreSQL Instead of H2
title: Use PostgreSQL Replace H2 Database to Store Metadata(Recommended)
sidebar_label: Meta Store PostgreSQL (Recommended)
---
PostgreSQL is a RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat (incubating) allow you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information.

Expand Down Expand Up @@ -46,28 +46,36 @@ spring:
username: sa
password: 123456
url: jdbc:h2:./data/hertzbeat;MODE=MYSQL
hikari:
max-lifetime: 120000

jpa:
show-sql: false
database-platform: org.eclipse.persistence.platform.database.MySQLPlatform
database: h2
properties:
eclipselink:
logging:
level: SEVERE
```
Specific replacement parameters are as follows and you need to configure account, ip, port according to the postgresql environment:
```yaml
spring:
config:
activate:
on-profile: prod
datasource:
driver-class-name: org.postgresql.Driver
username: root
password: 123456
url: jdbc:postgresql://127.0.0.1:5432/hertzbeat
hikari:
max-lifetime: 120000

jpa:
database: postgresql
hibernate:
ddl-auto: update
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
datasource:
driver-class-name: org.postgresql.Driver
username: root
password: 123456
url: jdbc:postgresql://postgresql:5432/hertzbeat
hikari:
max-lifetime: 120000
jpa:
show-sql: false
database-platform: org.eclipse.persistence.platform.database.PostgreSQLPlatform
database: postgresql
properties:
eclipselink:
logging:
level: SEVERE
```
**Start HertzBeat visit http://ip:1157/ on the browser You can use HertzBeat monitoring alarm, default account and password are admin/hertzbeat**
Loading

0 comments on commit 1cc86c8

Please sign in to comment.