chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,285 @@
|
||||
---
|
||||
id: extend-http-default
|
||||
title: HTTP Protocol System Default Parsing Method
|
||||
sidebar_label: Default Parsing Method
|
||||
---
|
||||
|
||||
> After calling the HTTP api to obtain the response data, use the default parsing method of hertzbeat to parse the response data.
|
||||
|
||||
**The interface response data structure must be consistent with the data structure rules specified by hertzbeat**
|
||||
|
||||
## HertzBeat data format specification
|
||||
|
||||
Note⚠️ The response data is JSON format.
|
||||
|
||||
Single layer format :key-value
|
||||
|
||||
```json
|
||||
{
|
||||
"metricName1": "metricValue",
|
||||
"metricName2": "metricValue",
|
||||
"metricName3": "metricValue",
|
||||
"metricName4": "metricValue"
|
||||
}
|
||||
```
|
||||
|
||||
Multilayer format:Set key value in the array
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"metricName1": "metricValue",
|
||||
"metricName2": "metricValue",
|
||||
"metricName3": "metricValue",
|
||||
"metricName4": "metricValue"
|
||||
},
|
||||
{
|
||||
"metricName1": "metricValue",
|
||||
"metricName2": "metricValue",
|
||||
"metricName3": "metricValue",
|
||||
"metricName4": "metricValue"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
eg:
|
||||
Query the CPU information of the custom system. The exposed interface is `/metrics/cpu`. We need `hostname,core,usage` Metric.
|
||||
If there is only one virtual machine, its single-layer format is :
|
||||
|
||||
```json
|
||||
{
|
||||
"hostname": "linux-1",
|
||||
"core": 1,
|
||||
"usage": 78.0,
|
||||
"allTime": 200,
|
||||
"runningTime": 100
|
||||
}
|
||||
```
|
||||
|
||||
If there are multiple virtual machines, the multilayer format is: :
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"hostname": "linux-1",
|
||||
"core": 1,
|
||||
"usage": 78.0,
|
||||
"allTime": 200,
|
||||
"runningTime": 100
|
||||
},
|
||||
{
|
||||
"hostname": "linux-2",
|
||||
"core": 3,
|
||||
"usage": 78.0,
|
||||
"allTime": 566,
|
||||
"runningTime": 34
|
||||
},
|
||||
{
|
||||
"hostname": "linux-3",
|
||||
"core": 4,
|
||||
"usage": 38.0,
|
||||
"allTime": 500,
|
||||
"runningTime": 20
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
**The corresponding monitoring template yml can be configured as follows**
|
||||
|
||||
```yaml
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: a_example
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: 模拟应用
|
||||
en-US: EXAMPLE APP
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`<br>`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。
|
||||
en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `<br>`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template."
|
||||
zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`<br>`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/
|
||||
en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: true
|
||||
# default value
|
||||
defaultValue: 80
|
||||
# param field input placeholder
|
||||
placeholder: 'Please Input Port'
|
||||
# field-param field key
|
||||
- field: username
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 50
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: password
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 用户密码
|
||||
en-US: Password
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: ssl
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 启动SSL
|
||||
en-US: SSL
|
||||
# type-param field type(boolean mapping the html switch tag)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
required: false
|
||||
# field-param field key
|
||||
- field: method
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 请求方式
|
||||
en-US: Method
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
required: true
|
||||
# when type is radio checkbox, use option to show optional values {name1:value1,name2:value2}
|
||||
options:
|
||||
- label: GET
|
||||
value: GET
|
||||
- label: POST
|
||||
value: POST
|
||||
- label: PUT
|
||||
value: PUT
|
||||
- label: DELETE
|
||||
value: DELETE
|
||||
# field-param field key
|
||||
- field: headers
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 请求Headers
|
||||
en-US: Headers
|
||||
# type-param field type(key-value mapping the html key-value input tags)
|
||||
type: key-value
|
||||
# required-true or false
|
||||
required: false
|
||||
# when type is key-value, use keyAlias to config key alias name
|
||||
keyAlias: Header Name
|
||||
# when type is key-value, use valueAlias to config value alias name
|
||||
valueAlias: Header Value
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - cpu
|
||||
- name: cpu
|
||||
# metrics name i18n label
|
||||
i18n:
|
||||
zh-CN: CPU 信息
|
||||
en-US: CPU Info
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, i18n-metric name i18n label, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: hostname
|
||||
type: 1
|
||||
label: true
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Host Name
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
- field: cores
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 核数
|
||||
en-US: Cores
|
||||
- field: waitTime
|
||||
type: 0
|
||||
unit: s
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Host Name
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- hostname
|
||||
- core1
|
||||
- core2
|
||||
- usage
|
||||
- allTime
|
||||
- runningTime
|
||||
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
|
||||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||||
calculates:
|
||||
- hostname=hostname
|
||||
- cores=core1+core2
|
||||
- usage=usage
|
||||
- waitTime=allTime-runningTime
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# http host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url
|
||||
url: /metrics/cpu
|
||||
# http method: GET POST PUT DELETE PATCH
|
||||
method: GET
|
||||
# if enabled https
|
||||
ssl: false
|
||||
# http request header content
|
||||
headers:
|
||||
^_^headers^_^: ^_^headers^_^
|
||||
# http request params
|
||||
params:
|
||||
param1: param1
|
||||
param2: param2
|
||||
# http auth
|
||||
authorization:
|
||||
# http auth type: Basic Auth, Digest Auth, Bearer Token
|
||||
type: Basic Auth
|
||||
basicAuthUsername: ^_^username^_^
|
||||
basicAuthPassword: ^_^password^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
|
||||
parseType: jsonPath
|
||||
parseScript: '$'
|
||||
```
|
||||
@@ -0,0 +1,220 @@
|
||||
---
|
||||
id: extend-http-example-hertzbeat
|
||||
title: Tutorial 1 Adapting a monitoring type based on HTTP protocol
|
||||
sidebar_label: Tutorial 1 Adapting an HTTP protocol monitoring
|
||||
---
|
||||
|
||||
Through this tutorial, we describe step by step how to add a monitoring type based on the http protocol under the hertzbeat monitoring tool.
|
||||
|
||||
Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [http Protocol Customization](extend-http).
|
||||
|
||||
## HTTP protocol parses the general response structure to obtain metric data
|
||||
>
|
||||
> In many scenarios, we need to monitor the provided HTTP API interface and obtain the index value returned by the interface. In this article, we use the http custom protocol to parse our common http interface response structure, and obtain the fields in the returned body as metric data.
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
As above, usually our background API interface will design such a general return. The same is true for the background of the hertzbeat system. Today, we will use the hertzbeat API as an example, add a new monitoring type **hertzbeat**, and monitor and collect its system summary statistics API
|
||||
`http://localhost:1157/api/summary`, the response data is:
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": null,
|
||||
"code": 0,
|
||||
"data": {
|
||||
"apps": [
|
||||
{
|
||||
"category": "service",
|
||||
"app": "jvm",
|
||||
"status": 0,
|
||||
"size": 2,
|
||||
"availableSize": 0,
|
||||
"unManageSize": 2,
|
||||
"unAvailableSize": 0,
|
||||
"unReachableSize": 0
|
||||
},
|
||||
{
|
||||
"category": "service",
|
||||
"app": "website",
|
||||
"status": 0,
|
||||
"size": 2,
|
||||
"availableSize": 0,
|
||||
"unManageSize": 2,
|
||||
"unAvailableSize": 0,
|
||||
"unReachableSize": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**This time we get the metric data such as `category`, `app`, `status`, `size`, `availableSize` under the app.**
|
||||
|
||||
### Add custom monitoring template `hertzbeat`
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
Here we define a custom monitoring type `app` named `hertzbeat` which use the HTTP protocol to collect data.
|
||||
|
||||
**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply**
|
||||
|
||||
```yaml
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: hertzbeat
|
||||
name:
|
||||
zh-CN: HertzBeat
|
||||
en-US: HertzBeat
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 对 HertzBeat 监控系统的通用指标进行测量监控。`<br>`您可以点击 “`<i>`新建 HertzBeat监控系统`</i>`” 并进行配置,或者选择“`<i>`更多操作`</i>`”,导入已有配置。
|
||||
en-US: HertzBeat monitors HertzBeat Monitor through general performance metric. You could click the "`<i>`New HertzBeat Monitor`</i>`" button and proceed with the configuration or import an existing setup through the "`<i>`More Actions`</i>`" menu.
|
||||
zh-TW: HertzBeat對HertzBeat監控系統的通用名額進行量測監控。`<br>`您可以點擊“`<i>`新建HertzBeat監控系統`</i>`”並進行配寘,或者選擇“`<i>`更多操作`</i>`”,導入已有配寘。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat
|
||||
en-US: https://hertzbeat.apache.org/docs/help/hertzbeat
|
||||
params:
|
||||
- field: host
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
type: host
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
type: number
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 1157
|
||||
- field: ssl
|
||||
name:
|
||||
zh-CN: 启用HTTPS
|
||||
en-US: HTTPS
|
||||
type: boolean
|
||||
required: true
|
||||
- field: timeout
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
type: number
|
||||
required: false
|
||||
hide: true
|
||||
- field: authType
|
||||
name:
|
||||
zh-CN: 认证方式
|
||||
en-US: Auth Type
|
||||
type: radio
|
||||
required: false
|
||||
hide: true
|
||||
options:
|
||||
- label: Basic Auth
|
||||
value: Basic Auth
|
||||
- label: Digest Auth
|
||||
value: Digest Auth
|
||||
- field: username
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
type: text
|
||||
limit: 50
|
||||
required: false
|
||||
hide: true
|
||||
- field: password
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
type: password
|
||||
required: false
|
||||
hide: true
|
||||
metrics:
|
||||
# the first metrics summary
|
||||
# attention: Built-in monitoring metrics contains (responseTime - Response time)
|
||||
- name: summary
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# metrics content contains field-metric name, type-metric type:0-number,1-string, instance-if is metrics, unit-metric unit('%','ms','MB')
|
||||
- field: app
|
||||
type: 1
|
||||
label: true
|
||||
- field: category
|
||||
type: 1
|
||||
- field: status
|
||||
type: 0
|
||||
- field: size
|
||||
type: 0
|
||||
- field: availableSize
|
||||
type: 0
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url, we don't need to enter a parameter here, just set the fixed value to /api/summary
|
||||
url: /api/summary
|
||||
timeout: ^_^timeout^_^
|
||||
# http method: GET POST PUT DELETE PATCH, default fixed value is GET
|
||||
method: GET
|
||||
# if enabled https, default value is false
|
||||
ssl: ^_^ssl^_^
|
||||
# http auth
|
||||
authorization:
|
||||
# http auth type: Basic Auth, Digest Auth, Bearer Token
|
||||
type: ^_^authType^_^
|
||||
basicAuthUsername: ^_^username^_^
|
||||
basicAuthPassword: ^_^password^_^
|
||||
digestAuthUsername: ^_^username^_^
|
||||
digestAuthPassword: ^_^password^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, we use jsonpath to parse response data here
|
||||
parseType: jsonPath
|
||||
parseScript: '$.data.apps.*'
|
||||
|
||||
```
|
||||
|
||||
**The addition is complete, now we save and apply. We can see that the system page has added a `hertzbeat` monitoring type.**
|
||||
|
||||

|
||||
|
||||
### The system page adds the monitoring of `hertzbeat` monitoring type
|
||||
|
||||
> We click Add `HertzBeat Monitoring Tool`, configure monitoring IP, port, collection cycle, account password in advanced settings, etc., click OK to add monitoring.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
> After a certain period of time (depending on the collection cycle), we can see the specific metric data and historical charts in the monitoring details!
|
||||
|
||||

|
||||
|
||||
### Set threshold alarm notification
|
||||
|
||||
> Next, we can set the threshold normally. After the alarm is triggered, we can view it in the alarm center, add recipients, set alarm notifications, etc. Have Fun!!!
|
||||
|
||||
----
|
||||
|
||||
#### over
|
||||
|
||||
This is the end of the practice of custom monitoring of the HTTP protocol. The HTTP protocol also has other parameters such as headers and params. We can define it like postman, and the playability is also very high!
|
||||
|
||||
If you think hertzbeat is a good open source project, please star us on GitHub Gitee, thank you very much.
|
||||
|
||||
**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)**
|
||||
@@ -0,0 +1,408 @@
|
||||
---
|
||||
id: extend-http-example-token
|
||||
title: Tutorial 2 Obtain TOKEN index value based on HTTP protocol for subsequent collection and authentication
|
||||
sidebar_label: Tutorial 2 Get TOKEN for subsequent authentication
|
||||
---
|
||||
|
||||
Through this tutorial, we will describe step by step how to modify on the basis of tutorial 1, add metrics, first call the authentication interface to obtain the TOKEN, and use the TOKEN as a parameter for the subsequent metrics collection and authentication.
|
||||
|
||||
Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [http Protocol Customization](extend-http).
|
||||
|
||||
## Request process
|
||||
|
||||
【**Authentication information metrics (highest priority)**】【**HTTP interface carries account password call**】->【**Response data analysis**】->【**Analysis and issuance of TOKEN-accessToken as an metric**] -> [**Assign accessToken as a variable parameter to other collection index groups**]
|
||||
|
||||
> Here we still use the hertzbeat monitoring example of Tutorial 1! The hertzbeat background interface not only supports the basic direct account password authentication used in Tutorial 1, but also supports token authentication.
|
||||
|
||||
**We need `POST` to call the login interface `/api/account/auth/form` to get `accessToken`, the request body (json format) is as follows**:
|
||||
|
||||
```json
|
||||
{
|
||||
"credential": "hertzbeat",
|
||||
"identifier": "admin"
|
||||
}
|
||||
```
|
||||
|
||||
**The response structure data is as follows**:
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"token": "xxxx",
|
||||
"refreshToken": "xxxx"
|
||||
},
|
||||
"msg": null,
|
||||
"code": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Add custom monitoring type `hertzbeat_token`
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
1. The custom monitoring type needs to add a new configuration monitoring template yml. We directly reuse the `hertzbeat` monitoring type in Tutorial 1 and modify it based on it
|
||||
|
||||
A monitoring configuration definition file named after the monitoring type - hertzbeat_token
|
||||
|
||||
We directly reuse the definition content in `hertzbeat` and modify it to our current monitoring type `hertzbeat_auth` configuration parameters, such as `app, category, etc`.
|
||||
|
||||
```yaml
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: hertzbeat_token
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: HertzBeat(Token)
|
||||
en-US: HertzBeat(Token)
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`<br>`您可以点击 “`<i>`新建 HertzBeat监控(Token)`</i>`” 并进行配置,或者选择“`<i>`更多操作`</i>`”,导入已有配置。
|
||||
en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "`<i>`New HertzBeat Monitor(Token)`</i>`" button and proceed with the configuration or import an existing setup through the "`<i>`More Actions`</i>`" menu.
|
||||
zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`<br>`您可以點擊“`<i>`新建HertzBeat監控(Token)`</i>`”並進行配寘,或者選擇“`<i>`更多操作`</i>`”,導入已有配寘。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token
|
||||
en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 1157
|
||||
placeholder: 'Please input port'
|
||||
- field: ssl
|
||||
name:
|
||||
zh-CN: 启动SSL
|
||||
en-US: SSL
|
||||
# type-param field type(boolean mapping the html switch tag)
|
||||
type: boolean
|
||||
required: false
|
||||
- field: contentType
|
||||
name:
|
||||
zh-CN: Content-Type
|
||||
en-US: Content-Type
|
||||
type: text
|
||||
placeholder: 'Request Body Type'
|
||||
required: false
|
||||
- field: payload
|
||||
name:
|
||||
zh-CN: 请求BODY
|
||||
en-US: BODY
|
||||
type: textarea
|
||||
placeholder: 'Available When POST PUT'
|
||||
required: false
|
||||
# collect metrics config list
|
||||
```
|
||||
|
||||
### Define metrics `auth` login request to get `token`
|
||||
|
||||
1. Add an index group definition `auth` in `hertzbeat_token`, set the collection priority to the highest 0, and collect the index `token`.
|
||||
|
||||
```yaml
|
||||
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: hertzbeat_token
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: HertzBeat(Token)
|
||||
en-US: HertzBeat(Token)
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`<br>`您可以点击 “`<i>`新建 HertzBeat监控(Token)`</i>`” 并进行配置,或者选择“`<i>`更多操作`</i>`”,导入已有配置。
|
||||
en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "`<i>`New HertzBeat Monitor(Token)`</i>`" button and proceed with the configuration or import an existing setup through the "`<i>`More Actions`</i>`" menu.
|
||||
zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`<br>`您可以點擊“`<i>`新建HertzBeat監控(Token)`</i>`”並進行配寘,或者選擇“`<i>`更多操作`</i>`”,導入已有配寘。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token
|
||||
en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 1157
|
||||
placeholder: 'Please input port'
|
||||
- field: ssl
|
||||
name:
|
||||
zh-CN: 启动SSL
|
||||
en-US: SSL
|
||||
# type-param field type(boolean mapping the html switch tag)
|
||||
type: boolean
|
||||
required: false
|
||||
- field: contentType
|
||||
name:
|
||||
zh-CN: Content-Type
|
||||
en-US: Content-Type
|
||||
type: text
|
||||
placeholder: 'Request Body Type'
|
||||
required: false
|
||||
- field: payload
|
||||
name:
|
||||
zh-CN: 请求BODY
|
||||
en-US: BODY
|
||||
type: textarea
|
||||
placeholder: 'Available When POST PUT'
|
||||
required: false
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - auth
|
||||
- name: auth
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: token
|
||||
type: 1
|
||||
- field: refreshToken
|
||||
type: 1
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# http host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url
|
||||
url: /api/account/auth/form
|
||||
# http method: GET POST PUT DELETE PATCH
|
||||
method: POST
|
||||
# if enabled https
|
||||
ssl: ^_^ssl^_^
|
||||
payload: ^_^payload^_^
|
||||
# http request header content
|
||||
headers:
|
||||
content-type: ^_^contentType^_^
|
||||
^_^headers^_^: ^_^headers^_^
|
||||
# http request params
|
||||
params:
|
||||
^_^params^_^: ^_^params^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
|
||||
parseType: jsonPath
|
||||
parseScript: '$.data'
|
||||
---
|
||||
```
|
||||
|
||||
**At this time, save and apply, add `hertzbeat_token` type monitoring on the system page, configure input parameters, `content-type` fill in `application/json`, `request Body` fill in the account password json as follows:**
|
||||
|
||||
```json
|
||||
{
|
||||
"credential": "hertzbeat",
|
||||
"identifier": "admin"
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
**After the addition is successful, we can see the `token`, `refreshToken` metric data we collected on the details page.**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Use `token` as a variable parameter to collect and use the following metricss
|
||||
|
||||
**Add an index group definition `summary` in `app-hertzbeat_token.yml`, which is the same as `summary` in Tutorial 1, and set the collection priority to 1**
|
||||
|
||||
**Set the authentication method in the HTTP protocol configuration of this index group to `Bearer Token`, assign the index `token` collected by the previous index group `auth` as a parameter, and use `^o^` as the internal replacement symbol, that is `^o^token^o^`. as follows:**
|
||||
|
||||
```yaml
|
||||
- name: summary
|
||||
# When the protocol is the http protocol, the specific collection configuration
|
||||
http:
|
||||
# authentication
|
||||
authorization:
|
||||
# Authentication methods: Basic Auth, Digest Auth, Bearer Token
|
||||
type: Bearer Token
|
||||
bearerTokenToken: ^o^token^o^
|
||||
```
|
||||
|
||||
**The final `hertzbeat_token` template yml is defined as follows:**
|
||||
|
||||
```yaml
|
||||
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: hertzbeat_token
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: HertzBeat(Token)
|
||||
en-US: HertzBeat(Token)
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`<br>`您可以点击 “`<i>`新建 HertzBeat监控(Token)`</i>`” 并进行配置,或者选择“`<i>`更多操作`</i>`”,导入已有配置。
|
||||
en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "`<i>`New HertzBeat Monitor(Token)`</i>`" button and proceed with the configuration or import an existing setup through the "`<i>`More Actions`</i>`" menu.
|
||||
zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`<br>`您可以點擊“`<i>`新建HertzBeat監控(Token)`</i>`”並進行配寘,或者選擇“`<i>`更多操作`</i>`”,導入已有配寘。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token
|
||||
en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 1157
|
||||
placeholder: 'Please input port'
|
||||
- field: ssl
|
||||
name:
|
||||
zh-CN: 启动SSL
|
||||
en-US: SSL
|
||||
# type-param field type(boolean mapping the html switch tag)
|
||||
type: boolean
|
||||
required: false
|
||||
- field: contentType
|
||||
name:
|
||||
zh-CN: Content-Type
|
||||
en-US: Content-Type
|
||||
type: text
|
||||
placeholder: 'Request Body Type'
|
||||
required: false
|
||||
- field: payload
|
||||
name:
|
||||
zh-CN: 请求BODY
|
||||
en-US: BODY
|
||||
type: textarea
|
||||
placeholder: 'Available When POST PUT'
|
||||
required: false
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - auth
|
||||
- name: auth
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: token
|
||||
type: 1
|
||||
- field: refreshToken
|
||||
type: 1
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# http host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url
|
||||
url: /api/account/auth/form
|
||||
# http method: GET POST PUT DELETE PATCH
|
||||
method: POST
|
||||
# if enabled https
|
||||
ssl: ^_^ssl^_^
|
||||
payload: ^_^payload^_^
|
||||
# http request header content
|
||||
headers:
|
||||
content-type: ^_^contentType^_^
|
||||
^_^headers^_^: ^_^headers^_^
|
||||
# http request params
|
||||
params:
|
||||
^_^params^_^: ^_^params^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
|
||||
parseType: jsonPath
|
||||
parseScript: '$.data'
|
||||
---
|
||||
- name: summary
|
||||
priority: 1
|
||||
fields:
|
||||
- field: app
|
||||
type: 1
|
||||
label: true
|
||||
- field: category
|
||||
type: 1
|
||||
- field: status
|
||||
type: 0
|
||||
- field: size
|
||||
type: 0
|
||||
- field: availableSize
|
||||
type: 0
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
url: /api/summary
|
||||
method: GET
|
||||
ssl: ^_^ssl^_^
|
||||
authorization:
|
||||
type: Bearer Token
|
||||
# ^o^xxx^o^ ^o^ substitution represents the value of the acquisition metric xxx of the previous priority
|
||||
bearerTokenToken: ^o^token^o^
|
||||
parseType: jsonPath
|
||||
parseScript: '$.data.apps.*'
|
||||
|
||||
```
|
||||
|
||||
**After the configuration is complete, save and apply, and check the monitoring details page**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Set threshold alarm notification
|
||||
|
||||
> Next, we can set the threshold normally. After the alarm is triggered, we can view it in the alarm center, add a new recipient, set alarm notification, etc. Have Fun!!!
|
||||
|
||||
---
|
||||
|
||||
#### over
|
||||
|
||||
This is the end of the practice of custom monitoring of the HTTP protocol. The HTTP protocol also has other parameters such as headers and params. We can define it like postman, and the playability is also very high!
|
||||
|
||||
If you think hertzbeat is a good open source project, please star us on GitHub Gitee, thank you very much.
|
||||
|
||||
**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)**
|
||||
@@ -0,0 +1,174 @@
|
||||
---
|
||||
id: extend-http-jsonpath
|
||||
title: HTTP Protocol JsonPath Parsing Method
|
||||
sidebar_label: JsonPath Parsing Method
|
||||
---
|
||||
|
||||
> After calling the HTTP api to obtain the response data, use JsonPath script parsing method to parse the response data.
|
||||
|
||||
Note⚠️ The response data is JSON format.
|
||||
|
||||
**Use the JsonPath script to parse the response data into data that conforms to the data structure rules specified by HertzBeat**
|
||||
|
||||
## JsonPath Operator
|
||||
|
||||
[JSONPath online verification](https://www.jsonpath.cn)
|
||||
|
||||
| JSONPATH | Help description |
|
||||
|------------------|----------------------------------------------------------------------------------------|
|
||||
| $ | Root object or element |
|
||||
| @ | Current object or element |
|
||||
| . or [] | Child element operator |
|
||||
| .. | Recursively match all child elements |
|
||||
| * | Wildcard. Match all objects or elements |
|
||||
| [] | Subscript operator, jsonpath index starts from 0 |
|
||||
| [,] | Join operator, return multiple results as an array. Jsonpath allows the use of aliases |
|
||||
| [start:end:step] | Array slice operator |
|
||||
| ?() | Filter (script) expression |
|
||||
| () | Script Expression |
|
||||
|
||||
### HertzBeat data format specification
|
||||
|
||||
Single layer format :key-value
|
||||
|
||||
```json
|
||||
{
|
||||
"metricName1": "metricValue",
|
||||
"metricName2": "metricValue",
|
||||
"metricName3": "metricValue",
|
||||
"metricName4": "metricValue"
|
||||
}
|
||||
```
|
||||
|
||||
Multilayer format:Set key value in the array
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"metricName1": "metricValue",
|
||||
"metricName2": "metricValue",
|
||||
"metricName3": "metricValue",
|
||||
"metricName4": "metricValue"
|
||||
},
|
||||
{
|
||||
"metricName1": "metricValue",
|
||||
"metricName2": "metricValue",
|
||||
"metricName3": "metricValue",
|
||||
"metricName4": "metricValue"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### Example
|
||||
|
||||
Query the value information of the custom system, and its exposed interface is `/metrics/person`. We need `type,num` Metric.
|
||||
The raw data returned by the interface is as follows:
|
||||
|
||||
```json
|
||||
{
|
||||
"firstName": "John",
|
||||
"lastName" : "doe",
|
||||
"age" : 26,
|
||||
"address" : {
|
||||
"streetAddress": "naist street",
|
||||
"city" : "Nara",
|
||||
"postalCode" : "630-0192"
|
||||
},
|
||||
"number": [
|
||||
{
|
||||
"type": "core",
|
||||
"num": 3343
|
||||
},
|
||||
{
|
||||
"type": "home",
|
||||
"num": 4543
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
We use the jsonpath script to parse, and the corresponding script is: `$.number[*]`,The parsed data structure is as follows:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"type": "core",
|
||||
"num": 3343
|
||||
},
|
||||
{
|
||||
"type": "home",
|
||||
"num": 4543
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
This data structure conforms to the data format specification of HertzBeat, and the Metric `type,num` is successfully extracted.
|
||||
|
||||
**The corresponding monitoring template yml can be configured as follows**
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: custom
|
||||
# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws...
|
||||
app: example
|
||||
name:
|
||||
zh-CN: 模拟应用类型
|
||||
en-US: EXAMPLE APP
|
||||
params:
|
||||
# field-field name identifier
|
||||
- field: host
|
||||
# name-parameter field display name
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
# type-field type, style(most mappings are input label type attribute)
|
||||
type: host
|
||||
# required or not true-required false-optional
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
type: number
|
||||
# When type is number, range is used to represent the range.
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
# port default
|
||||
defaultValue: 80
|
||||
# Prompt information of parameter input box
|
||||
placeholder: 'Please enter the port'
|
||||
# Metric group list
|
||||
metrics:
|
||||
# The first monitoring Metric group person
|
||||
# Note:the built-in monitoring Metrics have (responseTime - response time)
|
||||
- name: cpu
|
||||
# The smaller Metric group scheduling priority(0-127), the higher the priority. After completion of the high priority Metric group collection,the low priority Metric group will then be scheduled. Metric groups with the same priority will be scheduled in parallel.
|
||||
# Metric group with a priority of 0 is an availability group which will be scheduled first. If the collection succeeds, the scheduling will continue otherwise interrupt scheduling.
|
||||
priority: 0
|
||||
# metrics fields list
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: type
|
||||
type: 1
|
||||
label: true
|
||||
- field: num
|
||||
type: 0
|
||||
# protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: http
|
||||
# Specific collection configuration when the protocol is HTTP protocol
|
||||
http:
|
||||
# host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
# url request interface path
|
||||
url: /metrics/person
|
||||
# request mode GET POST PUT DELETE PATCH
|
||||
method: GET
|
||||
# enable ssl/tls or not, that is to say, HTTP or HTTPS. The default is false
|
||||
ssl: false
|
||||
# parsing method for response data: default-system rules, jsonPath-jsonPath script, website-website availability Metric monitoring
|
||||
# jsonPath parsing is used here
|
||||
parseType: jsonPath
|
||||
parseScript: '$.number[*]'
|
||||
```
|
||||
@@ -0,0 +1,326 @@
|
||||
---
|
||||
id: extend-http-xmlpath
|
||||
title: HTTP Protocol XmlPath Parsing Method
|
||||
sidebar_label: XmlPath Parsing Method
|
||||
---
|
||||
|
||||
> After calling the HTTP API to obtain the response data, use the XmlPath script parsing method to parse the response data.
|
||||
|
||||
Note⚠️ The response data must be in XML format.
|
||||
|
||||
**Use XPath scripts to parse the response data into data that conforms to the data structure rules specified by HertzBeat.**
|
||||
|
||||
## XmlPath Parsing Logic
|
||||
|
||||
The XmlPath parsing method in HertzBeat uses a two-step XPath process:
|
||||
|
||||
1. **Main XPath Expression (`parseScript`)**: This XPath expression is defined in the `http` configuration section under `parseScript`. It is used to select one or more main XML nodes from the response. Each selected node will correspond to one row of metric data in HertzBeat.
|
||||
2. **Relative Field XPath Expressions (`xpath`)**: For each metric field defined in the `fields` list, you can specify a relative `xpath`. This XPath expression is evaluated *relative to each main node* selected by the `parseScript` in step 1. It extracts the specific value for that metric field from the current main node.
|
||||
|
||||
This allows you to easily parse structured XML data where multiple records or items are present.
|
||||
|
||||
**Special Metrics**:
|
||||
|
||||
* `responseTime`: This built-in metric represents the HTTP request's response time and is automatically collected. It does not require an `xpath`.
|
||||
|
||||
* `keyword`: This built-in metric counts the occurrences of a specified keyword (configured in `http.keyword`) in the raw response body. It does not require an `xpath`.
|
||||
|
||||
### Example
|
||||
|
||||
Assume the HTTP API returns the following XML data:
|
||||
|
||||
```xml
|
||||
<DeviceStatus xmlns="http://www.isapi.org/ver20/XMLSchema" version="2.0">
|
||||
<CPUList>
|
||||
<CPU>
|
||||
<cpuUtilization>36.400002</cpuUtilization>
|
||||
<CPU>
|
||||
<CPUList>
|
||||
<MemoryList>
|
||||
<Memory>
|
||||
<memoryUsage>399640</memoryUsage>
|
||||
<memoryAvailable>98792</memoryAvailable>
|
||||
<cacheSize>228492</cacheSize>
|
||||
<Memory>
|
||||
<MemoryList>
|
||||
<NetPortStatusList>
|
||||
<NetPortStatus>
|
||||
<id>1</id>
|
||||
<workSpeed>1000</workSpeed>
|
||||
<NetPortStatus>
|
||||
<NetPortStatus>
|
||||
<id>2</id>
|
||||
<workSpeed>0</workSpeed>
|
||||
<NetPortStatus>
|
||||
<NetPortStatusList>
|
||||
<bootTime>2025-01-06 10:27:48</bootTime>
|
||||
<deviceUpTime>87天0时55分59秒</deviceUpTime>
|
||||
<lastCalibrationTime>2025-04-03 11:09:18</lastCalibrationTime>
|
||||
<lastCalibrationTimeDiff>1</lastCalibrationTimeDiff>
|
||||
<uploadTimeConsumingList>
|
||||
<avgTime>16</avgTime>
|
||||
<maxTime>23</maxTime>
|
||||
<minTime>12</minTime>
|
||||
</uploadTimeConsumingList>
|
||||
<lastCalibrationTimeMode>NTP</lastCalibrationTimeMode>
|
||||
<lastCalibrationTimeAddress>34.191.45.101</lastCalibrationTimeAddress>
|
||||
<DeviceStatus>
|
||||
```
|
||||
|
||||
We want to monitor the device status and extract various metrics.
|
||||
|
||||
Here's how you would configure the monitoring template YML:
|
||||
|
||||
```yaml
|
||||
category: server
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: hikvision_isapi
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: 海康威视 ISAPI
|
||||
en-US: Hikvision ISAPI
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: 通过ISAPI接口监控海康威视设备状态,获取设备健康数据。
|
||||
en-US: Monitor Hikvision devices through ISAPI interface to collect health data.
|
||||
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
- field: host
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
type: host
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
type: number
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 80
|
||||
- field: timeout
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
type: number
|
||||
range: '[1000,60000]'
|
||||
required: true
|
||||
defaultValue: 5000
|
||||
- field: username
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
type: text
|
||||
required: true
|
||||
- field: password
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
type: password
|
||||
required: true
|
||||
- field: ssl
|
||||
name:
|
||||
zh-CN: 启用HTTPS
|
||||
en-US: SSL
|
||||
type: boolean
|
||||
required: false
|
||||
defaultValue: false
|
||||
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
- name: system_info
|
||||
i18n:
|
||||
zh-CN: 系统信息
|
||||
en-US: System Info
|
||||
priority: 0
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
ssl: ^_^ssl^_^
|
||||
url: /ISAPI/System/deviceInfo
|
||||
method: GET
|
||||
timeout: ^_^timeout^_^
|
||||
authorization:
|
||||
type: Digest Auth
|
||||
digestAuthUsername: ^_^username^_^
|
||||
digestAuthPassword: ^_^password^_^
|
||||
parseType: xmlPath
|
||||
parseScript: //DeviceInfo
|
||||
fields:
|
||||
- field: deviceName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 设备名称
|
||||
en-US: Device Name
|
||||
- field: deviceID
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 设备ID
|
||||
en-US: Device ID
|
||||
- field: firmwareVersion
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 固件版本
|
||||
en-US: Firmware Version
|
||||
- field: model
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 设备型号
|
||||
en-US: Device Model
|
||||
- field: macAddress
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: mac地址
|
||||
en-US: Mac Address
|
||||
- name: status
|
||||
i18n:
|
||||
zh-CN: 设备状态
|
||||
en-US: Status
|
||||
priority: 0
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
ssl: ^_^ssl^_^
|
||||
url: /ISAPI/System/status
|
||||
method: GET
|
||||
timeout: ^_^timeout^_^
|
||||
authorization:
|
||||
type: Digest Auth
|
||||
digestAuthUsername: ^_^username^_^
|
||||
digestAuthPassword: ^_^password^_^
|
||||
parseType: xmlPath
|
||||
parseScript: //DeviceStatus
|
||||
fields:
|
||||
- field: CPU_utilization
|
||||
i18n:
|
||||
zh-CN: CPU 利用率
|
||||
en-US: CPU Utilization
|
||||
type: 0
|
||||
unit: '%'
|
||||
- field: memory_usage
|
||||
i18n:
|
||||
zh-CN: 内存使用量
|
||||
en-US: Memory Usage
|
||||
type: 0
|
||||
unit: MB
|
||||
- field: memory_available
|
||||
i18n:
|
||||
zh-CN: 可用内存
|
||||
en-US: Memory Available
|
||||
type: 0
|
||||
unit: MB
|
||||
- field: cache_size
|
||||
i18n:
|
||||
zh-CN: 缓存大小
|
||||
en-US: Cache Size
|
||||
type: 0
|
||||
unit: MB
|
||||
- field: net_port_1_speed
|
||||
i18n:
|
||||
zh-CN: 网口1速度
|
||||
en-US: Net Port 1 Speed
|
||||
type: 0
|
||||
unit: Mbps
|
||||
- field: net_port_2_speed
|
||||
i18n:
|
||||
zh-CN: 网口2速度
|
||||
en-US: Net Port 2 Speed
|
||||
type: 0
|
||||
unit: Mbps
|
||||
- field: boot_time
|
||||
i18n:
|
||||
zh-CN: 启动时间
|
||||
en-US: Boot Time
|
||||
type: 1
|
||||
- field: device_uptime
|
||||
i18n:
|
||||
zh-CN: 运行时长
|
||||
en-US: Device Uptime
|
||||
type: 1
|
||||
- field: last_calibration_time
|
||||
i18n:
|
||||
zh-CN: 上次校时时间
|
||||
en-US: Last Calibration Time
|
||||
type: 1
|
||||
- field: last_calibration_time_diff
|
||||
i18n:
|
||||
zh-CN: 上次校时时间差
|
||||
en-US: Last Calibration Time Diff
|
||||
type: 0
|
||||
unit: s
|
||||
- field: avg_upload_time
|
||||
i18n:
|
||||
zh-CN: 平均上传耗时
|
||||
en-US: Avg Upload Time
|
||||
type: 0
|
||||
unit: ms
|
||||
- field: max_upload_time
|
||||
i18n:
|
||||
zh-CN: 最大上传耗时
|
||||
en-US: Max Upload Time
|
||||
type: 0
|
||||
unit: ms
|
||||
- field: min_upload_time
|
||||
i18n:
|
||||
zh-CN: 最小上传耗时
|
||||
en-US: Min Upload Time
|
||||
type: 0
|
||||
unit: ms
|
||||
- field: last_calibration_mode
|
||||
i18n:
|
||||
zh-CN: 上次校时模式
|
||||
en-US: Last Calibration Mode
|
||||
type: 1
|
||||
- field: last_calibration_address
|
||||
i18n:
|
||||
zh-CN: 上次校时地址
|
||||
en-US: Last Calibration Address
|
||||
type: 1
|
||||
- field: response_time
|
||||
i18n:
|
||||
zh-CN: 响应时间
|
||||
en-US: Response Time
|
||||
type: 0
|
||||
unit: ms
|
||||
aliasFields:
|
||||
- CPUList/CPU/cpuUtilization
|
||||
- MemoryList/Memory/memoryUsage
|
||||
- MemoryList/Memory/memoryAvailable
|
||||
- MemoryList/Memory/cacheSize
|
||||
- NetPortStatusList/NetPortStatus[id='1']/workSpeed
|
||||
- NetPortStatusList/NetPortStatus[id='2']/workSpeed
|
||||
- bootTime
|
||||
- deviceUpTime
|
||||
- lastCalibrationTime
|
||||
- lastCalibrationTimeDiff
|
||||
- uploadTimeConsumingList/avgTime
|
||||
- uploadTimeConsumingList/maxTime
|
||||
- uploadTimeConsumingList/minTime
|
||||
- lastCalibrationTimeMode
|
||||
- lastCalibrationTimeAddress
|
||||
- responseTime
|
||||
calculates:
|
||||
- CPU_utilization=CPUList/CPU/cpuUtilization
|
||||
- memory_usage=MemoryList/Memory/memoryUsage
|
||||
- memory_available=MemoryList/Memory/memoryAvailable
|
||||
- cache_size=MemoryList/Memory/cacheSize
|
||||
- net_port_1_speed=NetPortStatusList/NetPortStatus[id='1']/workSpeed
|
||||
- net_port_2_speed=NetPortStatusList/NetPortStatus[id='2']/workSpeed
|
||||
- boot_time=bootTime
|
||||
- device_uptime=deviceUpTime
|
||||
- last_calibration_time=lastCalibrationTime
|
||||
- last_calibration_time_diff=lastCalibrationTimeDiff
|
||||
- avg_upload_time=uploadTimeConsumingList/avgTime
|
||||
- max_upload_time=uploadTimeConsumingList/maxTime
|
||||
- min_upload_time=uploadTimeConsumingList/minTime
|
||||
- last_calibration_mode=lastCalibrationTimeMode
|
||||
- last_calibration_address=lastCalibrationTimeAddress
|
||||
- response_time=responseTime
|
||||
units:
|
||||
- memory_usage=KB->MB
|
||||
- memory_available=KB->MB
|
||||
- cache_size=KB->MB
|
||||
@@ -0,0 +1,281 @@
|
||||
---
|
||||
id: extend-http
|
||||
title: HTTP Protocol Custom Monitoring
|
||||
sidebar_label: HTTP Protocol Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use HTTP protocol to customize Metric monitoring
|
||||
|
||||
## HTTP protocol collection process
|
||||
|
||||
【**Call HTTP API**】->【**Response Verification**】->【**Parse Response Data**】->【**Default method parsing|JsonPath script parsing | XmlPath parsing(todo) | Prometheus parsing**】->【**Metric data extraction**】
|
||||
|
||||
It can be seen from the process that we define a monitoring type of HTTP protocol. We need to configure HTTP request parameters, configure which Metrics to obtain, and configure the parsing method and parsing script for response data.
|
||||
HTTP protocol supports us to customize HTTP request path, request header, request parameters, request method, request body, etc.
|
||||
|
||||
**System default parsing method**:HTTP interface returns the JSON data structure specified by hertzbeat, that is, the default parsing method can be used to parse the data and extract the corresponding Metric data. For details, refer to [**System Default Parsing**](extend-http-default)
|
||||
**JsonPath script parsing method**:Use JsonPath script to parse the response JSON data, return the data structure specified by the system, and then provide the corresponding Metric data. For details, refer to [**JsonPath Script Parsing**](extend-http-jsonpath)
|
||||
|
||||
### Custom Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below. Please pay attention to usage annotation.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `example_http` which use the HTTP protocol to collect data.
|
||||
|
||||
**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply**
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: a_example
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: 模拟应用
|
||||
en-US: EXAMPLE APP
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`<br>`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。
|
||||
en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `<br>`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template."
|
||||
zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`<br>`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/
|
||||
en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: true
|
||||
# default value
|
||||
defaultValue: 80
|
||||
# param field input placeholder
|
||||
placeholder: 'Please Input Port'
|
||||
# field-param field key
|
||||
- field: username
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 50
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: password
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 用户密码
|
||||
en-US: Password
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: ssl
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 启动SSL
|
||||
en-US: SSL
|
||||
# type-param field type(boolean mapping the html switch tag)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
required: false
|
||||
# field-param field key
|
||||
- field: method
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 请求方式
|
||||
en-US: Method
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
required: true
|
||||
# when type is radio checkbox, use option to show optional values {name1:value1,name2:value2}
|
||||
options:
|
||||
- label: GET
|
||||
value: GET
|
||||
- label: POST
|
||||
value: POST
|
||||
- label: PUT
|
||||
value: PUT
|
||||
- label: DELETE
|
||||
value: DELETE
|
||||
# field-param field key
|
||||
- field: headers
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 请求Headers
|
||||
en-US: Headers
|
||||
# type-param field type(key-value mapping the html key-value input tags)
|
||||
type: key-value
|
||||
# required-true or false
|
||||
required: false
|
||||
# when type is key-value, use keyAlias to config key alias name
|
||||
keyAlias: Header Name
|
||||
# when type is key-value, use valueAlias to config value alias name
|
||||
valueAlias: Header Value
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - cpu
|
||||
- name: cpu
|
||||
# metrics name i18n label
|
||||
i18n:
|
||||
zh-CN: CPU 信息
|
||||
en-US: CPU Info
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, i18n-metric name i18n label, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: hostname
|
||||
type: 1
|
||||
label: true
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Host Name
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
- field: cores
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 核数
|
||||
en-US: Cores
|
||||
- field: waitTime
|
||||
type: 0
|
||||
unit: s
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Host Name
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- hostname
|
||||
- core1
|
||||
- core2
|
||||
- usage
|
||||
- allTime
|
||||
- runningTime
|
||||
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
|
||||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||||
calculates:
|
||||
- hostname=hostname
|
||||
- cores=core1+core2
|
||||
- usage=usage
|
||||
- waitTime=allTime-runningTime
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# http host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url
|
||||
url: /metrics/cpu
|
||||
# http method: GET POST PUT DELETE PATCH
|
||||
method: GET
|
||||
# if enabled https
|
||||
ssl: false
|
||||
# http request header content
|
||||
headers:
|
||||
^_^headers^_^: ^_^headers^_^
|
||||
# http request params
|
||||
params:
|
||||
param1: param1
|
||||
param2: param2
|
||||
# http auth
|
||||
authorization:
|
||||
# http auth type: Basic Auth, Digest Auth, Bearer Token
|
||||
type: Basic Auth
|
||||
basicAuthUsername: ^_^username^_^
|
||||
basicAuthPassword: ^_^password^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
|
||||
parseType: jsonPath
|
||||
parseScript: '$'
|
||||
|
||||
- name: memory
|
||||
i18n:
|
||||
zh-CN: 内存信息
|
||||
en-US: Memory Info
|
||||
priority: 1
|
||||
fields:
|
||||
- field: hostname
|
||||
type: 1
|
||||
label: true
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Hostname
|
||||
- field: total
|
||||
type: 0
|
||||
unit: kb
|
||||
i18n:
|
||||
zh-CN: 总量
|
||||
en-US: Total
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
- field: speed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 速率
|
||||
en-US: Speed
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
url: /metrics/memory
|
||||
method: GET
|
||||
headers:
|
||||
apiVersion: v1
|
||||
params:
|
||||
param1: param1
|
||||
param2: param2
|
||||
authorization:
|
||||
type: Basic Auth
|
||||
basicAuthUsername: ^_^username^_^
|
||||
basicAuthPassword: ^_^password^_^
|
||||
parseType: default
|
||||
|
||||
```
|
||||
@@ -0,0 +1,243 @@
|
||||
---
|
||||
id: extend-jdbc
|
||||
title: JDBC Protocol Custom Monitoring
|
||||
sidebar_label: JDBC Protocol Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use JDBC(support mysql,mariadb,postgresql,sqlserver at present) to customize Metric monitoring.
|
||||
> JDBC protocol custom monitoring allows us to easily monitor Metrics we want by writing SQL query statement.
|
||||
|
||||
## JDBC protocol collection process
|
||||
|
||||
【**System directly connected to MYSQL**】->【**Run SQL query statement**】->【**parse response data: oneRow, multiRow, columns**】->【**Metric data extraction**】
|
||||
|
||||
It can be seen from the process that we define a monitoring type of JDBC protocol. We need to configure SSH request parameters, configure which Metrics to obtain, and configure query SQL statements.
|
||||
|
||||
### Data parsing method
|
||||
|
||||
We can obtain the corresponding Metric data through the data fields queried by SQL and the Metric mapping we need. At present, there are three mapping parsing methods:oneRow, multiRow, columns.
|
||||
|
||||
#### **oneRow**
|
||||
|
||||
> Query a row of data, return the column name of the result set through query and map them to the queried field.
|
||||
|
||||
eg:
|
||||
queried Metric fields:one two three four
|
||||
query SQL:select one, two, three, four from book limit 1;
|
||||
Here the Metric field and the response data can be mapped into a row of collected data one by one.
|
||||
|
||||
#### **multiRow**
|
||||
|
||||
> Query multiple rows of data, return the column names of the result set and map them to the queried fields.
|
||||
|
||||
eg:
|
||||
queried Metric fields:one two three four
|
||||
query SQL:select one, two, three, four from book;
|
||||
Here the Metric field and the response data can be mapped into multiple rows of collected data one by one.
|
||||
|
||||
#### **columns**
|
||||
|
||||
> Collect a row of Metric data. By matching the two columns of queried data (key value), key and the queried field, value is the value of the query field.
|
||||
|
||||
eg:
|
||||
queried fields:one two three four
|
||||
query SQL:select key, value from book;
|
||||
SQL response data:
|
||||
|
||||
| key | value |
|
||||
|-------|-------|
|
||||
| one | 243 |
|
||||
| two | 435 |
|
||||
| three | 332 |
|
||||
| four | 643 |
|
||||
|
||||
Here by mapping the Metric field with the key of the response data, we can obtain the corresponding value as collection and monitoring data.
|
||||
|
||||
### Custom Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `example_sql` which use the JDBC protocol to collect data.
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: db
|
||||
# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws...
|
||||
app: example_sql
|
||||
name:
|
||||
zh-CN: 模拟MYSQL应用类型
|
||||
en-US: MYSQL EXAMPLE APP
|
||||
# Monitoring parameter definition file is used to define required input parameter field structure definition Front-end page render input parameter box according to structure
|
||||
params:
|
||||
- field: host
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
type: host
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
type: number
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 80
|
||||
placeholder: 'Please enter the port'
|
||||
- field: database
|
||||
name:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database
|
||||
type: text
|
||||
required: false
|
||||
- field: username
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
type: text
|
||||
limit: 50
|
||||
required: false
|
||||
- field: password
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
type: password
|
||||
required: false
|
||||
- field: url
|
||||
name:
|
||||
zh-CN: Url
|
||||
en-US: Url
|
||||
type: text
|
||||
required: false
|
||||
# Metric group list
|
||||
metrics:
|
||||
- name: basic
|
||||
# The smaller Metric group scheduling priority(0-127), the higher the priority. After completion of the high priority Metric group collection,the low priority Metric group will then be scheduled. Metric groups with the same priority will be scheduled in parallel.
|
||||
# Metric group with a priority of 0 is an availability group which will be scheduled first. If the collection succeeds, the scheduling will continue otherwise interrupt scheduling.
|
||||
priority: 0
|
||||
# metrics fields list
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: version
|
||||
type: 1
|
||||
label: true
|
||||
- field: port
|
||||
type: 1
|
||||
- field: datadir
|
||||
type: 1
|
||||
- field: max_connections
|
||||
type: 0
|
||||
# (optional)Monitoring Metric alias mapping to the Metric name above. The field used to collect interface data is not the final Metric name directly. This alias is required for mapping conversion.
|
||||
aliasFields:
|
||||
- version
|
||||
- version_compile_os
|
||||
- version_compile_machine
|
||||
- port
|
||||
- datadir
|
||||
- max_connections
|
||||
# (optional)The Metric calculation expression works with the above alias to calculate the final required Metric value.
|
||||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||||
calculates:
|
||||
- port=port
|
||||
- datadir=datadir
|
||||
- max_connections=max_connections
|
||||
- version=version+"_"+version_compile_os+"_"+version_compile_machine
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
# host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
platform: mysql
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
database: ^_^database^_^
|
||||
# SQL query method:oneRow, multiRow, columns
|
||||
queryType: columns
|
||||
# sql
|
||||
sql: show global variables where Variable_name like 'version%' or Variable_name = 'max_connections' or Variable_name = 'datadir' or Variable_name = 'port';
|
||||
url: ^_^url^_^
|
||||
|
||||
- name: status
|
||||
priority: 1
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: threads_created
|
||||
type: 0
|
||||
- field: threads_connected
|
||||
type: 0
|
||||
- field: threads_cached
|
||||
type: 0
|
||||
- field: threads_running
|
||||
type: 0
|
||||
# (optional)Monitoring Metric alias mapping to the Metric name above. The field used to collect interface data is not the final Metric name directly. This alias is required for mapping conversion.
|
||||
aliasFields:
|
||||
- threads_created
|
||||
- threads_connected
|
||||
- threads_cached
|
||||
- threads_running
|
||||
# (optional)The Metric calculation expression works with the above alias to calculate the final required Metric value.
|
||||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||||
calculates:
|
||||
- threads_created=threads_created
|
||||
- threads_connected=threads_connected
|
||||
- threads_cached=threads_cached
|
||||
- threads_running=threads_running
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
# host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
platform: mysql
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
database: ^_^database^_^
|
||||
# SQL query method: oneRow, multiRow, columns
|
||||
queryType: columns
|
||||
# sql
|
||||
sql: show global status where Variable_name like 'thread%' or Variable_name = 'com_commit' or Variable_name = 'com_rollback' or Variable_name = 'questions' or Variable_name = 'uptime';
|
||||
url: ^_^url^_^
|
||||
|
||||
- name: innodb
|
||||
priority: 2
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: innodb_data_reads
|
||||
type: 0
|
||||
unit: times
|
||||
- field: innodb_data_writes
|
||||
type: 0
|
||||
unit: times
|
||||
- field: innodb_data_read
|
||||
type: 0
|
||||
unit: kb
|
||||
- field: innodb_data_written
|
||||
type: 0
|
||||
unit: kb
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
# host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
platform: mysql
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
database: ^_^database^_^
|
||||
# SQL query method:oneRow, multiRow, columns
|
||||
queryType: columns
|
||||
# sql
|
||||
sql: show global status where Variable_name like 'innodb%';
|
||||
url: ^_^url^_^
|
||||
```
|
||||
@@ -0,0 +1,194 @@
|
||||
---
|
||||
id: extend-jmx
|
||||
title: JMX Protocol Custom Monitoring
|
||||
sidebar_label: JMX Protocol Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use JMX to customize Metric monitoring.
|
||||
> JMX protocol custom monitoring allows us to easily monitor Metrics we want by config JMX Mbeans Object.
|
||||
|
||||
## JMX protocol collection process
|
||||
|
||||
【**Peer Server Enable Jmx Service**】->【**HertzBeat Connect Peer Server Jmx**】->【**Query Jmx Mbean Object Data**】->【**Metric data extraction**】
|
||||
|
||||
It can be seen from the process that we define a monitoring type of JMX protocol. We need to configure JMX request parameters, configure which Metrics to obtain, and configure Mbeans Object.
|
||||
|
||||
### Data parsing method
|
||||
|
||||
By configuring the monitoring template YML metrics `field`, `aliasFields`, `objectName` of the `jmx` protocol to map and parse the `Mbean` object information exposed by the peer system.
|
||||
|
||||
### Custom Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||

|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `example_jvm` which use the JVM protocol to collect data.
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: service
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: example_jvm
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: 自定义JVM虚拟机
|
||||
en-US: CUSTOM JVM
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: true
|
||||
# default value
|
||||
defaultValue: 9999
|
||||
# field-param field key
|
||||
- field: url
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: JMX URL
|
||||
en-US: JMX URL
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# param field input placeholder
|
||||
placeholder: 'service:jmx:rmi:///jndi/rmi://host:port/jmxrmi'
|
||||
# field-param field key
|
||||
- field: username
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 50
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: password
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - basic
|
||||
- name: basic
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label
|
||||
- field: VmName
|
||||
type: 1
|
||||
- field: VmVendor
|
||||
type: 1
|
||||
- field: VmVersion
|
||||
type: 1
|
||||
- field: Uptime
|
||||
type: 0
|
||||
unit: ms
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: jmx
|
||||
# the config content when protocol is jmx
|
||||
jmx:
|
||||
# host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
# jmx mbean object name
|
||||
objectName: java.lang:type=Runtime
|
||||
url: ^_^url^_^
|
||||
|
||||
- name: memory_pool
|
||||
priority: 1
|
||||
fields:
|
||||
- field: name
|
||||
type: 1
|
||||
label: true
|
||||
- field: committed
|
||||
type: 0
|
||||
unit: MB
|
||||
- field: init
|
||||
type: 0
|
||||
unit: MB
|
||||
- field: max
|
||||
type: 0
|
||||
unit: MB
|
||||
- field: used
|
||||
type: 0
|
||||
unit: MB
|
||||
units:
|
||||
- committed=B->MB
|
||||
- init=B->MB
|
||||
- max=B->MB
|
||||
- used=B->MB
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- Name
|
||||
- Usage->committed
|
||||
- Usage->init
|
||||
- Usage->max
|
||||
- Usage->used
|
||||
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
|
||||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||||
calculates:
|
||||
- name=Name
|
||||
- committed=Usage->committed
|
||||
- init=Usage->init
|
||||
- max=Usage->max
|
||||
- used=Usage->used
|
||||
protocol: jmx
|
||||
jmx:
|
||||
# host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
objectName: java.lang:type=MemoryPool,name=*
|
||||
url: ^_^url^_^
|
||||
```
|
||||
@@ -0,0 +1,174 @@
|
||||
---
|
||||
id: extend-ngql
|
||||
title: NGQL Custom Monitoring
|
||||
sidebar_label: NGQL Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use JDBC(support mysql,mariadb,postgresql,sqlserver at present) to customize Metric monitoring.
|
||||
> NGQL custom monitoring allows us to easily query metric data from the NebulaGraph graph database using NGQL or OpenCypher, supporting NebulaGraph 3.X versions.
|
||||
|
||||
## Data Parsing Methods
|
||||
|
||||
Mapping the fields returned by NGQL queries to the metrics we need allows us to obtain corresponding metric data. Currently, there are four mapping and parsing methods: filterCount, oneRow, multiRow, columns.
|
||||
|
||||
### **filterCount**
|
||||
>
|
||||
> Counts the number of results returned by a query based on specified fields, usually used in `SHOW ...` statements. If NGQL statements can directly return the count, it is recommended to use NGQL statements for counting.
|
||||
> Syntax for the `commands` field: aliasField#NGQL#filterName#filterValue
|
||||
> `aliasField`: corresponds to the value in the `aliasFields` in the monitoring template
|
||||
> `NGQL`: query statement
|
||||
> `filterName`: filter attribute name (optional)
|
||||
> `filterValue`: filter attribute value (optional)
|
||||
|
||||
For example:
|
||||
|
||||
- online_meta_count#SHOW HOSTS META#Status#ONLINE
|
||||
Counts the number of rows returned by `SHOW HOSTS META` where Status equals ONLINE.
|
||||
- online_meta_count#SHOW HOSTS META##
|
||||
Counts the number of rows returned by `SHOW HOSTS META`.
|
||||
|
||||
#### **oneRow**
|
||||
|
||||
> Queries a single row of data by mapping the column names of the query result set to the queried fields.
|
||||
|
||||
For example:
|
||||
|
||||
- Metrics fields: a, b
|
||||
- NGQL query: match (v:metrics) return v.metrics.a as a, v.metrics.b as b;
|
||||
|
||||
Here, the metric fields can be mapped to the response data row by row.
|
||||
|
||||
Notes:
|
||||
|
||||
- When using the `oneRow` method, if a single query statement returns multiple rows of results, only the first row of results will be mapped to the metric fields.
|
||||
- When the `commands` field contains two or more query statements and the returned fields of multiple query statements are the same, the fields returned by the subsequent statement will overwrite those returned by the previous statement.
|
||||
- It is recommended to use the limit statement to limit the number of rows returned in the result set when defining `commands`.
|
||||
|
||||
#### **multiRow**
|
||||
|
||||
> Queries multiple rows of data by mapping the column names of the query result set to the queried fields.
|
||||
|
||||
For example:
|
||||
|
||||
- Metrics fields: a, b
|
||||
- NGQL query: match (v:metrics) return v.metrics.a as a, v.metrics.b as b;
|
||||
|
||||
Here, the metric fields can be mapped to the response data row by row.
|
||||
Notes:
|
||||
|
||||
- When using the `multiRow` method, the `commands` field can only contain one query statement.
|
||||
|
||||
#### **columns**
|
||||
|
||||
> Collects a single row of metric data by mapping two columns of data (key-value), where the key matches the queried fields and the value is the value of the queried field.
|
||||
|
||||
Notes:
|
||||
|
||||
- When using the `columns` method, the first two columns of the result set are mapped to collect data by default, where the first column corresponds to the metric name and the second column corresponds to the metric value.
|
||||
- When the `commands` field contains two or more query statements and the first column of data returned by multiple query statements is duplicated, the result of the last statement will be retained.
|
||||
|
||||
### Customization Steps
|
||||
|
||||
**HertzBeat Page** -> **Monitoring Template Menu** -> **Add Monitoring Type** -> **Configure Custom Monitoring Template YML** -> **Click Save Application** -> **Use the New Monitoring Type to Add Monitoring**
|
||||
|
||||

|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Template YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
> Monitoring template is used to define the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information, etc.
|
||||
|
||||
eg: Customize a monitoring type named example_ngql, which collects metric data using NGQL.
|
||||
|
||||
```yaml
|
||||
# Monitoring category: service-application service program-application program db-database custom-custom os-operating system bigdata-big data mid-middleware webserver-web server cache-cache cn-cloud native network-network monitoring, etc.
|
||||
category: db
|
||||
# Monitoring application type (consistent with the file name) eg: linux windows tomcat mysql aws...
|
||||
app: example_ngql
|
||||
name:
|
||||
zh-CN: NGQL Custom Monitoring Application
|
||||
en-US: NGQL Custom APP
|
||||
# Monitoring parameter definition. These are input parameter variables, which can be written in the format of ^_^host^_^ to be replaced by system variable values in the later configuration
|
||||
# This part is usually not modified
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
name:
|
||||
zh-CN: Target Host
|
||||
en-US: Target Host
|
||||
type: host
|
||||
required: true
|
||||
- field: graphPort
|
||||
name:
|
||||
zh-CN: Graph Port
|
||||
en-US: Graph Port
|
||||
type: number
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 9669
|
||||
- field: username
|
||||
name:
|
||||
zh-CN: Username
|
||||
en-US: Username
|
||||
type: text
|
||||
required: true
|
||||
- field: password
|
||||
name:
|
||||
zh-CN: Password
|
||||
en-US: Password
|
||||
type: password
|
||||
required: true
|
||||
- field: spaceName
|
||||
name:
|
||||
zh-CN: Space Name
|
||||
en-US: Space Name
|
||||
type: text
|
||||
required: false
|
||||
- field: timeout
|
||||
name:
|
||||
zh-CN: Connect Timeout(ms)
|
||||
en-US: Connect Timeout(ms)
|
||||
type: number
|
||||
unit: ms
|
||||
range: '[0,100000]'
|
||||
required: true
|
||||
defaultValue: 6000
|
||||
# Metric collection configuration list
|
||||
metrics:
|
||||
- name: base_info
|
||||
i18n:
|
||||
zh-CN: Vertex statistics
|
||||
en-US: Vertex statistics
|
||||
priority: 0
|
||||
fields:
|
||||
- field: tag1
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: tag1
|
||||
en-US: tag1
|
||||
- field: tag1
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: tag2
|
||||
en-US: tag2
|
||||
aliasFields:
|
||||
- tag1
|
||||
- tag2
|
||||
protocol: ngql
|
||||
ngql:
|
||||
host: ^_^host^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
port: ^_^graphPort^_^
|
||||
spaceName: ^_^spaceName^_^
|
||||
parseType: columns
|
||||
# Define the query statements used to collect data
|
||||
commands:
|
||||
- match (v:tag1) return "tag1" as name ,count(v) as cnt
|
||||
- match (v:tag2) return "tag2" as name ,count(v) as cnt
|
||||
timeout: ^_^timeout^_^
|
||||
```
|
||||
@@ -0,0 +1,146 @@
|
||||
---
|
||||
id: extend-point
|
||||
title: Custom Monitoring
|
||||
sidebar_label: Custom Monitoring
|
||||
---
|
||||
|
||||
> HertzBeat has custom monitoring ability. You only need to configure monitoring template yml to fit a custom monitoring type.
|
||||
> Custom monitoring currently supports [HTTP protocol](extend-http),[JDBC protocol](extend-jdbc), [SSH protocol](extend-ssh), [JMX protocol](extend-jmx), [SNMP protocol](extend-snmp). And it will support more general protocols in the future.
|
||||
|
||||
## Custom Monitoring Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
### Custom Monitoring Metrics Refresh Interval
|
||||
|
||||
HertzBeat now supports setting different refresh intervals for various groups of monitoring metrics. This can be configured in the monitoring template under the `metrics` section by setting the `interval` field, with the unit being seconds. If not set, the default refresh interval specified during the creation of the monitoring will be used.
|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `example2` which use the HTTP protocol to collect data.
|
||||
|
||||
**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply**
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: example2
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: 模拟网站监测
|
||||
en-US: EXAMPLE WEBSITE
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`<br>`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。
|
||||
en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `<br>`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template."
|
||||
zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`<br>`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/
|
||||
en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: true
|
||||
# default value
|
||||
defaultValue: 80
|
||||
# field-param field key
|
||||
- field: uri
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 相对路径
|
||||
en-US: URI
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 200
|
||||
# required-true or false
|
||||
required: false
|
||||
# param field input placeholder
|
||||
placeholder: 'Website uri path(no ip port) EG:/console'
|
||||
# field-param field key
|
||||
- field: ssl
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 启用HTTPS
|
||||
en-US: HTTPS
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: timeout
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: number
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
|
||||
metrics:
|
||||
# metrics - summary, inner monitoring metrics (responseTime - response time, keyword - number of keywords)
|
||||
- name: summary
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# refresh interval for this metrics group
|
||||
interval: 600
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label
|
||||
- field: responseTime
|
||||
type: 0
|
||||
unit: ms
|
||||
- field: keyword
|
||||
type: 0
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# http host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url
|
||||
url: ^_^uri^_^
|
||||
timeout: ^_^timeout^_^
|
||||
# http method: GET POST PUT DELETE PATCH
|
||||
method: GET
|
||||
# if enabled https
|
||||
ssl: ^_^ssl^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
|
||||
parseType: website
|
||||
|
||||
```
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
id: extend-push
|
||||
title: Push Style Custom Monitoring
|
||||
sidebar_label: Push Style Custom Monitoring
|
||||
---
|
||||
|
||||
> Push style curstom monitor is a type of monitor which allow user to configure metrics format and push metrics to hertzbeat with their own service.
|
||||
> Here we will introduce how to use this feature.
|
||||
|
||||
## Push style custom monitor collection process
|
||||
|
||||
【Peer Server Start Pushing Metrics】 -> 【HertzBeat Push Module Stage Metrics】-> 【HertzBeat Collect Module collect Metrics Periodically】
|
||||
|
||||
### Data parsing method
|
||||
|
||||
HertzBeat will parsing metrics with the format configured by user while adding new monitor.
|
||||
|
||||
### Create Monitor Steps
|
||||
|
||||
HertzBeat DashBoard -> Service Monitor -> Push Style Monitor -> New Push Style Monitor -> set Push Module Host (hertzbeat server ip, usually 127.0.0.1/localhost) -> set Push Module Port (hertzbeat server port, usually 1157) -> configure metrics field (unit: string, type: 0 number / 1 string) -> end
|
||||
|
||||
---
|
||||
|
||||
### Monitor Configuration Example
|
||||
|
||||

|
||||
@@ -0,0 +1,171 @@
|
||||
---
|
||||
id: extend-snmp
|
||||
title: SNMP Protocol Custom Monitoring
|
||||
sidebar_label: SNMP Protocol Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use SNMP to customize Metric monitoring.
|
||||
> JMX protocol custom monitoring allows us to easily monitor Metrics we want by config SNMP MIB OIDs.
|
||||
|
||||
## SNMP protocol collection process
|
||||
|
||||
【**Peer Server Enable SNMP Service**】->【**HertzBeat Connect Peer Server SNMP**】->【**Query Oids Data**】->【**Metric data extraction**】
|
||||
|
||||
It can be seen from the process that we define a monitoring type of Snmp protocol. We need to configure Snmp request parameters, configure which Metrics to obtain, and configure oids.
|
||||
|
||||
### Data parsing method
|
||||
|
||||
By configuring the metrics `field`, `aliasFields`, and `oids` under the `snmp` protocol of the monitoring template YML to capture the data specified by the peer and parse the mapping.
|
||||
|
||||
### Custom Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||

|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `example_windows` which use the SNMP protocol to collect data.
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring mid-middleware custom-custom monitoring os-operating system monitoring
|
||||
category: os
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: windows
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: Windows操作系统
|
||||
en-US: OS Windows
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: true
|
||||
# default value
|
||||
defaultValue: 161
|
||||
# field-param field key
|
||||
- field: version
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP 版本
|
||||
en-US: SNMP Version
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
required: true
|
||||
# when type is radio checkbox, use option to show optional values {name1:value1,name2:value2}
|
||||
options:
|
||||
- label: SNMPv1
|
||||
value: 0
|
||||
- label: SNMPv2c
|
||||
value: 1
|
||||
# field-param field key
|
||||
- field: community
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP 团体字
|
||||
en-US: SNMP Community
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 100
|
||||
# required-true or false
|
||||
required: true
|
||||
# param field input placeholder
|
||||
placeholder: 'Snmp community for v1 v2c'
|
||||
# field-param field key
|
||||
- field: timeout
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,100000]'
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide-is hide this field and put it in advanced layout
|
||||
hide: true
|
||||
# default value
|
||||
defaultValue: 6000
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - system
|
||||
- name: system
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label
|
||||
- field: name
|
||||
type: 1
|
||||
- field: descr
|
||||
type: 1
|
||||
- field: uptime
|
||||
type: 1
|
||||
- field: numUsers
|
||||
type: 0
|
||||
- field: services
|
||||
type: 0
|
||||
- field: processes
|
||||
type: 0
|
||||
- field: responseTime
|
||||
type: 0
|
||||
unit: ms
|
||||
- field: location
|
||||
type: 1
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: snmp
|
||||
# the config content when protocol is snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^version^_^
|
||||
# snmp operation: get, walk
|
||||
operation: get
|
||||
# metrics oids: metric_name - oid_value
|
||||
oids:
|
||||
name: 1.3.6.1.2.1.1.5.0
|
||||
descr: 1.3.6.1.2.1.1.1.0
|
||||
uptime: 1.3.6.1.2.1.25.1.1.0
|
||||
numUsers: 1.3.6.1.2.1.25.1.5.0
|
||||
services: 1.3.6.1.2.1.1.7.0
|
||||
processes: 1.3.6.1.2.1.25.1.6.0
|
||||
location: 1.3.6.1.2.1.1.6.0
|
||||
```
|
||||
@@ -0,0 +1,214 @@
|
||||
---
|
||||
id: extend-ssh
|
||||
title: SSH Protocol Custom Monitoring
|
||||
sidebar_label: SSH Protocol Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use SSH protocol to customize Metric monitoring.
|
||||
> SSH protocol custom monitoring allows us to easily monitor and collect the Linux Metrics we want by writing sh command script.
|
||||
|
||||
## SSH protocol collection process
|
||||
|
||||
【**System directly connected to Linux**】->【**Run shell command script statement**】->【**parse response data: oneRow, multiRow**】->【**Metric data extraction**】
|
||||
|
||||
It can be seen from the process that we define a monitoring type of SSH protocol. We need to configure SSH request parameters, configure which Metrics to obtain, and configure query script statements.
|
||||
|
||||
### Data parsing method
|
||||
|
||||
We can obtain the corresponding Metric data through the data fields queried by the SHELL script and the Metric mapping we need. At present, there are two mapping parsing methods:oneRow and multiRow which can meet the needs of most Metrics.
|
||||
|
||||
#### **oneRow**
|
||||
|
||||
> Query out a column of data, return the field value (one value per row) of the result set through query and map them to the field.
|
||||
|
||||
eg:
|
||||
Metrics of Linux to be queried hostname-host name,uptime-start time
|
||||
Host name original query command:`hostname`
|
||||
Start time original query command:`uptime | awk -F "," '{print $1}'`
|
||||
Then the query script of the two Metrics in hertzbeat is(Use `;` Connect them together):
|
||||
`hostname; uptime | awk -F "," '{print $1}'`
|
||||
The data responded by the terminal is:
|
||||
|
||||
```shell
|
||||
tombook
|
||||
14:00:15 up 72 days
|
||||
```
|
||||
|
||||
At last collected Metric data is mapped one by one as:
|
||||
hostname is `tombook`
|
||||
uptime is `14:00:15 up 72 days`
|
||||
|
||||
Here the Metric field and the response data can be mapped into a row of collected data one by one
|
||||
|
||||
#### **multiRow**
|
||||
|
||||
> Query multiple rows of data, return the column names of the result set through the query, and map them to the Metric field of the query.
|
||||
|
||||
eg:
|
||||
Linux memory related Metric fields queried:total-Total memory, used-Used memory,free-Free memory, buff-cache-Cache size, available-Available memory
|
||||
Memory metrics original query command:`free -m`, Console response:
|
||||
|
||||
```shell
|
||||
total used free shared buff/cache available
|
||||
Mem: 7962 4065 333 1 3562 3593
|
||||
Swap: 8191 33 8158
|
||||
```
|
||||
|
||||
In hertzbeat multiRow format parsing requires a one-to-one mapping between the column name of the response data and the indicator value, so the corresponding query SHELL script is:
|
||||
`free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'`
|
||||
Console response is:
|
||||
|
||||
```shell
|
||||
total used free buff_cache available
|
||||
7962 4066 331 3564 3592
|
||||
```
|
||||
|
||||
Here the Metric field and the response data can be mapped into collected data one by one.
|
||||
|
||||
### Custom Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `example_linux` which use the SSH protocol to collect data.
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: os
|
||||
# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws...
|
||||
app: example_linux
|
||||
name:
|
||||
zh-CN: 模拟LINUX应用类型
|
||||
en-US: LINUX EXAMPLE APP
|
||||
params:
|
||||
- field: host
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
type: host
|
||||
required: true
|
||||
- field: port
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
type: number
|
||||
range: '[0,65535]'
|
||||
required: true
|
||||
defaultValue: 22
|
||||
placeholder: 'Please enter the port'
|
||||
- field: username
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
type: text
|
||||
limit: 50
|
||||
required: true
|
||||
- field: password
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
type: password
|
||||
required: true
|
||||
# Metric group list
|
||||
metrics:
|
||||
# The first monitoring Metric group basic
|
||||
# Note:: the built-in monitoring Metrics have (responseTime - response time)
|
||||
- name: basic
|
||||
# The smaller Metric group scheduling priority(0-127), the higher the priority. After completion of the high priority Metric group collection,the low priority Metric group will then be scheduled. Metric groups with the same priority will be scheduled in parallel.
|
||||
# Metric group with a priority of 0 is an availability group which will be scheduled first. If the collection succeeds, the scheduling will continue otherwise interrupt scheduling.
|
||||
priority: 0
|
||||
# metrics fields list
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: hostname
|
||||
type: 1
|
||||
label: true
|
||||
- field: version
|
||||
type: 1
|
||||
- field: uptime
|
||||
type: 1
|
||||
# protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: ssh
|
||||
# Specific collection configuration when the protocol is SSH protocol
|
||||
ssh:
|
||||
# host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
script: (uname -r ; hostname ; uptime | awk -F "," '{print $1}' | sed "s/ //g") | sed ":a;N;s/\n/^/g;ta" | awk -F '^' 'BEGIN{print "version hostname uptime"} {print $1, $2, $3}'
|
||||
# parsing method for response data:oneRow, multiRow
|
||||
parseType: multiRow
|
||||
|
||||
- name: cpu
|
||||
priority: 1
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: info
|
||||
type: 1
|
||||
- field: cores
|
||||
type: 0
|
||||
unit: the number of cores
|
||||
- field: interrupt
|
||||
type: 0
|
||||
unit: number
|
||||
- field: load
|
||||
type: 1
|
||||
- field: context_switch
|
||||
type: 0
|
||||
unit: number
|
||||
# protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: ssh
|
||||
# Specific collection configuration when the protocol is SSH protocol
|
||||
ssh:
|
||||
# 主机host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
script: "LANG=C lscpu | awk -F: '/Model name/ {print $2}';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}'"
|
||||
parseType: oneRow
|
||||
|
||||
- name: memory
|
||||
priority: 2
|
||||
fields:
|
||||
# Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit
|
||||
- field: total
|
||||
type: 0
|
||||
unit: Mb
|
||||
- field: used
|
||||
type: 0
|
||||
unit: Mb
|
||||
- field: free
|
||||
type: 0
|
||||
unit: Mb
|
||||
- field: buff_cache
|
||||
type: 0
|
||||
unit: Mb
|
||||
- field: available
|
||||
type: 0
|
||||
unit: Mb
|
||||
# protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: ssh
|
||||
# Specific collection configuration when the protocol is SSH protocol
|
||||
ssh:
|
||||
# host: ipv4 ipv6 domain name
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
script: free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'
|
||||
parseType: multiRow
|
||||
```
|
||||
@@ -0,0 +1,299 @@
|
||||
---
|
||||
id: extend-telnet
|
||||
title: Telnet Protocol Custom Monitoring
|
||||
sidebar_label: Telnet Protocol Custom Monitoring
|
||||
---
|
||||
|
||||
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use Telnet to customize Metric monitoring.
|
||||
> Telnet protocol custom monitoring allows us to easily monitor and collect the Linux Metrics we want by writing sh command script.
|
||||
|
||||
## Telnet protocol collection process
|
||||
|
||||
【**System directly connected to Linux**】->【**Run shell command script statement**】->【**parse response data: oneRow, multiRow**】->【**Metric data extraction**】
|
||||
|
||||
It can be seen from the process that we define a monitoring type of Telnet protocol. We need to configure Telnet request parameters, configure which Metrics to obtain, and configure query script statements.
|
||||
|
||||
### Data parsing method
|
||||
|
||||
By configuring the metrics `field`, `aliasFields` the `Telnet` protocol of the monitoring template YML to capture the data specified by the peer and parse the mapping.
|
||||
|
||||
### Custom Steps
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||

|
||||
|
||||
-------
|
||||
|
||||
Configuration usages of the monitoring templates yml are detailed below.
|
||||
|
||||
### Monitoring Templates YML
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
eg:Define a custom monitoring type `app` named `zookeeper` which use the telnet protocol to collect data.
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等
|
||||
category: mid
|
||||
# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws...
|
||||
# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws...
|
||||
app: zookeeper
|
||||
# The monitoring i18n name
|
||||
# 监控类型国际化名称
|
||||
name:
|
||||
zh-CN: Zookeeper服务
|
||||
en-US: Zookeeper Server
|
||||
# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换
|
||||
# 强制固定必须参数 - host
|
||||
params:
|
||||
# field-param field key
|
||||
# field-字段名称标识符
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
# name-参数字段显示名称
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
# type-字段类型,样式(大部分映射input标签type属性)
|
||||
type: host
|
||||
# required-true or false
|
||||
# 是否是必输项 true-必填 false-可选
|
||||
required: true
|
||||
# field-param field key
|
||||
# field-字段名称标识符
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
# name-参数字段显示名称
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
# type-字段类型,样式(大部分映射input标签type属性)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
# 当type为number时,用range表示范围
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
# 是否是必输项 true-必填 false-可选
|
||||
required: true
|
||||
# default
|
||||
# 默认值
|
||||
defaultValue: 2181
|
||||
# param field input placeholder
|
||||
# 参数输入框提示信息
|
||||
placeholder: '请输入端口'
|
||||
# field-param field key
|
||||
# field-字段名称标识符
|
||||
- field: timeout
|
||||
# name-param field display i18n name
|
||||
# name-参数字段显示名称
|
||||
name:
|
||||
zh-CN: 查询超时时间(ms)
|
||||
en-US: Query Timeout(ms)
|
||||
# type-param field type(most mapping the html input type)
|
||||
# type-字段类型,样式(大部分映射input标签type属性)
|
||||
type: number
|
||||
# required-true or false
|
||||
# 是否是必输项 true-必填 false-可选
|
||||
required: false
|
||||
# hide-is hide this field and put it in advanced layout
|
||||
# 隐藏是隐藏这个字段,并把它放在高级布局
|
||||
hide: true
|
||||
# default
|
||||
# 默认值
|
||||
defaultValue: 6000
|
||||
# collect metrics config list
|
||||
# 采集指标配置列表
|
||||
metrics:
|
||||
# metrics - conf
|
||||
# 第一个监控指标 conf
|
||||
# 注意:内置监控指标有 (responseTime - 响应时间)
|
||||
- name: conf
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
# 指标采集调度优先级(0->127)->(优先级高->低) 优先级低的指标会等优先级高的指标采集完成后才会被调度, 相同优先级的指标会并行调度采集
|
||||
# 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
# 具体监控指标列表
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label
|
||||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位
|
||||
- field: clientPort
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 客户端端口
|
||||
en-US: Client Port
|
||||
- field: dataDir
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 数据目录
|
||||
en-US: Data Directory
|
||||
- field: dataDirSize
|
||||
type: 0
|
||||
unit: kb
|
||||
i18n:
|
||||
zh-CN: 数据目录大小
|
||||
en-US: Data Directory Size
|
||||
- field: dataLogDir
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 日志目录
|
||||
en-US: Data Log Directory
|
||||
- field: dataLogSize
|
||||
type: 0
|
||||
unit: kb
|
||||
i18n:
|
||||
zh-CN: 日志目录大小
|
||||
en-US: Data Log Size
|
||||
- field: tickTime
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 心跳间隔时间
|
||||
en-US: Tick Time
|
||||
- field: maxClientCnxns
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 最大客户端连接数
|
||||
en-US: Max Client Connections
|
||||
- field: minSessionTimeout
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 最小会话超时
|
||||
en-US: Min Session Timeout
|
||||
- field: maxSessionTimeout
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 最大会话超时
|
||||
en-US: Max Session Timeout
|
||||
- field: serverId
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 服务器ID
|
||||
en-US: Server ID
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
# 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: telnet
|
||||
# the config content when protocol is telnet
|
||||
# 当protocol为telnet协议时具体的采集配置
|
||||
telnet:
|
||||
# host: ipv4 ipv6 domain
|
||||
# 主机host: ipv4 ipv6 域名
|
||||
host: ^_^host^_^
|
||||
# port
|
||||
# 端口
|
||||
port: ^_^port^_^
|
||||
# timeout
|
||||
# 超时时间
|
||||
timeout: ^_^timeout^_^
|
||||
# telnet instruction
|
||||
# telnet指令
|
||||
cmd: conf
|
||||
|
||||
- name: stats
|
||||
priority: 1
|
||||
fields:
|
||||
- field: zk_version
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: ZooKeeper版本
|
||||
en-US: ZooKeeper Version
|
||||
- field: zk_server_state
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 服务器状态
|
||||
en-US: Server State
|
||||
- field: zk_num_alive_connections
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 存活连接数
|
||||
en-US: Number of Alive Connections
|
||||
- field: zk_avg_latency
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 平均延迟
|
||||
en-US: Average Latency
|
||||
- field: zk_outstanding_requests
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 未完成请求数
|
||||
en-US: Outstanding Requests
|
||||
- field: zk_znode_count
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: ZNode数量
|
||||
en-US: ZNode Count
|
||||
- field: zk_packets_sent
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 发送数据包数
|
||||
en-US: Packets Sent
|
||||
- field: zk_packets_received
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 接收数据包数
|
||||
en-US: Packets Received
|
||||
- field: zk_watch_count
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: Watch数量
|
||||
en-US: Watch Count
|
||||
- field: zk_max_file_descriptor_count
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 最大文件描述符数量
|
||||
en-US: Max File Descriptor Count
|
||||
- field: zk_approximate_data_size
|
||||
type: 0
|
||||
unit: kb
|
||||
i18n:
|
||||
zh-CN: 大致数据大小
|
||||
en-US: Approximate Data Size
|
||||
- field: zk_open_file_descriptor_count
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 打开的文件描述符数量
|
||||
en-US: Open File Descriptor Count
|
||||
- field: zk_max_latency
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 最大延迟
|
||||
en-US: Max Latency
|
||||
- field: zk_ephemerals_count
|
||||
type: 0
|
||||
unit: 个
|
||||
i18n:
|
||||
zh-CN: 临时节点数量
|
||||
en-US: Ephemerals Count
|
||||
- field: zk_min_latency
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 最小延迟
|
||||
en-US: Min Latency
|
||||
protocol: telnet
|
||||
telnet:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
timeout: ^_^timeout^_^
|
||||
cmd: mntr
|
||||
|
||||
|
||||
```
|
||||
@@ -0,0 +1,232 @@
|
||||
---
|
||||
id: extend-tutorial
|
||||
title: Quick Tutorial Customize and adapt a monitoring based on HTTP protocol
|
||||
sidebar_label: Tutorial Case
|
||||
---
|
||||
|
||||
Through this tutorial, we describe step by step how to customize and adapt a monitoring type based on the http protocol under the Apache HertzBeat.
|
||||
|
||||
Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [Http Protocol Customization](extend-http).
|
||||
|
||||
## HTTP protocol parses the general response structure to obtain metrics data
|
||||
>
|
||||
> In many scenarios, we need to monitor the provided HTTP API interface and obtain the index value returned by the interface. In this article, we use the http custom protocol to parse our common http interface response structure, and obtain the fields in the returned body as metric data.
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
As above, usually our background API interface will design such a general return. The same is true for the background of the hertzbeat system. Today, we will use the hertzbeat API as an example, add a new monitoring type **hertzbeat**, and monitor and collect its system summary statistics API
|
||||
`http://localhost:1157/api/summary`, the response data is:
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": null,
|
||||
"code": 0,
|
||||
"data": {
|
||||
"apps": [
|
||||
{
|
||||
"category": "service",
|
||||
"app": "jvm",
|
||||
"status": 0,
|
||||
"size": 2,
|
||||
"availableSize": 0,
|
||||
"unManageSize": 2,
|
||||
"unAvailableSize": 0,
|
||||
"unReachableSize": 0
|
||||
},
|
||||
{
|
||||
"category": "service",
|
||||
"app": "website",
|
||||
"status": 0,
|
||||
"size": 2,
|
||||
"availableSize": 0,
|
||||
"unManageSize": 2,
|
||||
"unAvailableSize": 0,
|
||||
"unReachableSize": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**This time we get the metrics data such as `category`, `app`, `status`, `size`, `availableSize` under the app.**
|
||||
|
||||
### Add Monitoring Template Yml
|
||||
|
||||
**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type**
|
||||
|
||||
> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring.
|
||||
>
|
||||
> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc.
|
||||
|
||||
Here we define a custom monitoring type `app` named `hertzbeat` which use the HTTP protocol to collect data.
|
||||
|
||||
**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply**
|
||||
|
||||
```yaml
|
||||
# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: custom
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: hertzbeat
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: HertzBeat监控系统
|
||||
en-US: HertzBeat Monitor
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 对 HertzBeat 监控系统的通用指标进行测量监控。`<br>`您可以点击 “`<i>`新建 HertzBeat监控系统`</i>`” 并进行配置,或者选择“`<i>`更多操作`</i>`”,导入已有配置。
|
||||
en-US: HertzBeat monitors HertzBeat Monitor through general performance metric. You could click the "`<i>`New HertzBeat Monitor`</i>`" button and proceed with the configuration or import an existing setup through the "`<i>`More Actions`</i>`" menu.
|
||||
zh-TW: HertzBeat對HertzBeat監控系統的通用名額進行量測監控。`<br>`您可以點擊“`<i>`新建HertzBeat監控系統`</i>`”並進行配寘,或者選擇“`<i>`更多操作`</i>`”,導入已有配寘。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat
|
||||
en-US: https://hertzbeat.apache.org/docs/help/hertzbeat
|
||||
# Input params define for monitoring(render web ui by the definition)
|
||||
params:
|
||||
# field-param field key
|
||||
- field: host
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 主机Host
|
||||
en-US: Host
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: port
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: true
|
||||
# default value
|
||||
defaultValue: 1157
|
||||
- field: ssl
|
||||
name:
|
||||
zh-CN: 启用HTTPS
|
||||
en-US: HTTPS
|
||||
type: boolean
|
||||
required: true
|
||||
- field: timeout
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
type: number
|
||||
required: false
|
||||
hide: true
|
||||
- field: authType
|
||||
name:
|
||||
zh-CN: 认证方式
|
||||
en-US: Auth Type
|
||||
type: radio
|
||||
required: false
|
||||
hide: true
|
||||
options:
|
||||
- label: Basic Auth
|
||||
value: Basic Auth
|
||||
- label: Digest Auth
|
||||
value: Digest Auth
|
||||
- field: username
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
type: text
|
||||
limit: 50
|
||||
required: false
|
||||
hide: true
|
||||
- field: password
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
type: password
|
||||
required: false
|
||||
hide: true
|
||||
metrics:
|
||||
# the first metrics summary
|
||||
# attention: Built-in monitoring metrics contains (responseTime - Response time)
|
||||
- name: summary
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
# collect metrics content
|
||||
fields:
|
||||
# metrics content contains field-metric name, type-metric type:0-number,1-string, label-if is metrics label, unit-metric unit('%','ms','MB')
|
||||
- field: app
|
||||
type: 1
|
||||
label: true
|
||||
- field: category
|
||||
type: 1
|
||||
- field: status
|
||||
type: 0
|
||||
- field: size
|
||||
type: 0
|
||||
- field: availableSize
|
||||
type: 0
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
http:
|
||||
# http host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# http port
|
||||
port: ^_^port^_^
|
||||
# http url, we don't need to enter a parameter here, just set the fixed value to /api/summary
|
||||
url: /api/summary
|
||||
timeout: ^_^timeout^_^
|
||||
# http method: GET POST PUT DELETE PATCH, default fixed value is GET
|
||||
method: GET
|
||||
# if enabled https, default value is false
|
||||
ssl: ^_^ssl^_^
|
||||
# http auth
|
||||
authorization:
|
||||
# http auth type: Basic Auth, Digest Auth, Bearer Token
|
||||
type: ^_^authType^_^
|
||||
basicAuthUsername: ^_^username^_^
|
||||
basicAuthPassword: ^_^password^_^
|
||||
digestAuthUsername: ^_^username^_^
|
||||
digestAuthPassword: ^_^password^_^
|
||||
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, we use jsonpath to parse response data here
|
||||
parseType: jsonPath
|
||||
parseScript: '$.data.apps.*'
|
||||
```
|
||||
|
||||
**The addition is complete, now we restart the hertzbeat system. We can see that the system page has added a `hertzbeat` monitoring type.**
|
||||
|
||||

|
||||
|
||||
### The system page adds the monitoring of `hertzbeat` monitoring type
|
||||
|
||||
> We click Add `HertzBeat Monitoring Tool`, configure monitoring IP, port, collection cycle, account password in advanced settings, etc., click OK to add monitoring.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
> After a certain period of time (depending on the collection cycle), we can see the specific metric data and historical charts in the monitoring details!
|
||||
|
||||

|
||||
|
||||
### Set threshold alarm notification
|
||||
|
||||
> Next, we can set the threshold normally. After the alarm is triggered, we can view it in the alarm center, add a new recipient, set alarm notification, etc. Have Fun!!!
|
||||
|
||||
----
|
||||
|
||||
#### over
|
||||
|
||||
This is the end of the practice of custom monitoring of the HTTP protocol. The HTTP protocol also has other parameters such as headers and params. We can define it like postman, and the playability is also very high!
|
||||
|
||||
If you think hertzbeat is a good open source project, please star us on GitHub Gitee, thank you very much. Thanks for the old iron support. Refill!
|
||||
|
||||
**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)**
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
id: 'become_committer'
|
||||
title: 'Become A Committer'
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
## Become A Committer of Apache HertzBeat
|
||||
|
||||
Anyone being supportive of the community and working in any of the
|
||||
CoPDoC areas can become an Apache HertzBeat™ committer. The CoPDoC is an
|
||||
acronym from ASF to describe how we recognize your contributions not
|
||||
only by code.
|
||||
|
||||
- **Community** - You can join us via our mailing list, issue
|
||||
trackers, discussions page to interact with community members, and
|
||||
share vision and knowledge
|
||||
- **Project** - a clear vision and consensus are needed
|
||||
- **Documentation** - without it, the stuff remains only in the minds
|
||||
of the authors
|
||||
- **Code** - discussion goes nowhere without code
|
||||
|
||||
Apache HertzBeat™ community strives to be meritocratic. Thus, once someone
|
||||
has contributed sufficiently to any area of CoPDoC they can be a
|
||||
candidate for committer-ship and at last voted in as a HertzBeat
|
||||
committer. Being an Apache HertzBeat™ committer does not necessarily mean
|
||||
you must commit code with your commit privilege to the codebase; it
|
||||
means you are committed to the HertzBeat project and are productively
|
||||
contributing to our community's success.
|
||||
|
||||
## Committer requirements
|
||||
|
||||
There are no strict rules for becoming a committer or new PMC member.
|
||||
Candidates for new committers are typically people that are active
|
||||
contributors and community members. Anyway, if the rules can be
|
||||
clarified a little bit, it can somehow clear the doubts in the minds
|
||||
of contributors and make the community more transparent, reasonable,
|
||||
and fair.
|
||||
|
||||
### Continuous contributions
|
||||
|
||||
Committer candidates should have a decent amount of continuous
|
||||
engagements and contributions (fixing bugs, adding new features,
|
||||
writing documentation, maintaining issues boards, code review, or answering
|
||||
community questions) to HertzBeat.
|
||||
|
||||
- 3+ months with activity and engagement.
|
||||
- 20+ pr coding, document, test or other contributions.
|
||||
|
||||
### Quality of contributions
|
||||
|
||||
- A solid general understanding of the project
|
||||
- Well tested, well-designed, following Apache HertzBeat™ coding
|
||||
standards, and simple patches.
|
||||
- Well-organized and detailed user-oriented documentation.
|
||||
|
||||
### Community involvement
|
||||
|
||||
- Be active, courteous, and respectful on the dev mailing list and
|
||||
help mentor newer contributors
|
||||
and users.
|
||||
- Be active, courteous, and respectful on the issue tracker for
|
||||
project maintenance
|
||||
- Be active, courteous, and respectful for pull requests reviewing
|
||||
- Be involved in the design road map discussions with a professional
|
||||
and diplomatic approach even if there is a disagreement
|
||||
- Promoting the project by writing articles or holding events
|
||||
@@ -0,0 +1,82 @@
|
||||
---
|
||||
id: 'become_pmc_member'
|
||||
title: 'Become A new PMC member'
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
## Become A new PMC member of Apache HertzBeat
|
||||
|
||||
Anyone being supportive of the community and working in any of the
|
||||
CoPDoC areas can become an Apache HertzBeat™ new PMC member. The CoPDoC is an
|
||||
acronym from ASF to describe how we recognize your contributions not
|
||||
only by code.
|
||||
|
||||
- **Community** - You can join us via our mailing list, issue
|
||||
trackers, discussions page to interact with community members, and
|
||||
share vision and knowledge
|
||||
- **Project** - a clear vision and consensus are needed
|
||||
- **Documentation** - without it, the stuff remains only in the minds
|
||||
of the authors
|
||||
- **Code** - discussion goes nowhere without code
|
||||
|
||||
Apache HertzBeat™ community strives to be meritocratic. Thus, once someone
|
||||
has contributed sufficiently to any area of CoPDoC they can be a
|
||||
candidate for new PMC membership and at last voted in as a HertzBeat
|
||||
PMC member. Being an Apache HertzBeat™ new PMC member does not necessarily mean
|
||||
you must commit code with your commit privilege to the codebase; it
|
||||
means you are committed to the HertzBeat project and are productively
|
||||
contributing to our community's success.
|
||||
|
||||
## new PMC member requirements
|
||||
|
||||
There are no strict rules for becoming a committer or new PMC member.
|
||||
Candidates for new PMC member are typically people that are active
|
||||
contributors and community members. Anyway, if the rules can be
|
||||
clarified a little bit, it can somehow clear the doubts in the minds
|
||||
of contributors and make the community more transparent, reasonable,
|
||||
and fair.
|
||||
|
||||
### Continuous contributions
|
||||
|
||||
PMC member candidates should have a decent amount of continuous
|
||||
engagements and contributions (fixing bugs, adding new features,
|
||||
writing documentation, maintaining issues boards, code review, or answering
|
||||
community questions) to HertzBeat.
|
||||
|
||||
- 12+ months with activity and engagement.
|
||||
|
||||
### Quality of contributions
|
||||
|
||||
- A solid general understanding of the project
|
||||
- Well tested, well-designed, following Apache HertzBeat™ coding
|
||||
standards, and simple patches.
|
||||
- Well-organized and detailed user-oriented documentation.
|
||||
|
||||
### Community involvement
|
||||
|
||||
- Be active, courteous, and respectful on the dev mailing list and
|
||||
help mentor newer contributors
|
||||
and users.
|
||||
- Be active, courteous, and respectful on the issue tracker for
|
||||
project maintenance
|
||||
- Be active, courteous, and respectful for pull requests reviewing
|
||||
- Be involved in the design road map discussions with a professional
|
||||
and diplomatic approach even if there is a disagreement
|
||||
- Promoting the project by writing articles or holding events
|
||||
@@ -0,0 +1,648 @@
|
||||
---
|
||||
id: 'code_style_and_quality_guide'
|
||||
title: 'Code style and quality guide'
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
## 1 Pull Requests & Changes Rule
|
||||
|
||||
1. `ISSUE`/`PR`(pull request) driving and naming
|
||||
|
||||
- After creating a new `PR`, you need to associate the existing corresponding `ISSUE` at the Github Development button on the `PR` page (if there is no corresponding ISSUE, it is recommended to create a new corresponding ISSUE).
|
||||
|
||||
- Title naming format
|
||||
`[feature/bugfix/doc/improve/refactor/bug/cleanup] title`
|
||||
|
||||
2. Description
|
||||
|
||||
- Please fill in the `PR` template to describe the contribution. So that the reviewer can understand the problem and solution from the description, rather than just from the code.
|
||||
- Check the CheckList
|
||||
3. It's recommended that `PR` should be arranged changes such as `cleanup`, `Refactor`, `improve`, and `feature` into separated `PRs`/`Commits`.
|
||||
4. Commit message(English, lowercase, no special characters)
|
||||
The commit of messages should follow a pattern similar to the `[feature/bugfix/doc/improve/refactor/bug/cleanup] title`
|
||||
|
||||
## 2 Code Checkstyle
|
||||
|
||||
### 2.1 Configure Checkstyle
|
||||
|
||||
1. Install the Checkstyle-IDEA plugin.
|
||||
2. Open Checkstyle Settings. Click **Settings** → **Tools** → **Checkstyle**.
|
||||
3. Set **Checkstyle version** to **10.14.2**.
|
||||
4. Set **Scan scope** to **Only Java sources (including tests)**.
|
||||
5. Click **+** button in the **Configuration** section to open a dialog to choose the checkstyle config file.
|
||||
1. Enter a **Description**. For example, hertzbeat.
|
||||
2. Select **Use a local checkstyle file**.
|
||||
3. Set **File** to **script/checkstyle/checkstyle.xml**.
|
||||
4. Select **Store relative to project location**.
|
||||
5. Click **Next** → **Next** → **Finish**.
|
||||
6. Activate the configuration you just added by toggling the corresponding box.
|
||||
7. Click **OK**.
|
||||
|
||||
- Backend code specification Maven plugin: `checkstyle`
|
||||
Just run `mvn checkstyle:checkstyle`.
|
||||
|
||||
- Frontend code formatting plugin `eslint`
|
||||
Just run `pnpm run lint:fix` in web-app
|
||||
|
||||
### 2.2 Document style check
|
||||
|
||||
1. Install `markdownlint-cli2` and run `npm install markdownlint-cli2 --global`
|
||||
2. Run `markdownlint-cli2 "home/**/*.md"` in the project to automatically detect the Markdown file format.
|
||||
3. Run `markdownlint-cli2 --fix "home/**/*.md"` in the project to automatically format the Markdown file format to ensure that all documents meet the specifications.
|
||||
|
||||
Error code description:
|
||||
|
||||
| **Error code** | **description** |
|
||||
|--------------------------------------------| ------------------------------------------------------------ |
|
||||
| **MD001 heading-increment** | Heading levels should only increment by one level at a time |
|
||||
| **MD003 heading-style** | Heading style |
|
||||
| **MD004 ul-style** | Unordered list style |
|
||||
| **MD005 list-indent** | Inconsistent indentation for list items at the same level |
|
||||
| **MD007 ul-indent** | Unordered list indentation |
|
||||
| **MD009 no-trailing-spaces** | Trailing spaces |
|
||||
| **MD010 no-hard-tabs** | Hard tabs |
|
||||
| **MD011 no-reversed-links** | Reversed link syntax |
|
||||
| **MD012 no-multiple-blanks** | Multiple consecutive blank lines |
|
||||
| **MD013 line-length** | Line length |
|
||||
| **MD014 commands-show-output** | Dollar signs used before commands without showing output |
|
||||
| **MD018 no-missing-space-atx** | No space after hash on atx style heading |
|
||||
| **MD019 no-multiple-space-atx** | Multiple spaces after hash on atx style heading |
|
||||
| **MD020 no-missing-space-closed-atx** | No space inside hashes on closed atx style heading |
|
||||
| **MD021 no-multiple-space-closed-atx** | Multiple spaces inside hashes on closed atx style heading |
|
||||
| **MD022 blanks-around-headings** | Headings should be surrounded by blank lines |
|
||||
| **MD023 heading-start-left** | Headings must start at the beginning of the line |
|
||||
| **MD024 no-duplicate-heading** | Multiple headings with the same content |
|
||||
| **MD025 single-title/single-h1** | Multiple top-level headings in the same document |
|
||||
| **MD026 no-trailing-punctuation** | Trailing punctuation in heading |
|
||||
| **MD027 no-multiple-space-blockquote** | Multiple spaces after blockquote symbol |
|
||||
| **MD028 no-blanks-blockquote** | Blank line inside blockquote |
|
||||
| **MD029 ol-prefix** | Ordered list item prefix |
|
||||
| **MD030 list-marker-space** | Spaces after list markers |
|
||||
| **MD031 blanks-around-fences** | Fenced code blocks should be surrounded by blank lines |
|
||||
| **MD032 blanks-around-lists** | Lists should be surrounded by blank lines |
|
||||
| **MD033 no-inline-html** | Inline HTML |
|
||||
| **MD034 no-bare-urls** | Bare URL used |
|
||||
| **MD035 hr-style** | Horizontal rule style |
|
||||
| **MD036 no-emphasis-as-heading** | Emphasis used instead of a heading |
|
||||
| **MD037 no-space-in-emphasis** | Spaces inside emphasis markers |
|
||||
| **MD038 no-space-in-code** | Spaces inside code span elements |
|
||||
| **MD039 no-space-in-links** | Spaces inside link text |
|
||||
| **MD040 fenced-code-language** | Fenced code blocks should have a language specified |
|
||||
| **MD041 first-line-heading/first-line-h1** | First line in a file should be a top-level heading |
|
||||
| **MD042 no-empty-links** | No empty links |
|
||||
| **MD043 required-headings** | Required heading structure |
|
||||
| **MD044 proper-names** | Proper names should have the correct capitalization |
|
||||
| **MD045 no-alt-text** | Images should have alternate text (alt text) |
|
||||
| **MD046 code-block-style** | Code block style |
|
||||
| **MD047 single-trailing-newline** | Files should end with a single newline character |
|
||||
| **MD048 code-fence-style** | Code fence style |
|
||||
| **MD049 emphasis-style** | Emphasis style |
|
||||
| **MD050 strong-style** | Strong style |
|
||||
| **MD051 link-fragments** | Link fragments should be valid |
|
||||
| **MD052 reference-links-images** | Reference links and images should use a label that is defined |
|
||||
| **MD053 link-image-reference-definitions** | Link and image reference definitions should be needed |
|
||||
| **MD054 link-image-style** | Link and image style |
|
||||
| **MD055 table-pipe-style** | Table pipe style |
|
||||
| **MD056 table-column-count** | Table column count |
|
||||
|
||||
## 3 Programming Specification
|
||||
|
||||
### 3.1 Naming Style
|
||||
|
||||
1. Prioritize selecting nouns for variable naming, it's easier to distinguish between `variables` or `methods`.
|
||||
|
||||
```java
|
||||
Cache`<String>` publicKeyCache;
|
||||
```
|
||||
|
||||
2. Pinyin abbreviations are prohibited for variables (excluding nouns such as place names), such as chengdu.
|
||||
3. It is recommended to end variable names with a `type`.
|
||||
For variables of type `Collection/List`, take `xxxx` (plural representing multiple elements) or end with `xxxList` (specific type).
|
||||
For variables of type `map`, describe the `key` and `value` clearly:
|
||||
|
||||
```java
|
||||
Map<Long, User> idUserMap;
|
||||
Map<Long, String> userIdNameMap;
|
||||
```
|
||||
|
||||
4. That can intuitively know the type and meaning of the variable through its name.
|
||||
Method names should start with a verb first as follows:
|
||||
|
||||
```java
|
||||
void computeVcores(Object parameter1);
|
||||
```
|
||||
|
||||
> Note: It is not necessary to strictly follow this rule in the `Builder` tool class.
|
||||
|
||||
### 3.2 Constant Variables Definition
|
||||
|
||||
1. Redundant strings should be extracted as constants
|
||||
|
||||
> If a constant has been hardcoded twice or more times, please directly extract it as a constant and change the corresponding reference.
|
||||
> In generally, constants in `log` can be ignored to extract.
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
public static RestResponse success(Object data) {
|
||||
RestResponse resp = new RestResponse();
|
||||
resp.put("status", "success");
|
||||
resp.put("code", ResponseCode.CODE_SUCCESS);
|
||||
resp.put("data", data);
|
||||
return resp;
|
||||
}
|
||||
|
||||
public static RestResponse error() {
|
||||
RestResponse resp = new RestResponse();
|
||||
resp.put("status", "error");
|
||||
resp.put("code", ResponseCode.CODE_FAIL);
|
||||
resp.put("data", null);
|
||||
return resp;
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
> Strings are extracted as constant references.
|
||||
|
||||
```java
|
||||
public static final String STATUS = "status";
|
||||
public static final String CODE = "code";
|
||||
public static final String DATA = "data";
|
||||
|
||||
public static RestResponse success(Object data) {
|
||||
RestResponse resp = new RestResponse();
|
||||
resp.put(STATUS, "success");
|
||||
resp.put(CODE, ResponseCode.CODE_SUCCESS);
|
||||
resp.put(DATA, data);
|
||||
return resp;
|
||||
}
|
||||
|
||||
public static RestResponse error() {
|
||||
RestResponse resp = new RestResponse();
|
||||
resp.put(STATUS, "error");
|
||||
resp.put(CODE, ResponseCode.CODE_FAIL);
|
||||
resp.put(DATA, null);
|
||||
return resp;
|
||||
}
|
||||
```
|
||||
|
||||
2. Ensure code readability and intuitiveness
|
||||
|
||||
- The string in the `annotation` symbol doesn't need to be extracted as constant.
|
||||
|
||||
- The referenced `package` or `resource` name doesn't need to be extracted as constant.
|
||||
|
||||
3. Variables that have not been reassigned must also be declared as `<mark>` final `</mark>` types.
|
||||
|
||||
4. About the arrangement order of `constant/variable` lines
|
||||
|
||||
Sort the variable lines in the class in the order of
|
||||
1. `public static final V`, `static final V`,`protected static final V`, `private static final V`
|
||||
2. `public static v`, `static v`,`protected static v`, `private static v`
|
||||
3. `public v`, `v`, `protected v`, `private v`
|
||||
|
||||
### 3.3 Methods Rule
|
||||
|
||||
1. Sort the methods in the class in the order of `public`, `protected`, `private`
|
||||
|
||||
Static methods of a class can be placed after non-static methods and sorted according to consistent method visibility.
|
||||
|
||||
2. When there are restrictions on the method, the parameters and returned values of the method need to be annotated with `@Nonnull` or `@Nullable` annotations and constraints.
|
||||
|
||||
For example, if the parameter cannot be null, it is best to add a `@Nonnull` annotation. If the returned value can be null, the `@Nullable` annotation should be added first.
|
||||
|
||||
`<mark>` Note: that the package name is `<b>`javax.validation.requirements`</b>` `</mark>`
|
||||
|
||||
3. If there are too many lines of code in the method, please have a try on using multiple sub methods at appropriate points to segment the method body.
|
||||
|
||||
Generally speaking, it needs to adhere to the following principles:
|
||||
- Convenient testing
|
||||
- Good semantics
|
||||
- Easy to read
|
||||
|
||||
In addition, it is also necessary to consider whether the splitting is reasonable in terms of components, logic, abstraction, and other aspects in the scenario.
|
||||
|
||||
> However, there is currently no clear definition of demo. During the evolution process, we will provide additional examples for developers to have a clearer reference and understanding.
|
||||
|
||||
### 3.4 Collection Rule
|
||||
|
||||
1. For `collection` returned values, unless there are special `concurrent` (such as thread safety), always return the `interface`, such as:
|
||||
- returns `<mark>` List `</mark>` if use `ArrayList`
|
||||
- returns `<mark>` Map `</mark>` if use `HashMap`
|
||||
- returns `<mark>` Set `</mark>` if use `HashSet`
|
||||
2. If there are multiple threads, the following declaration or returned types can be used:
|
||||
|
||||
```java
|
||||
private CurrentHashMap map;
|
||||
public CurrentHashMap funName();
|
||||
```
|
||||
|
||||
3. Use `isEmpty()` instead of `length() == 0` or `size() == 0`
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (pathPart.length() == 0) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (pathPart.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
### 3.5 Concurrent Processing
|
||||
|
||||
1. The `thread pool` needs to be managed, using a unified entry point to obtain the `thread pool`.
|
||||
|
||||
`<mark>` Note: During the evolution process, we will provide additional examples for developers to have a clearer reference and understanding. `</mark>`
|
||||
|
||||
2. `Thread pool` needs to be resource constrained to prevent resource leakage caused by improper handling
|
||||
|
||||
### 3.6 Control/Condition Statements
|
||||
|
||||
1. Avoid unreasonable `condition/control` branches order leads to:
|
||||
- Multiple code line `depths` of `n+1`
|
||||
- Redundant lines
|
||||
|
||||
Generally speaking, if a method's code line depth exceeds `2+ Tabs` due to continuous nested `if... else..`, it should be considered to try
|
||||
|
||||
- `merging branches`,
|
||||
- `inverting branch conditions`
|
||||
- `extracting private methods`
|
||||
|
||||
to reduce code line depth and improve readability like follows:
|
||||
|
||||
- Union or merge the logic into the next level calling
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (isInsert) {
|
||||
save(platform);
|
||||
} else {
|
||||
updateById(platform);
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
saveOrUpdate(platform);
|
||||
```
|
||||
|
||||
- Merge the conditions
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (expression1) {
|
||||
if (expression2) {
|
||||
......
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (expression1 && expression2) {
|
||||
......
|
||||
}
|
||||
```
|
||||
|
||||
- Reverse the condition
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
public void doSomething() {
|
||||
// Ignored more deeper block lines
|
||||
// .....
|
||||
if (condition1) {
|
||||
// ...
|
||||
} else {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
public void doSomething() {
|
||||
// Ignored more deeper block lines
|
||||
// .....
|
||||
if (!condition1) {
|
||||
// ...
|
||||
return;
|
||||
}
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
- Using a single variable or method to reduce the complex conditional expression
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (containsSqlServer(dbType)) {
|
||||
// ....
|
||||
}
|
||||
//.....
|
||||
// definition of the containsSqlServer
|
||||
```
|
||||
|
||||
> Using `sonarlint` and `better highlights` to check code depth looks like good in the future.
|
||||
|
||||
### 3.7 Code Comments Rule
|
||||
|
||||
1. Method lacks comments:
|
||||
|
||||
- `When`: When can the method be called
|
||||
- `How`: How to use this method and how to pass parameters, etc.
|
||||
- `What`: What functions does this method achieve
|
||||
- `Note`: What should developers pay attention to when calling this method
|
||||
|
||||
2. Missing necessary class header description comments.
|
||||
|
||||
Add `What`, `Note`, etc. like mentioned in the `1`.
|
||||
|
||||
3. The method declaration in the interface must be annotated.
|
||||
|
||||
- If the semantics of the implementation and the annotation content at the interface declaration are inconsistent, the specific implementation method also needs to be rewritten with annotations.
|
||||
|
||||
- If the semantics of the method implementation are consistent with the annotation content at the interface declaration, it is not recommended to write annotations to avoid duplicate annotations.
|
||||
|
||||
4. The first word in the comment lines need to be capitalized, like `param` lines, `return` lines.
|
||||
If a special reference as a subject does not need to be capitalized, special symbols such as quotation marks need to be noted.
|
||||
|
||||
### 3.8 Java Lambdas
|
||||
|
||||
1. Prefer `non-capturing` lambdas (lambdas that do not contain references to the outer scope).
|
||||
Capturing lambdas need to create a new object instance for every call. `Non-capturing` lambdas can use the same instance for each invocation.
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
map.computeIfAbsent(key, x -> key.toLowerCase())
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
map.computeIfAbsent(key, k -> k.toLowerCase());
|
||||
```
|
||||
|
||||
2. Consider method references instead of inline lambdas
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
map.computeIfAbsent(key, k-> Loader.load(k));
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
map.computeIfAbsent(key, Loader::load);
|
||||
```
|
||||
|
||||
### 3.9 Java Streams
|
||||
|
||||
- Avoid Java Streams in any performance critical code.
|
||||
|
||||
- The main motivation to use Java Streams would be to improve code readability. As such, they can be a good match in parts of the code that are not data-intensive, but deal with coordination.
|
||||
|
||||
- Even in the latter case, try to limit the scope to a method, or a few private methods within an internal class.
|
||||
|
||||
### 3.10 Pre-Conditions Checking
|
||||
|
||||
1. Use a unified `Utils.requireXXX` to complete the validation of the prerequisite, and if possible, replace the `AlertXXException.throwIfXXX` by new pre-conditions checking.
|
||||
|
||||
### 3.11 StringUtils
|
||||
|
||||
1. Use `StringUtils.isBlank` instead of `StringUtils.isEmpty`
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (StringUtils.isEmpty(name)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (StringUtils.isBlank(name)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
2. Use `StringUtils.isNotBlank` instead of `StringUtils.isNotEmpty`
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (StringUtils.isNotEmpty(name)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
3. Use `StringUtils.isAllBlank` instead of `StringUtils.isAllEmpty`
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (StringUtils.isAllEmpty(name, age)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (StringUtils.isAllBlank(name, age)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
### 3.12 `Enum` Class
|
||||
|
||||
1. Enumeration value comparison
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
if (status.equals(JobStatus.RUNNING)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
if (status == JobStatus.RUNNING) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
2. Enumeration classes do not need to implement Serializable
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
public enum JobStatus implements Serializable {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
public enum JobStatus {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
3. Use `Enum.name()` instead of `Enum.toString()`
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
System.out.println(JobStatus.RUNNING.toString());
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
System.out.println(JobStatus.RUNNING.name());
|
||||
```
|
||||
|
||||
4. Enumeration class names uniformly use the Enum suffix
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
public enum JobStatus {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
public enum JobStatusEnum {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### 3.13 `Deprecated` Annotation
|
||||
|
||||
- Negative demo:
|
||||
|
||||
```java
|
||||
@deprecated
|
||||
public void process(String input) {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
```java
|
||||
@Deprecated
|
||||
public void process(String input) {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## 4 Log
|
||||
|
||||
1. Use `placeholders` for log output:
|
||||
|
||||
- Negative demo
|
||||
|
||||
```java
|
||||
log.info("Deploy cluster request " + deployRequest);
|
||||
```
|
||||
|
||||
- Positive demo
|
||||
|
||||
```java
|
||||
log.info("load plugin:{} to {}", file.getName(), appPlugins);
|
||||
```
|
||||
|
||||
2. Pay attention to the selection of `log level` when printing logs
|
||||
|
||||
When printing the log content, if the actual parameters of the log placeholder are passed, it is necessary to avoid premature evaluation to avoid unnecessary evaluation caused by the log level.
|
||||
|
||||
- Negative demo:
|
||||
|
||||
Assuming the current log level is `INFO`:
|
||||
|
||||
```java
|
||||
// ignored declaration lines.
|
||||
List`<User>` userList = getUsersByBatch(1000);
|
||||
LOG.debug("All users: {}", getAllUserIds(userList));
|
||||
```
|
||||
|
||||
- Positive demo:
|
||||
|
||||
In this case, we should determine the log level in advance before making actual log calls as follows:
|
||||
|
||||
```java
|
||||
// ignored declaration lines.
|
||||
List`<User>` userList = getUsersByBatch(1000);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList));
|
||||
}
|
||||
```
|
||||
|
||||
## 5 Testing
|
||||
|
||||
1. It's recommended to use `JUnit5` to develop test case preparation
|
||||
|
||||
2. The implemented interface needs to write the `e2e` test case script under the `e2e` module.
|
||||
|
||||
## References
|
||||
|
||||
- [https://site.mockito.org/](https://site.mockito.org/)
|
||||
- [https://alibaba.github.io/p3c/](https://alibaba.github.io/p3c/)
|
||||
- [https://junit.org/junit5/](https://junit.org/junit5/)
|
||||
- [https://streampark.apache.org/](https://streampark.apache.org/)
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
id: contact
|
||||
title: Join discussion
|
||||
sidebar_label: Discussion
|
||||
---
|
||||
|
||||
> If you need any help or want to exchange suggestions during the use process, you can discuss and exchange through ISSUE or Github Discussion.
|
||||
|
||||
[Join the Mailing Lists](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) : Mail to `dev-subscribe@hertzbeat.apache.org` to subscribe mailing lists.
|
||||
|
||||
[Chat On Discord](https://discord.gg/Fb6M73htGr)
|
||||
|
||||
WeChat Group : Add friend `ahertzbeat` and invite to the group.
|
||||
|
||||
WeChat Official Account : Search ID `usthecom`.
|
||||
|
||||
[Github Discussion](https://github.com/apache/hertzbeat/discussions)
|
||||
|
||||
[Follow Us Twitter](https://x.com/hertzbeat1024)
|
||||
|
||||
[Subscribe YouTube](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow)
|
||||
@@ -0,0 +1,178 @@
|
||||
---
|
||||
id: 'contribution'
|
||||
title: 'Contributor Guide'
|
||||
sidebar_position: 0
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
> We are committed to maintaining a happy community that helps each other, welcome every contributor to join us!
|
||||
|
||||
## Kinds of Contributions
|
||||
>
|
||||
> In the HertzBeat community, there are many ways to contribute:
|
||||
|
||||
- 💻**Code**: Can help the community complete some tasks, write new features or fix some bugs;
|
||||
|
||||
- ⚠️**Test**: Can come to participate in the writing of test code, including unit testing, integration testing, e2e testing;
|
||||
|
||||
- 📖**Docs**: Can write or Documentation improved to help users better understand and use HertzBeat;
|
||||
|
||||
- 📝**Blog**: You can write articles about HertzBeat to help the community better promote;
|
||||
|
||||
- 🤔**Discussion**: You can participate in the discussion of new features of HertzBeat and integrate your ideas with HertzBeat;
|
||||
|
||||
- 💡**Preach**: Can help publicize or promote the HertzBeat community, speak in meetup or summit;
|
||||
|
||||
- 💬**Suggestion**: You can also make some suggestions to the project or community to promote the healthy development of the community;
|
||||
|
||||
More see [Contribution Types](https://allcontributors.org/en/reference/emoji-key/)
|
||||
|
||||
Even small corrections to typos are very welcome :)
|
||||
|
||||
### Getting HertzBeat up and running
|
||||
|
||||
> To get HertzBeat code running on your development tools, and able to debug with breakpoints.
|
||||
> This is a front-end and back-end separation project. To start the local code, the back-end manager and the front-end web-app must be started separately.
|
||||
|
||||
#### Backend start
|
||||
|
||||
1. Requires `maven3+`, `java25` and `lombok` environments
|
||||
2. (Optional) Modify the configuration file: `hertzbeat-startup/src/main/resources/application.yml`
|
||||
3. Execute under the project root directory: `mvn clean install -DskipTests`
|
||||
4. Add VM Options: `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`
|
||||
5. Start `springboot startup` service: `hertzbeat-startup/src/main/java/org/apache/hertzbeat/startup/HertzBeatApplication.java`
|
||||
|
||||
#### Frontend start
|
||||
|
||||
1. Need `Node pnpm` Environment, Make sure `Node.js >= 18`
|
||||
|
||||
2. Cd to the `web-app` directory: `cd web-app`
|
||||
|
||||
3. Install pnpm if not existed `npm install -g pnpm`
|
||||
|
||||
4. Install Dependencies: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app`
|
||||
|
||||
5. After the local backend is started, start the local frontend in the web-app directory: `pnpm start`
|
||||
|
||||
6. Browser access to localhost:4200 to start, default account/password is *admin/hertzbeat*
|
||||
|
||||
### Find tasks
|
||||
|
||||
Find the issue you are interested in! On our GitHub repo issue list, we often publish some issues with the label good first issue or status: volunteer wanted.
|
||||
These issues welcome the help of contributors. Among them, good first issues tend to have low thresholds and are suitable for novices.
|
||||
|
||||
Of course, if you have a good idea, you can also propose it directly on GitHub Discussion or contact with community.
|
||||
|
||||
### Submit Pull Request
|
||||
|
||||
1. First you need to fork your target [hertzbeat repository](https://github.com/apache/hertzbeat).
|
||||
2. Then download the code locally with git command:
|
||||
|
||||
```shell
|
||||
git clone git@github.com:`YOUR_USERNAME`/hertzbeat.git #Recommended
|
||||
```
|
||||
|
||||
3. After the download is complete, please refer to the getting started guide or README file of the target repository to initialize the project.
|
||||
4. Then, you can refer to the following command to submit the code:
|
||||
|
||||
```shell
|
||||
git checkout -b a-feature-branch #Recommended
|
||||
```
|
||||
|
||||
5. Submit the code as a commit, the commit message format specification required: [module name or type name]feature or bugfix or doc: custom message.
|
||||
|
||||
```shell
|
||||
git add <modified file/path>
|
||||
git commit -m '[docs]feature: necessary instructions' #Recommended
|
||||
```
|
||||
|
||||
6. Push to the remote repository
|
||||
|
||||
```shell
|
||||
git push origin a-feature-branch
|
||||
```
|
||||
|
||||
7. Then you can initiate a new PR (Pull Request) on GitHub.
|
||||
|
||||
Please note that the title of the PR needs to conform to our spec, and write the necessary description in the PR to facilitate code review by Committers and other contributors.
|
||||
|
||||
### Wait for the code to be merged
|
||||
|
||||
After submitting the PR, the Committee or the community's friends will review the code you submitted (Code Review), and will propose some modification suggestions or conduct some discussions. Please pay attention to your PR in time.
|
||||
|
||||
If subsequent changes are required, there is no need to initiate a new PR. After submitting a commit on the original branch and pushing it to the remote repository, the PR will be automatically updated.
|
||||
|
||||
In addition, our project has a relatively standardized and strict CI inspection process. After submitting PR, CI will be triggered. Please pay attention to whether it passes the CI inspection.
|
||||
|
||||
Finally, the Committers can merge the PR into the master branch.
|
||||
|
||||
### After the code is merged
|
||||
|
||||
After the code has been merged, you can delete the development branch on both the local and remote repositories:
|
||||
|
||||
```shell
|
||||
git branch -d a-dev-branch
|
||||
git push origin --delete a-dev-branch
|
||||
```
|
||||
|
||||
On the master/main branch, you can do the following to sync the upstream repository:
|
||||
|
||||
```shell
|
||||
git remote add upstream https://github.com/apache/hertzbeat.git #Bind the remote warehouse, if it has been executed, it does not need to be executed again
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
```
|
||||
|
||||
### Get Contributor Certificate
|
||||
|
||||
After your pr is merged, you can send an email `dev@hertzbeat.apache.org` to request your Apache HertzBeat™ contributor electronic certificate.
|
||||
|
||||
```text
|
||||
Title: [Contributor] Request for a Contributor Certificate: <Your Full Name>
|
||||
Body:
|
||||
Hello,
|
||||
I would like to request a Contributor Certificate for my contributions to the Apache HertzBeat™ project.
|
||||
|
||||
- Full Name: <Your Full Name> # The Full Name will be printed on the certificate, any name you want.
|
||||
- GitHub Username: <Your GitHub Username>
|
||||
- Pull Request Links: <List the URLs of the pull requests you have submitted>
|
||||
- Email Address: <Your Email Address>
|
||||
|
||||
Best regards,
|
||||
<Your Name>
|
||||
```
|
||||
|
||||
You will receive a reply with an electronic certificate within a few working days, and your name will also appear in the list of contributors.
|
||||
Attention contributor certificates are electronic, and certificates for you to become a `Committer` or `PMC` are physical.
|
||||
|
||||
Certificate Sample:
|
||||
|
||||

|
||||
|
||||
### HertzBeat Improvement Proposal (HIP)
|
||||
|
||||
If you have major new features(e.g., support metrics push gateway, support logs monitoring), you need to write a design document known as a HertzBeat Improvement Proposal (HIP). Before starting to write a HIP, make sure you follow the process [guide](https://github.com/apache/hertzbeat/tree/master/hip).
|
||||
|
||||
### How to become a Committer?
|
||||
|
||||
With the above steps, you are a contributor to HertzBeat. Repeat the previous steps to stay active in the community, keep at, you can become a Committer!
|
||||
|
||||
### Join Discussion
|
||||
|
||||
[Discussion](contact)
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
id: development
|
||||
title: How to Run or Build HertzBeat?
|
||||
sidebar_label: Development
|
||||
---
|
||||
|
||||
## Getting HertzBeat code up and running
|
||||
|
||||
> To get HertzBeat code running on your development tools, and able to debug with breakpoints.
|
||||
> This is a front-end and back-end separation project.
|
||||
> To start the local code, the back-end [manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager) and the front-end [web-app](https://github.com/apache/hertzbeat/tree/master/web-app) must be started separately.
|
||||
|
||||
### Backend start
|
||||
|
||||
1. Requires `maven3+`, `java25` and `lombok` environments
|
||||
2. (Optional) Modify the configuration file: `hertzbeat-startup/src/main/resources/application.yml`
|
||||
3. Execute under the project root directory: `mvn clean install -DskipTests`
|
||||
4. Add VM Options: `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`
|
||||
5. Start `springboot startup` service: `hertzbeat-startup/src/main/java/org/apache/hertzbeat/startup/HertzBeatApplication.java`
|
||||
|
||||
### Frontend start
|
||||
|
||||
1. Need `Node pnpm` Environment, Make sure `Node.js >= 18`
|
||||
|
||||
2. Cd to the `web-app` directory: `cd web-app`
|
||||
|
||||
3. Install pnpm if not existed `npm install -g pnpm`
|
||||
|
||||
4. Install Dependencies: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app`
|
||||
|
||||
5. After the local backend is started, start the local frontend in the web-app directory: `pnpm start`
|
||||
|
||||
6. Browser access to localhost:4200 to start, default account/password is *admin/hertzbeat*
|
||||
|
||||
## Build HertzBeat binary package
|
||||
|
||||
> Requires `maven3+`, `java25`, `node` and `pnpm` environments.
|
||||
|
||||
### Frontend build
|
||||
|
||||
1. Need `Node pnpm` Environment, Make sure `Node.js >= 18`
|
||||
|
||||
2. Cd to the `web-app` directory: `cd web-app`
|
||||
|
||||
3. Install pnpm if not existed `npm install -g pnpm`
|
||||
|
||||
4. Install Dependencies: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app`
|
||||
|
||||
5. Build web-app: `pnpm package`
|
||||
|
||||
### Backend build
|
||||
|
||||
1. Requires `maven3+`, `java25` environments
|
||||
|
||||
2. Execute under the project root directory: `mvn clean package -Prelease`
|
||||
|
||||
The HertzBeat install package will be generated at `dist/apache-hertzbeat-{version}-bin.tar.gz`
|
||||
|
||||
### Collector build
|
||||
|
||||
1. Requires `maven3+`, `java25` environments
|
||||
|
||||
2. Execute under the project root directory: `mvn clean install`
|
||||
|
||||
3. Cd to the `hertzbeat-collector` directory: `cd hertzbeat-collector`
|
||||
|
||||
4. Build the JVM collector package under `hertzbeat-collector` directory: `mvn clean package -Pcluster`
|
||||
5. Build the native collector package under `hertzbeat-collector` directory: `mvn clean package -pl hertzbeat-collector-collector -am -Pnative`
|
||||
|
||||
> Native collector packaging requires GraalVM for JDK 25 with the `native-image` tool available in `PATH`.
|
||||
|
||||
The HertzBeat collector packages will be generated at `dist/apache-hertzbeat-collector-{version}-bin.tar.gz` and a platform-specific native package such as `dist/apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz`
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
id: 'document'
|
||||
title: 'Documentation Notice'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
Good documentation is critical for any type of software. Any contribution that can improve the HertzBeat documentation is welcome.
|
||||
|
||||
## Get the document project
|
||||
|
||||
Documentation for the HertzBeat project is maintained in [git repository home directory](https://github.com/apache/hertzbeat/tree/master/home).
|
||||
|
||||
First you need to fork the document project into your own github repository, and then clone the document to your local computer.
|
||||
|
||||
```shell
|
||||
git clone git@github.com:<your-github-user-name>/hertzbeat.git
|
||||
```
|
||||
|
||||
## Preview and generate static files
|
||||
|
||||
This website is compiled using node, using Docusaurus framework components
|
||||
|
||||
1. Download and install nodejs (version 18.8.0)
|
||||
2. Clone the code to the local `git clone git@github.com:apache/hertzbeat.git`
|
||||
3. In `home` directory run `pnpm install` to install the required dependent libraries.
|
||||
4. In `home` directory run `pnpm start`, you can visit [http://localhost:3000](http://localhost:3000) to view the English mode preview of the site
|
||||
5. In `home` directory run `pnpm start-zh-cn`, you can visit [http://localhost:3000](http://localhost:3000) to view the Chinese mode preview of the site
|
||||
6. To generate static website resource files, run `pnpm build`. The static resources of the build are in the build directory.
|
||||
|
||||
## Document Format Inspection
|
||||
|
||||
In Apache HertzBeat, all MD articles have to pass MD's [CI](https://github.com/apache/hertzbeat/blob/master/.github/workflows/doc-build-test.yml) inspection before they can be merged. The purpose is to keep the website looking nice and the formatting of the articles consistent.
|
||||
|
||||
After you have written an MD article, you can execute the following command locally to check whether the content of the MD article meets the requirements, so as to reduce the workload of review and save your time:
|
||||
|
||||
```shell
|
||||
cd home && pnpm install
|
||||
|
||||
pnpm md-lint
|
||||
|
||||
# If the documentation is wrong, you can use pnpm md-lint-fix to fix it.
|
||||
pnpm md-lint-fix
|
||||
```
|
||||
|
||||
For formatting rules for MD articles you can refer to: [Markdown-lint-rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md)
|
||||
MD format configuration file in the project: [.markdownlint-cli2.jsonc](https://github.com/apache/hertzbeat/blob/master/.markdownlint-cli2.jsonc)
|
||||
|
||||
## Directory structure
|
||||
|
||||
```html
|
||||
|-- docs
|
||||
|-- blog
|
||||
|-- i18n
|
||||
| `-- zh-CN // internationalized chinese
|
||||
| |-- code.json
|
||||
| |-- docusaurus-plugin-content-blog
|
||||
| |-- docusaurus-plugin-content-docs
|
||||
| `-- docusaurus-theme-classic
|
||||
|-- resource // static resource file
|
||||
|-- src
|
||||
| |-- theme
|
||||
| |-- css
|
||||
| |-- js
|
||||
| |-- pages
|
||||
| | |-- components
|
||||
| | |-- index.js
|
||||
| |-- constants.js
|
||||
|-- static // picture static resource
|
||||
| |-- img //
|
||||
| | |-- blog // blog picture
|
||||
| | |-- docs // document picture
|
||||
| | |-- home // product picture
|
||||
| | |-- icons // icon
|
||||
|-- docusaurus.config.js
|
||||
|-- sidebars.js // document sidebar menu configuration
|
||||
```
|
||||
|
||||
## Specification
|
||||
|
||||
### Naming convention of files
|
||||
|
||||
Consist entirely of lowercase letters, numbers, underscores, and dashes.
|
||||
|
||||
Positive example: `render-dom.js / signup.css / index.html / company-logo.png / hertz_beat.md`
|
||||
|
||||
Counter example: `renderDom.js / UserManagement.html`
|
||||
|
||||
### Resource Path
|
||||
|
||||
Image resources are unified under `static/img/{module name}`
|
||||
|
||||
css and other style files are placed in the `src/css` directory
|
||||
|
||||
### Page content modification
|
||||
|
||||
> All pages doc can be directly jumped to the corresponding github resource modification page through the 'Edit this page' button at the bottom
|
||||
@@ -0,0 +1,537 @@
|
||||
---
|
||||
id: 'how_to_release'
|
||||
title: How to Release
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
This tutorial describes in detail how to release Apache HertzBeat™, take the release of version 1.7.3 as an example.
|
||||
|
||||
## 1. Environmental requirements
|
||||
|
||||
This release process is operated in the UbuntuOS(Windows,Mac), and the following tools are required:
|
||||
|
||||
- JDK 25
|
||||
- Node18 pnpm
|
||||
- Apache Maven 3.x
|
||||
- GnuPG 2.x
|
||||
- Git
|
||||
- SVN (apache uses svn to host project releases)
|
||||
|
||||
> Pay attention to setting environment variables `export GPG_TTY=$(tty)`
|
||||
|
||||
## 2. Preparing for release
|
||||
|
||||
> First summarize the account information to better understand the operation process, will be used many times later.
|
||||
>
|
||||
> - apache id: `muchunjin (APACHE LDAP UserName)`
|
||||
> - apache passphrase: `APACHE LDAP Passphrase`
|
||||
> - apache email: `muchunjin@apache.org`
|
||||
> - gpg real name: `muchunjin (Any name can be used, here I set it to the same name as the apache id)`
|
||||
> - gpg key passphrase: `The password set when creating the gpg key, you need to remember this password`
|
||||
|
||||
### 2.1 Key generation
|
||||
|
||||
```shell
|
||||
$ gpg --full-gen-key
|
||||
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
Please select what kind of key you want:
|
||||
(1) RSA and RSA (default)
|
||||
(2) DSA and Elgamal
|
||||
(3) DSA (sign only)
|
||||
(4) RSA (sign only)
|
||||
(14) Existing key from card
|
||||
Your selection? 1 # Please enter 1
|
||||
RSA keys may be between 1024 and 4096 bits long.
|
||||
What keysize do you want? (3072) 4096 # Please enter 4096 here
|
||||
Requested keysize is 4096 bits
|
||||
Please specify how long the key should be valid.
|
||||
0 = key does not expire
|
||||
`<n>` = key expires in n days
|
||||
`<n>`w = key expires in n weeks
|
||||
`<n>`m = key expires in n months
|
||||
`<n>`y = key expires in n years
|
||||
Key is valid for? (0) 0 # Please enter 0
|
||||
Key does not expire at all
|
||||
Is this correct? (y/N) y # Please enter y here
|
||||
|
||||
GnuPG needs to construct a user ID to identify your key.
|
||||
|
||||
Real name: muchunjin # Please enter 'gpg real name'
|
||||
Email address: muchunjin@apache.org # Please enter your apache email address here
|
||||
Comment: apache key # Please enter some comments here
|
||||
You selected this USER-ID:
|
||||
"muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)"
|
||||
|
||||
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O # Please enter O here
|
||||
We need to generate a lot of random bytes. It is a good idea to perform
|
||||
some other action (type on the keyboard, move the mouse, utilize the
|
||||
disks) during the prime generation; this gives the random number
|
||||
generator a better chance to gain enough entropy.
|
||||
|
||||
# At this time, a dialog box will pop up, asking you to enter the key for this gpg.
|
||||
# you need to remember that it will be used in subsequent steps.
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ Please enter this passphrase to │
|
||||
│ protect your new key │
|
||||
│ │
|
||||
│ Passphrase: _______________________________________ │
|
||||
│ │
|
||||
│ `<OK>` `<Cancel>` │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
|
||||
# Here you need to re-enter the password in the previous step.
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ Please re-enter this passphrase │
|
||||
│ │
|
||||
│ Passphrase: _______________________________________ │
|
||||
│ │
|
||||
│ `<OK>` `<Cancel>` │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
gpg: key ACFB69E705016886 marked as ultimately trusted
|
||||
gpg: revocation certificate stored as '/root/.gnupg/openpgp-revocs.d/DC12398CCC33A5349EB9663DF9D970AB18C9EDF6.rev'
|
||||
public and secret key created and signed.
|
||||
|
||||
pub rsa4096 2023-05-01 [SC]
|
||||
85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
uid muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)
|
||||
sub rsa4096 2023-05-01 [E]
|
||||
```
|
||||
|
||||
Keys can be viewed through the `gpg --list-signatures` command
|
||||
|
||||
### 2.2 Upload the generated key to the public server
|
||||
|
||||
```shell
|
||||
$ gpg --keyid-format SHORT --list-keys
|
||||
/root/.gnupg/pubring.kbx
|
||||
------------------------
|
||||
pub rsa4096/05016886 2023-05-01 [SC]
|
||||
85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
uid [ultimate] muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)
|
||||
sub rsa4096/0C5A4E1C 2023-05-01 [E]
|
||||
|
||||
# Send public key to keyserver via key id
|
||||
$ gpg --keyserver keyserver.ubuntu.com --send-key 05016886
|
||||
# Among them, keyserver.ubuntu.com is the selected keyserver, it is recommended to use this, because the Apache Nexus verification uses this keyserver
|
||||
```
|
||||
|
||||
#### 2.3 Check if the key is created successfully
|
||||
|
||||
Verify whether it is synchronized to the public network, it will take about a minute to find out the answer, if not successful, you can upload and retry multiple times.
|
||||
|
||||
```shell
|
||||
$ gpg --keyserver keyserver.ubuntu.com --recv-keys 05016886 # If the following content appears, it means success
|
||||
gpg: key ACFB69E705016886: "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" not changed
|
||||
gpg: Total number processed: 1
|
||||
gpg: unchanged: 1
|
||||
```
|
||||
|
||||
Or enter [https://keyserver.ubuntu.com/](https://keyserver.ubuntu.com/) address in the browser, enter the name of the key and click 'Search key' to search if existed.
|
||||
|
||||
#### 2.4 Add the gpg public key to the KEYS file of the Apache SVN project repo
|
||||
|
||||
- Apache HertzBeat™ Branch Dev [https://dist.apache.org/repos/dist/dev/hertzbeat](https://dist.apache.org/repos/dist/dev/hertzbeat)
|
||||
- Apache HertzBeat™ Branch Release [https://dist.apache.org/repos/dist/release/hertzbeat](https://dist.apache.org/repos/dist/release/hertzbeat)
|
||||
|
||||
##### 2.4.1 Add public key to KEYS in dev branch
|
||||
|
||||
```shell
|
||||
$ mkdir -p svn/dev
|
||||
$ cd svn/dev
|
||||
|
||||
$ svn co https://dist.apache.org/repos/dist/dev/hertzbeat
|
||||
$ cd svn/dev/hertzbeat
|
||||
|
||||
# Append the KEY you generated to the file KEYS, and check if it is added correctly
|
||||
$ (gpg --list-sigs muchunjin@apache.org && gpg --export --armor muchunjin@apache.org) >> KEYS
|
||||
|
||||
$ svn ci -m "add gpg key for muchunjin"
|
||||
```
|
||||
|
||||
##### 2.4.2 Add public key to KEYS in release branch
|
||||
|
||||
```shell
|
||||
$ mkdir -p svn/release
|
||||
$ cd svn/release
|
||||
|
||||
$ svn co https://dist.apache.org/repos/dist/release/hertzbeat
|
||||
$ cd svn/release/hertzbeat
|
||||
|
||||
# Append the KEY you generated to the file KEYS, and check if it is added correctly
|
||||
$ (gpg --list-sigs muchunjin@apache.org && gpg --export --armor muchunjin@apache.org) >> KEYS
|
||||
|
||||
$ svn ci -m "add gpg key for muchunjin"
|
||||
```
|
||||
|
||||
## 3. Prepare material package & release
|
||||
|
||||
### Build Package
|
||||
|
||||
#### 3.1 Based on the master branch, create a release-`release_version`-rcx branch, such as release-1.7.3-rc1, And create a tag named v1.7.3-rc1 based on the release-1.7.3-rc1 branch, and set this tag as pre-release
|
||||
|
||||
```shell
|
||||
git checkout master
|
||||
git checkout -b release-1.7.3-rc1
|
||||
```
|
||||
|
||||
#### 3.2 checkout release branch to local
|
||||
|
||||
```shell
|
||||
git checkout release-1.7.3-rc1
|
||||
```
|
||||
|
||||
#### 3.3 Compile the binary package
|
||||
|
||||
> Build HertzBeat server binary, run script in `web-app`
|
||||
|
||||
```shell
|
||||
pnpm install
|
||||
|
||||
pnpm package
|
||||
```
|
||||
|
||||
> run script in root
|
||||
|
||||
```shell
|
||||
mvn clean package -Prelease
|
||||
```
|
||||
|
||||
then
|
||||
|
||||
```shell
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
> Build HertzBeat collector binary, run script in `collector`
|
||||
|
||||
```shell
|
||||
mvn clean package -Pcluster
|
||||
```
|
||||
|
||||
> Build the native collector binary for the current host with GraalVM JDK 25 and `native-image`
|
||||
|
||||
```shell
|
||||
mvn clean package -pl hertzbeat-collector-collector -am -Pnative
|
||||
```
|
||||
|
||||
> The repository workflow `.github/workflows/collector-native-build.yml` is a release helper, not a regular PR or push CI workflow.
|
||||
>
|
||||
> It is intentionally manual-only because multi-platform native builds are relatively slow and consume scarce Linux ARM, macOS, and Windows runners. During release preparation, open the Actions page, select `Collector Native Release`, run it from the release branch or tag, and then download the uploaded artifacts for signing and publishing.
|
||||
|
||||
The release package are here:
|
||||
|
||||
- `dist/apache-hertzbeat-{version}-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-{version}-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-native-{version}-macos-amd64-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-native-{version}-macos-arm64-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip`
|
||||
- `dist/apache-hertzbeat-{version}-docker-compose.tar.gz`
|
||||
|
||||
#### 3.4 Package the source code
|
||||
|
||||
> Package the project source code
|
||||
|
||||
```shell
|
||||
git archive \
|
||||
--format=tar.gz \
|
||||
--output="dist/apache-hertzbeat-1.7.3-src.tar.gz" \
|
||||
--prefix=apache-hertzbeat-1.7.3-src/ \
|
||||
release-1.7.3-rc1
|
||||
```
|
||||
|
||||
The archive package is here `dist/apache-hertzbeat-1.7.3-src.tar.gz`
|
||||
|
||||
### Sign package
|
||||
|
||||
#### 3.5 Sign binary and source packages
|
||||
|
||||
> The `gpg -u 33545C76` `33545C76` is your gpg secret ID, see from `gpg --keyid-format SHORT --list-keys`
|
||||
|
||||
```shell
|
||||
cd dist
|
||||
|
||||
# sign
|
||||
for i in *.tar.gz; do echo $i; gpg -u 33545C76 --armor --output $i.asc --detach-sig $i ; done
|
||||
|
||||
# SHA512
|
||||
for i in *.tar.gz; do echo $i; sha512sum $i > $i.sha512 ; done
|
||||
|
||||
# if macos sha512sum not found, you can install by brew install coreutils
|
||||
```
|
||||
|
||||
> The final file list is as follows
|
||||
|
||||
```text
|
||||
apache-hertzbeat-1.7.3-src.tar.gz
|
||||
apache-hertzbeat-1.7.3-src.tar.gz.asc
|
||||
apache-hertzbeat-1.7.3-src.tar.gz.sha512
|
||||
apache-hertzbeat-1.7.3-bin.tar.gz
|
||||
apache-hertzbeat-1.7.3-bin.tar.gz.asc
|
||||
apache-hertzbeat-1.7.3-bin.tar.gz.sha512
|
||||
apache-hertzbeat-1.7.3-docker-compose.tar.gz
|
||||
apache-hertzbeat-1.7.3-docker-compose.tar.gz.asc
|
||||
apache-hertzbeat-1.7.3-docker-compose.tar.gz.sha512
|
||||
apache-hertzbeat-collector-1.7.3-bin.tar.gz
|
||||
apache-hertzbeat-collector-1.7.3-bin.tar.gz.asc
|
||||
apache-hertzbeat-collector-1.7.3-bin.tar.gz.sha512
|
||||
```
|
||||
|
||||
#### 3.6 Verify signature
|
||||
|
||||
```shell
|
||||
$ cd dist
|
||||
|
||||
# Verify signature
|
||||
$ for i in *.tar.gz; do echo $i; gpg --verify $i.asc $i ; done
|
||||
|
||||
apache-hertzbeat-1.7.3-bin.tar.gz
|
||||
gpg: Signature made Tue May 2 12:16:35 2023 CST
|
||||
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate]
|
||||
apache-hertzbeat-1.7.3-docker-compose.tar.gz
|
||||
gpg: Signature made Tue May 2 12:16:36 2023 CST
|
||||
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate]
|
||||
apache-hertzbeat-1.7.3-src.tar.gz
|
||||
gpg: Signature made Tue May 2 12:16:37 2023 CST
|
||||
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate]
|
||||
apache-hertzbeat-collector-1.7.3-bin.tar.gz
|
||||
gpg: Signature made Tue May 2 12:16:37 2023 CST
|
||||
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate]
|
||||
|
||||
# Verify SHA512
|
||||
$ for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done
|
||||
|
||||
apache-hertzbeat-1.7.3-src.tar.gz
|
||||
apache-hertzbeat-1.7.3-src.tar.gz: OK
|
||||
apache-hertzbeat-1.7.3-bin.tar.gz
|
||||
apache-hertzbeat-1.7.3-bin.tar.gz: OK
|
||||
apache-hertzbeat-1.7.3-docker-compose.tar.gz
|
||||
apache-hertzbeat-1.7.3-docker-compose.tar.gz: OK
|
||||
apache-hertzbeat-collector-1.7.3-bin.tar.gz
|
||||
apache-hertzbeat-collector-1.7.3-bin.tar.gz: OK
|
||||
```
|
||||
|
||||
#### 3.7 Publish the dev directory of the Apache SVN material package
|
||||
|
||||
- Clone the dev directory
|
||||
|
||||
```shell
|
||||
# Check out the dev directory of the Apache SVN to the svn/dev directory under dist in the root directory of the Apache HertzBeat™ project
|
||||
svn co https://dist.apache.org/repos/dist/dev/hertzbeat svn/dev
|
||||
|
||||
svn co --depth empty https://dist.apache.org/repos/dist/dev/hertzbeat
|
||||
```
|
||||
|
||||
- Copy the material package to the dev directory
|
||||
|
||||
Create a version number directory and name it in the form of `release_version`-`RC_version`. RC_version starts from 1, that is, the candidate version starts from RC1. During the release process, there is a problem that causes the vote to fail.
|
||||
If it needs to be corrected, it needs to iterate the RC version , the RC version number needs to be +1. For example: Vote for version 1.7.3-RC1. If the vote passes without any problems, the RC1 version material will be released as the final version material.
|
||||
If there is a problem (when the hertzbeat/incubator community votes, the voters will strictly check various release requirements and compliance issues) and need to be corrected, then re-initiate the vote after the correction, and the candidate version for the next vote is 1.7.3- RC2.
|
||||
|
||||
```shell
|
||||
mkdir -p svn/dev/1.7.3-RC1
|
||||
cp -f dist/* svn/dev/1.7.3-RC1
|
||||
```
|
||||
|
||||
- Commit to SVN
|
||||
|
||||
```shell
|
||||
cd svn/dev
|
||||
|
||||
# 1.check svn status
|
||||
svn status
|
||||
|
||||
# 2. add to svn
|
||||
svn add 1.7.3-RC1
|
||||
|
||||
svn status
|
||||
|
||||
# 3. Submit to svn remote server
|
||||
svn commit -m "release for HertzBeat 1.7.3"
|
||||
```
|
||||
|
||||
- Check Apache SVN Commit Results
|
||||
|
||||
> Visit the address [https://dist.apache.org/repos/dist/dev/hertzbeat/](https://dist.apache.org/repos/dist/dev/hertzbeat/) in the browser, check if existed the new material package
|
||||
|
||||
## 4. Enter the community voting stage
|
||||
|
||||
### 4.1 Send a Community Vote Email
|
||||
|
||||
Send a voting email in the community requires at least three `+1` and no `-1`.
|
||||
|
||||
> `Send to`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) <br />
|
||||
> `Title`: [VOTE] Release Apache HertzBeat™ 1.7.3 rc1 <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Hello HertzBeat Community:
|
||||
|
||||
This is a call for vote to release Apache HertzBeat™ version release-1.7.3-RC1.
|
||||
|
||||
Apache HertzBeat™ - A real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
|
||||
Release notes:
|
||||
https://github.com/apache/hertzbeat/releases/tag/v1.7.3-rc1
|
||||
|
||||
The release candidates:
|
||||
https://dist.apache.org/repos/dist/dev/hertzbeat/1.7.3-RC1/
|
||||
|
||||
Git tag for the release:
|
||||
https://github.com/apache/hertzbeat/releases/tag/v1.7.3-rc1
|
||||
|
||||
The artifacts signed with PGP key [33545C76], corresponding to [muchunjin@apache.org], that can be found in keys file:
|
||||
https://downloads.apache.org/hertzbeat/KEYS
|
||||
|
||||
The vote will be open for at least 72 hours or until the necessary number of votes are reached.
|
||||
|
||||
Please vote accordingly:
|
||||
|
||||
[ ] +1 approve
|
||||
[ ] +0 no opinion
|
||||
[ ] -1 disapprove with the reason
|
||||
|
||||
*Valid check is a requirement for a vote. *Checklist for reference:
|
||||
|
||||
[ ] Download HertzBeat are valid.
|
||||
[ ] Checksums and PGP signatures are valid.
|
||||
[ ] Source code distributions have correct names matching the current
|
||||
release.
|
||||
[ ] LICENSE and NOTICE files are correct for each HertzBeat repo.
|
||||
[ ] All files have license headers if necessary.
|
||||
[ ] No compiled archives bundled in source archive.
|
||||
[ ] Can compile from source.
|
||||
|
||||
Steps to validate the release,Please refer to:
|
||||
https://hertzbeat.apache.org/docs/community/how_to_verify_release
|
||||
|
||||
How to Build:
|
||||
https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package
|
||||
|
||||
Thanks!
|
||||
```
|
||||
|
||||
After 72 hours, the voting results will be counted, and the voting result email will be sent, as follows.
|
||||
|
||||
> `Send to`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) <br />
|
||||
> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat™ 1.7.3-rc1 <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Dear HertzBeat community,
|
||||
|
||||
Thanks for your review and vote for "Release Apache HertzBeat™ 1.7.3-rc1"
|
||||
I'm happy to announce the vote has passed:
|
||||
---
|
||||
4 binding +1, from:
|
||||
|
||||
- cc
|
||||
|
||||
1 non-binding +1, from:
|
||||
|
||||
- Roc Marshal
|
||||
---
|
||||
no 0 or -1 votes.
|
||||
|
||||
Vote thread:
|
||||
https://lists.apache.org/thread/t01b2lbtqzyt7j4dsbdp5qjc3gngjsdq
|
||||
---
|
||||
Thank you to everyone who helped us to verify and vote for this release. We will move to the ASF Incubator voting shortly.
|
||||
---
|
||||
Best,
|
||||
ChunJin Mu
|
||||
```
|
||||
|
||||
One item of the email content is `Vote thread`, and the link is obtained here: [https://lists.apache.org/list.html?dev@hertzbeat.apache.org](https://lists.apache.org/list.html?dev@hertzbeat.apache.org)
|
||||
|
||||
## 4. Complete the final publishing steps
|
||||
|
||||
### 4.1 Migrating source and binary packages
|
||||
|
||||
```shell
|
||||
svn mv https://dist.apache.org/repos/dist/dev/hertzbeat/1.7.3-RC1 https://dist.apache.org/repos/dist/release/hertzbeat/1.7.3 -m "transfer packages for 1.7.3-RC1"
|
||||
```
|
||||
|
||||
#### 4.2 Add the new version download address to the official website
|
||||
|
||||
[https://github.com/apache/hertzbeat/blob/master/home/docs/download.md](https://github.com/apache/hertzbeat/blob/master/home/docs/download.md)
|
||||
[https://github.com/apache/hertzbeat/blob/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/download.md](https://github.com/apache/hertzbeat/blob/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/download.md)
|
||||
|
||||
Open the official website address [https://hertzbeat.apache.org/docs/download/](https://hertzbeat.apache.org/docs/download/) to see if there is a new version of the download
|
||||
|
||||
> It should be noted that the download link may take effect after an hour, so please pay attention to it.
|
||||
|
||||
#### 4.3 Generate a release on github
|
||||
|
||||
Update pre-release to create a tag named v1.7.3 based on the release-1.7.3-rc1 branch, and set this tag to latest release.
|
||||
|
||||
:::tip
|
||||
You can modify it on the original RC Release without creating a new Release.
|
||||
:::
|
||||
|
||||
Then enter Release Title and Describe
|
||||
|
||||
- Release Title:
|
||||
|
||||
```text
|
||||
v1.7.3
|
||||
```
|
||||
|
||||
- Describe:
|
||||
|
||||
```text
|
||||
xxx
|
||||
release note: xxx
|
||||
```
|
||||
|
||||
Then click the `Publish release` button.
|
||||
|
||||
The rename the release-1.7.3-rc1 branch to release-1.7.3.
|
||||
|
||||
#### 4.5 Send new version announcement email
|
||||
|
||||
> `Send to`: [announce@apache.org](mailto:announce@apache.org) <br />
|
||||
> `cc`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) <br />
|
||||
> `Title`: [ANNOUNCE] Apache HertzBeat™ 1.7.3 released <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Hi Community,
|
||||
|
||||
We are glad to announce the release of Apache HertzBeat™ 1.7.3.
|
||||
Thanks again for your help.
|
||||
|
||||
Apache HertzBeat™ (https://hertzbeat.apache.org/) - A real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
|
||||
Download Link:
|
||||
https://hertzbeat.apache.org/docs/download/
|
||||
|
||||
Release Note:
|
||||
https://github.com/apache/hertzbeat/releases/tag/v1.7.3
|
||||
|
||||
Website:
|
||||
https://hertzbeat.apache.org/
|
||||
|
||||
HertzBeat Resources:
|
||||
- Issue: https://github.com/apache/hertzbeat/issues
|
||||
- Mailing list: dev@hertzbeat.apache.org
|
||||
---
|
||||
Apache HertzBeat™ Team
|
||||
---
|
||||
Best,
|
||||
ChunJin Mu
|
||||
```
|
||||
|
||||
This version release is over.
|
||||
|
||||
---
|
||||
|
||||
This doc refer from [Apache StreamPark](https://streampark.apache.org/)
|
||||
@@ -0,0 +1,185 @@
|
||||
---
|
||||
id: how_to_verify_release
|
||||
title: How to Verify Release
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
## Verify the candidate version
|
||||
|
||||
For detailed check list, please refer to the official [check list](https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist)
|
||||
|
||||
Version content accessible in browser [https://dist.apache.org/repos/dist/dev/hertzbeat/](https://dist.apache.org/repos/dist/dev/hertzbeat/)
|
||||
|
||||
### 1. Download the candidate version
|
||||
|
||||
Download the candidate version to be released to the local environment Need to rely on gpg tool, if not, it is recommended to install `gpg2`.
|
||||
|
||||
:::caution
|
||||
|
||||
If the network is poor, downloading may be time-consuming. The download is completed normally in about 20 minutes, please wait patiently.
|
||||
|
||||
:::
|
||||
|
||||
```shell
|
||||
#If there is svn locally, you can clone to the local
|
||||
$ svn co https://dist.apache.org/repos/dist/dev/hertzbeat/`release_version`-`rc_version`/
|
||||
#or download the material file directly
|
||||
$ wget https://dist.apache.org/repos/dist/dev/hertzbeat/`release_version`-`rc_version`/xxx.xxx
|
||||
```
|
||||
|
||||
### 2. Verify that the uploaded version is compliant
|
||||
|
||||
Start the verification process, which includes but is not limited to the following content and forms.
|
||||
|
||||
#### 2.1 Check whether the release package is complete
|
||||
|
||||
The package uploaded to dist must include the source code package, and the binary package is optional.
|
||||
|
||||
1. Whether to include the source code package
|
||||
2. Whether to include the signature of the source code package
|
||||
3. Whether to include the sha512 of the source code package
|
||||
4. If the binary package is uploaded, also check the contents listed in (2)-(4)
|
||||
|
||||
#### 2.2 Check gpg signature
|
||||
|
||||
First import the publisher's public key. Import KEYS from the svn repository to the local environment. (The person who releases the version does not need to import it again, the person who helps to do the verification needs to import it, and the user name is enough for the person who issued the version)
|
||||
|
||||
##### 2.2.1 Import public key
|
||||
|
||||
```shell
|
||||
-curl https://downloads.apache.org/hertzbeat/KEYS > KEYS # Download KEYS
|
||||
gpg --import KEYS # Import KEYS to local
|
||||
```
|
||||
|
||||
##### 2.2.2 Trust the public key
|
||||
|
||||
Trust the KEY used in this version:
|
||||
|
||||
```shell
|
||||
$ gpg --edit-key xxxxxxxxxx #KEY user used in this version
|
||||
gpg (GnuPG) 2.2.21; Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
Secret key is available.
|
||||
gpg> trust #trust
|
||||
Please decide how far you trust this user to correctly verify other users' keys
|
||||
(by looking at passports, checking fingerprints from different sources, etc.)
|
||||
|
||||
1 = I don't know or won't say
|
||||
2 = I do NOT trust
|
||||
3 = I trust marginally
|
||||
4 = I trust fully
|
||||
5 = I trust ultimately
|
||||
m = back to the main menu
|
||||
|
||||
Your decision? 5 #choose 5
|
||||
Do you really want to set this key to ultimate trust? (y/N) y #choose y
|
||||
|
||||
gpg>
|
||||
|
||||
```
|
||||
|
||||
##### 2.2.3 Check the gpg signature
|
||||
|
||||
```shell
|
||||
for i in *.tar.gz; do echo $i; gpg --verify $i.asc $i; done
|
||||
```
|
||||
|
||||
check result
|
||||
|
||||
> If something like the following appears, it means the signature is correct. Keyword: **`Good signature`**
|
||||
|
||||
```shell
|
||||
apache-hertzbeat-${release_version}-src.tar.gz
|
||||
gpg: Signature made XXXX
|
||||
gpg: using RSA key XXXXX
|
||||
gpg: Good signature from "XXX <xxx@apache.org>"
|
||||
```
|
||||
|
||||
#### 2.3 Check sha512 hash
|
||||
|
||||
```shell
|
||||
for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done
|
||||
```
|
||||
|
||||
#### 2.4 Check the binary package
|
||||
|
||||
unzip `apache-hertzbeat-${release.version}-bin.tar.gz`
|
||||
|
||||
```shell
|
||||
tar -xzvf apache-hertzbeat-${release.version}-bin.tar.gz
|
||||
```
|
||||
|
||||
check as follows:
|
||||
|
||||
- [ ] Check whether the source package contains unnecessary files, which makes the tar package too large
|
||||
- [ ] There are `LICENSE` and `NOTICE` files
|
||||
- [ ] The year in the `NOTICE` file is correct
|
||||
- [ ] Only text files exist, not binary files
|
||||
- [ ] All files have ASF license at the beginning
|
||||
- [ ] Able to compile correctly
|
||||
- [ ] .....
|
||||
|
||||
#### 2.5 Check the source package
|
||||
|
||||
> If the binary/web-binary package is uploaded, check the binary package.
|
||||
|
||||
Unzip `apache-hertzbeat-${release_version}-src.tar.gz`
|
||||
|
||||
```shell
|
||||
cd apache-hertzbeat-${release_version}-src
|
||||
```
|
||||
|
||||
compile the source code: [Build HertzBeat Binary Package](https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package)
|
||||
|
||||
and check as follows:
|
||||
|
||||
- [ ] There are `LICENSE` and `NOTICE` files
|
||||
- [ ] The year in the `NOTICE` file is correct
|
||||
- [ ] All text files have ASF license at the beginning
|
||||
- [ ] Check the third-party dependent license:
|
||||
- [ ] Compatible with third-party dependent licenses
|
||||
- [ ] All third-party dependent licenses are named in the `LICENSE` file
|
||||
- [ ] If you are relying on the Apache license and there is a `NOTICE` file, then these `NOTICE` files also need to be added to the version of the `NOTICE` file
|
||||
- [ ] .....
|
||||
|
||||
You can refer to this article: [ASF Third Party License Policy](https://apache.org/legal/resolved.html)
|
||||
|
||||
### 3. Email reply
|
||||
|
||||
If you initiate a posting vote, you can refer to this response example to reply to the email after verification
|
||||
|
||||
:::caution Attention
|
||||
When replying to the email, you must bring the information that you have checked by yourself. Simply replying to `+1 approve` is invalid.
|
||||
|
||||
When new PMC votes in the [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) hertzbeat community, Please bring the binding suffix to indicate that it has a binding vote for the vote in the hertzbeat community, and it is convenient to count the voting results.
|
||||
:::
|
||||
|
||||
Non-PMC member:
|
||||
|
||||
```text
|
||||
+1 (non-binding)
|
||||
I checked:
|
||||
1. All download links are valid
|
||||
2. Checksum and signature are OK
|
||||
3. LICENSE and NOTICE are exist
|
||||
4. Build successfully on macOS(Big Sur)
|
||||
5.
|
||||
```
|
||||
|
||||
PMC member:
|
||||
|
||||
```text
|
||||
+1 (binding)
|
||||
I checked:
|
||||
1. All download links are valid
|
||||
2. Checksum and signature are OK
|
||||
3. LICENSE and NOTICE are exist
|
||||
4. Build successfully on macOS(Big Sur)
|
||||
5.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
This doc refer from [Apache StreamPark](https://streampark.apache.org/)
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
id: 'mailing_lists'
|
||||
title: 'Mailing Lists'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
The [Developer Mailing List](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) is the community-recommended way to communicate and obtain the latest information.
|
||||
|
||||
Before you post anything to the mailing lists, be sure that you already **subscribe** to them.
|
||||
|
||||
## Usages
|
||||
|
||||
### Developer List
|
||||
|
||||
- Use this list for your HertzBeat questions
|
||||
- Used by HertzBeat contributors to discuss development of HertzBeat
|
||||
|
||||
| List Name | Address | Subscribe | Unsubscribe | Archive |
|
||||
|--------------------|--------------------------|--------------------------------------------------------|------------------------------------------------------------|------------------------------------------------------------------------|
|
||||
| **Developer List** | [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) | [subscribe](mailto:dev-subscribe@hertzbeat.apache.org) | [unsubscribe](mailto:dev-unsubscribe@hertzbeat.apache.org) | [archive](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) |
|
||||
|
||||
### Notification List
|
||||
|
||||
- Notifications on changes to the HertzBeat codebase
|
||||
|
||||
| List Name | Address | Subscribe | Unsubscribe | Archive |
|
||||
|-----------------------|------------------------------------|------------------------------------------------------------------|----------------------------------------------------------------------|----------------------------------------------------------------------------------|
|
||||
| **Notification List** | [notifications@hertzbeat.apache.org](mailto:notifications@hertzbeat.apache.org) | [subscribe](mailto:notifications-subscribe@hertzbeat.apache.org) | [unsubscribe](mailto:notifications-unsubscribe@hertzbeat.apache.org) | [archive](https://lists.apache.org/list.html?notifications@hertzbeat.apache.org) |
|
||||
|
||||
## Steps for Subscription
|
||||
|
||||
Sending a subscription email is also very simple. The steps are as follows:
|
||||
|
||||
- 1、**Subscribe**: Click the **subscribe** button in the above table, and it redirects to your mail client. The subject and content are arbitrary.
|
||||
After that, you will receive a confirmation email from [dev-help@hertzbeat.apache.org](mailto:dev-help@hertzbeat.apache.org) (if not received, please confirm whether the email is automatically classified as SPAM, promotion email, subscription email, etc.).
|
||||
- 2、**Confirm**: Reply directly to the confirmation email, or click on the link in the email to reply quickly. The subject and content are arbitrary.
|
||||
- 3、**Welcome**: After completing the above steps, you will receive a welcome email with the subject WELCOME to [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), and you have successfully subscribed to the Apache HertzBeat mailing list.
|
||||
|
||||
## Post Plain Text Mails
|
||||
|
||||
When posting to the mailing lists, please use plain text emails.
|
||||
**Do not use HTML emails**.
|
||||
HTML emails are more likely to be targeted as spam mails and rejected.
|
||||
It may get malformed through different mail clients and not easily readable by others.
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
id: maturity
|
||||
title: Maturity
|
||||
sidebar_position: 0
|
||||
---
|
||||
|
||||
## Maturity Assessment for Apache HertzBeat™
|
||||
|
||||
The goals of this maturity model are to describe how Apache projects operate in a concise and high-level way, and to
|
||||
provide a basic framework that projects may choose to use to evaluate themselves.
|
||||
|
||||
More details can be found in
|
||||
the [Apache Project Maturity Model](https://community.apache.org/apache-way/apache-project-maturity-model.html).
|
||||
|
||||
## Status of this assessment
|
||||
|
||||
This assessment is evaluated during HertzBeat's Incubating.
|
||||
|
||||
## Maturity model assessment
|
||||
|
||||
The following table is filled according to
|
||||
the [Apache Maturity Model](https://community.apache.org/apache-way/apache-project-maturity-model.html). Mentors and
|
||||
community members are welcome to comment and modify it.
|
||||
|
||||
### CODE
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **CD10** | The project produces Open Source software for distribution to the public, at no charge. | **YES** The project source code is licensed under the `Apache License 2.0`. |
|
||||
| **CD20** | Anyone can easily discover and access the project's code.. | **YES** The [official website](https://hertzbeat.apache.org/) includes `GitHub` link which can access the project's repository on GitHub directly. |
|
||||
| **CD30** | Anyone using standard, widely-available tools, can build the code in a reproducible way. | **YES** Apache HertzBeat provide `how-to-build` document for every component to tell user how to compile on bare metal, such as the [core's](https://hertzbeat.apache.org/docs/community/development). |
|
||||
| **CD40** | The full history of the project's code is available via a source code control system, in a way that allows anyone to recreate any released version. | **YES** It depends on git, and anyone can view the full history of the project via commit logs. |
|
||||
| **CD50** | The source code control system establishes the provenance of each line of code in a reliable way, based on strong authentication of the committer. When third parties contribute code, commit messages provide reliable information about the code provenance. | **YES** The project uses GitHub and managed by Apache Infra, it ensuring provenance of each line of code to a committer. And the third-party contributions are accepted in accordance with the contributing guides. |
|
||||
|
||||
### LICENSE
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **LC10** | The Apache License, version 2.0, covers the released code. | **YES** The [LICENSE](https://github.com/apache/hertzbeat/blob/master/LICENSE) is in GitHub repository. And all source files are with APLv2 header, checked by Github Action. |
|
||||
| **LC20** | Libraries that are mandatory dependencies of the project's code do not create more restrictions than the Apache License does. | **YES** All dependencies are listed. |
|
||||
| **LC30** | The libraries mentioned in LC20 are available as Open Source software. | **YES** All dependencies are listed are available as Open Source software |
|
||||
| **LC40** | Committers are bound by an Individual Contributor Agreement (the "Apache iCLA") that defines which code they may commit and how they need to identify code that is not their own. | **YES** All committers have iCLAs. |
|
||||
| **LC50** | The project clearly defines and documents the copyright ownership of everything that the project produces. | **YES** And all source files are with APLv2 header, checked by GitHub Action. |
|
||||
|
||||
### Releases
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **RE10** | Releases consist of source code, distributed using standard and open archive formats that are expected to stay readable in the long term. | **YES** Source release is distributed via [dist.apache.org](https://dist.apache.org/repos/dist/release/incubator/hertzbeat/) and linked from [download page](https://hertzbeat.apache.org/docs/download). |
|
||||
| **RE20** | The project's PPMC (Project Management Committee, see CS10) approves each software release in order to make the release an act of the Foundation. | **YES** All releases have been voted at [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) and [general@incubator.apache.org](mailto:general@incubator.apache.org), and have at least 3 PPMC member's votes. |
|
||||
| **RE30** | Releases are signed and/or distributed along with digests that anyone can reliably use to validate the downloaded archives. | **YES** All releases are signed, and the [KEYS](https://dist.apache.org/repos/dist/release/hertzbeat/KEYS) are available. |
|
||||
| **RE40** | The project can distribute convenience binaries alongside source code, but they are not Apache Releases, they are provided with no guarantee. | **YES** User can easily build binaries from source code, and we do not provide binaries as Apache Releases. |
|
||||
| **RE50** | The project documents a repeatable release process so that someone new to the project can independently generate the complete set of artifacts required for a release. | **YES** We can follow the [Release guide](https://hertzbeat.apache.org/docs/community/how_to_release) to make a new Apache HertzBeat release, and so far we had 4 different release managers. |
|
||||
|
||||
### Quality
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **QU10** | The project is open and honest about the quality of its code. Various levels of quality and maturity for various modules are natural and acceptable as long as they are clearly communicated. | **YES** We encourage user to [report issues](https://github.com/apache/hertzbeat/issues). |
|
||||
| **QU20** | The project puts a very high priority on producing secure software. | **YES** All security reports are actively handled. |
|
||||
| **QU30** | The project provides a well-documented, secure and private channel to report security issues, along with a documented way of responding to them. | **Yes** The official Github Repo provides a [security doc](https://github.com/apache/hertzbeat/blob/master/SECURITY.md) |
|
||||
| **QU40** | The project puts a high priority on backwards compatibility and aims to document any incompatible changes and provide tools and documentation to help users transition to new features. | **Yes** We follow semantic versions. As long as it's within one major version, it's backward compatible. And when any breaking changes added, we provide corresponding upgrade guides. |
|
||||
| **QU50** | The project strives to respond to documented bug reports in a timely manner. | **YES** The project has resolved 743+ issues and 2348+ pull requests so far, with very prompt response. |
|
||||
|
||||
### Community
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. |
|
||||
| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) |
|
||||
| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. |
|
||||
| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 3 new PMC members and 13 new committers so far. |
|
||||
| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members |
|
||||
| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. |
|
||||
| **CO70** | The project strives to answer user questions in a timely manner. | **YES** We use [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), [GitHub issue](https://github.com/apache/hertzbeat/issues) and [GitHub discussion](https://github.com/apache/hertzbeat/discussions) to do this in a timely manner. |
|
||||
|
||||
### Consensus
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||
| **CS10** | The project maintains a public list of its contributors who have decision power. The project's PPMC (Project Management Committee) consists of those contributors. | **Yes** See [members](https://hertzbeat.apache.org/team/) with all PPMC members and committers. |
|
||||
| **CS20** | Decisions require a consensus among PPMC members and are documented on the project's main communications channel. The PPMC takes community opinions into account, but the PPMC has the final word. | **YES** All decisions are made by votes on [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), and with at least 3 +1 votes from PPMC. |
|
||||
| **CS30** | The project uses documented voting rules to build consensus when discussion is not sufficient. | **YES** The project uses the standard ASF voting rules. |
|
||||
| **CS40** | In Apache projects, vetoes are only valid for code commits. The person exercising the veto must justify it with a technical explanation, as per the Apache voting rules defined in CS30. | **YES** Apache HertzBeat community has not used the veto power yet except for code commits. |
|
||||
| **CS50** | All "important" discussions happen asynchronously in written form on the project's main communications channel. Offline, face-to-face or private discussions that affect the project are also documented on that channel. | **YES** All important discussions and conclusions are recorded in written form. |
|
||||
|
||||
### Independence
|
||||
|
||||
| **ID** | **Description** | **Status** |
|
||||
|----------|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **IN10** | The project is independent from any corporate or organizational influence. | **YES** The PPMC members and committer of Apache HertzBeat are from several different companies, and majority of them are NOT From the company that donated this project. |
|
||||
| **IN20** | Contributors act as themselves, not as representatives of a corporation or organization. | **YES** The contributors act on their own initiative without representing a corporation or organization. |
|
||||
@@ -0,0 +1,287 @@
|
||||
---
|
||||
id: 'new_committer_process'
|
||||
title: 'New Committer Process'
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
[Apache New Committer Guideline](https://community.apache.org/newcommitter.html#new-committer-process)
|
||||
|
||||
## The process of new Committer
|
||||
|
||||
- Call a vote in mailing `private@hertzbeat.apache.org`
|
||||
|
||||
see **Committer Vote Template**
|
||||
|
||||
- Close the vote
|
||||
|
||||
see **Close Vote Template**
|
||||
|
||||
- If the result is positive, invite the new committer
|
||||
|
||||
see **Committer Invite Template**
|
||||
|
||||
- If accepted, then: Accept the committer
|
||||
|
||||
see **Committer Accept Template**
|
||||
|
||||
- New Committer sign CLA and wait for CLA is recorded
|
||||
|
||||
- Request creation of the committer account
|
||||
|
||||
see **Committer Account Creation**
|
||||
|
||||
- Wait until root says it is done
|
||||
- [Roster](https://whimsy.apache.org/roster/ppmc/hertzbeat) add the new committer
|
||||
- Announce the new committer
|
||||
|
||||
see **Announce New Committer Template**
|
||||
|
||||
## Template
|
||||
|
||||
Note that, there are three placeholder in template should be replaced before using
|
||||
|
||||
- NEW_COMMITTER_NAME This Must Be Public Name, Not Github Name Or Id.
|
||||
- NEW_COMMITTER_EMAIL
|
||||
- NEW_COMMITTER_APACHE_NAME
|
||||
|
||||
### Committer Vote Template
|
||||
|
||||
:::note
|
||||
NEW_COMMITTER_NAME This Must Be Public Name, Not Github Name Or Id.
|
||||
:::
|
||||
|
||||
```text
|
||||
To: private@hertzbeat.apache.org
|
||||
Subject: [VOTE] New committer: `NEW_COMMITTER_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat PMC,
|
||||
|
||||
This is a formal vote about inviting `NEW_COMMITTER_NAME` as our community new committer.
|
||||
|
||||
Work list: https://github.com/apache/hertzbeat/commits?author=xxx
|
||||
|
||||
Here is the list of `NEW_COMMITTER_NAME`'s contributions in HertzBeat Community:
|
||||
|
||||
> [27 commits](https://github.com/apache/hertzbeat/commits?author=xxx)
|
||||
>
|
||||
> 7,495 ++ 627 --
|
||||
|
||||
Submitted PR (27 commits)
|
||||
- [ISSUE #4534] [feature] add new feature in hertzbeat #3445
|
||||
- xxx
|
||||
|
||||
Submitted Issues (18 commits)
|
||||
|
||||
- [bug] find some bugs in hertzbeat nodes #6565
|
||||
- xxx
|
||||
|
||||
Please vote:
|
||||
|
||||
+1: I support this proposal and will welcome `NEW_COMMITTER_NAME` as a committer.
|
||||
+0: I don't care.
|
||||
-1: I object to this proposal and here are my reasons.
|
||||
|
||||
This vote will be open for at least 7 days.
|
||||
|
||||
See voting guidelines at
|
||||
https://community.apache.org/newcommitter.html
|
||||
|
||||
Best Wishes,
|
||||
ttt
|
||||
```
|
||||
|
||||
Note that, Voting ends one week from today, i.e.
|
||||
[midnight UTC on YYYY-MM-DD](https://www.timeanddate.com/counters/customcounter.html?year=YYYY&month=MM&day=DD)
|
||||
[Apache Voting Guidelines](https://community.apache.org/newcommitter.html)
|
||||
|
||||
### Close Vote Template
|
||||
|
||||
```text
|
||||
To: private@hertzbeat.apache.org
|
||||
Subject: [RESULT] [VOTE] New committer: `NEW_COMMITTER_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat PMC,
|
||||
|
||||
The vote has now closed. The results are:
|
||||
|
||||
Binding Votes:
|
||||
|
||||
+1 [TOTAL BINDING +1 VOTES]
|
||||
0 [TOTAL BINDING +0/-0 VOTES]
|
||||
-1 [TOTAL BINDING -1 VOTES]
|
||||
|
||||
The vote is ***successful/not successful***
|
||||
```
|
||||
|
||||
### Committer Invite Template
|
||||
|
||||
```text
|
||||
To: NewCommiter@domain.com
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Invitation to become HertzBeat committer: [Candidate Name]
|
||||
|
||||
```
|
||||
|
||||
```text
|
||||
Hello [Candidate Name],
|
||||
|
||||
The HertzBeat Project Management Committee (PMC)
|
||||
hereby offers you committer privileges to the project
|
||||
|
||||
These privileges are offered on the understanding that you'll use them
|
||||
reasonably and with common sense. We like to work on trust
|
||||
rather than unnecessary constraints.
|
||||
|
||||
Being a committer enables you to more easily make
|
||||
changes without needing to go through the patch
|
||||
submission process.
|
||||
|
||||
Being a committer does not require you to
|
||||
participate any more than you already do. It does
|
||||
tend to make one even more committed. You will
|
||||
probably find that you spend more time here.
|
||||
|
||||
Of course, you can decline and instead remain as a
|
||||
contributor, participating as you do now.
|
||||
|
||||
This personal invitation is a chance for you to accept or decline in private.
|
||||
Please let us know in reply to this message whether you accept or decline.
|
||||
Also, please refrain from sharing that you were invited before the official
|
||||
announcement by the PMC.
|
||||
|
||||
If you accept, you will need an Apache account (id) with privileges.
|
||||
Please follow these instructions.
|
||||
|
||||
A. If you already have an ICLA on file:
|
||||
|
||||
1. If you already have an Apache account, let us know your id and we
|
||||
will grant you privileges on the project repositories.
|
||||
|
||||
2. If you have previously sent an ICLA, let us know the email address
|
||||
and public name used on the ICLA and your preferred Apache id, and
|
||||
we will request your account.
|
||||
|
||||
3. If the email address on the previously submitted ICLA is no longer
|
||||
valid, let us know the email address and public name used on the new ICLA,
|
||||
and your preferred Apache id. Continue to step B below and file your new ICLA.
|
||||
|
||||
Look to see if your preferred ID is already taken at
|
||||
https://people.apache.org/committer-index.html
|
||||
|
||||
B. If there is not already an ICLA on file, you need to submit an ICLA:
|
||||
|
||||
1. Details of the ICLA and the forms are found
|
||||
through this link: https://www.apache.org/licenses/#clas
|
||||
|
||||
2. Instructions for its completion and return to
|
||||
the Secretary of the ASF are found at
|
||||
https://www.apache.org/licenses/contributor-agreements.html#submitting
|
||||
|
||||
Do not copy the project or any other individual on your message
|
||||
to Secretary, as the form contains Personally Identifiable Information
|
||||
that should be kept private.
|
||||
|
||||
3. When you complete the ICLA form, be sure to include in the form
|
||||
the Apache HertzBeat project and choose a
|
||||
unique Apache ID. Look to see if your preferred
|
||||
ID is already taken at
|
||||
https://people.apache.org/committer-index.html
|
||||
This will allow the Secretary to notify the PMC
|
||||
when your ICLA has been recorded.
|
||||
|
||||
When recording of your ICLA is noted, you will
|
||||
receive a follow-up message with the next steps for
|
||||
establishing you as a committer.
|
||||
```
|
||||
|
||||
### Committer Accept Template
|
||||
|
||||
```text
|
||||
To: `NEW_COMMITTER_EMAIL`
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Re: invitation to become HertzBeat committer
|
||||
```
|
||||
|
||||
```text
|
||||
Welcome. Here are the next steps in becoming a project committer. After that
|
||||
we will make an announcement to the dev@hertzbeat.apache.org list.
|
||||
|
||||
You need to send a Contributor License Agreement to the ASF.
|
||||
Normally you would send an Individual CLA. If you also make
|
||||
contributions done in work time or using work resources,
|
||||
see the Corporate CLA. Ask us if you have any issues.
|
||||
https://www.apache.org/licenses/#clas.
|
||||
|
||||
You need to choose a preferred ASF user name and alternatives.
|
||||
In order to ensure it is available you can view a list of taken IDs at
|
||||
https://people.apache.org/committer-index.html
|
||||
|
||||
Please notify us when you have submitted the CLA and by what means
|
||||
you did so. This will enable us to monitor its progress.
|
||||
|
||||
We will arrange for your Apache user account when the CLA has
|
||||
been recorded.
|
||||
|
||||
After that is done, please make followup replies to the dev@hertzbeat.apache.org list.
|
||||
We generally discuss everything there and keep the
|
||||
private@hertzbeat.apache.org list for occasional matters which must be private.
|
||||
|
||||
The developer section of the website describes roles within the ASF and provides other
|
||||
resources:
|
||||
https://www.apache.org/foundation/how-it-works.html
|
||||
https://www.apache.org/dev/
|
||||
|
||||
The incubator also has some useful information for new committers
|
||||
in incubating projects:
|
||||
https://incubator.apache.org/guides/committer.html
|
||||
https://incubator.apache.org/guides/ppmc.html
|
||||
|
||||
Just as before you became a committer, participation in any ASF community
|
||||
requires adherence to the ASF Code of Conduct:
|
||||
https://www.apache.org/foundation/policies/conduct.html
|
||||
|
||||
Yours,
|
||||
The Apache HertzBeat new PMC
|
||||
```
|
||||
|
||||
### Announce New Committer Template
|
||||
|
||||
```text
|
||||
To: dev@hertzbeat.apache.org, `NEW_COMMITTER_EMAIL`
|
||||
Subject: [ANNOUNCE] New committer: `NEW_COMMITTER_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hello Community,
|
||||
|
||||
The Podling Project Management Committee (new PMC) for Apache HertzBeat
|
||||
has invited `NEW_COMMITTER_NAME` to become a committer and we are pleased to
|
||||
announce that he has accepted.
|
||||
|
||||
`NEW_COMMITTER_NAME` is active in the Apache HertzBeat community, hope to see your
|
||||
further interactions with the community!
|
||||
Thanks for your contributions.
|
||||
|
||||
Best Wishes!
|
||||
```
|
||||
@@ -0,0 +1,308 @@
|
||||
---
|
||||
id: 'new_pmc_ember_process'
|
||||
title: 'new PMC Member Process'
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
[Apache New Committer Guideline](https://community.apache.org/newcommitter.html#new-committer-process)
|
||||
|
||||
## The process of new PMC member
|
||||
|
||||
- Call a vote in mailing `private@hertzbeat.apache.org`
|
||||
|
||||
see **PMC Member Vote Template**
|
||||
|
||||
- Close the vote
|
||||
|
||||
see **Close Vote Template**
|
||||
|
||||
- Board Approval of new PMC member
|
||||
|
||||
see **Board Approval of new PMC member**
|
||||
|
||||
- If the result is positive, invite the new PMC member
|
||||
|
||||
see **PMC member Invite Template**
|
||||
|
||||
- If accept, then: Accept the PMC member
|
||||
|
||||
see **PMC Member Accept Template**
|
||||
|
||||
- Notify the PMC member of completion
|
||||
|
||||
see **PMC Member Done Template**
|
||||
|
||||
- Announce the new PMC member
|
||||
|
||||
see **PMC Member Announce Template**
|
||||
|
||||
## Template
|
||||
|
||||
Note that, there are three placeholder in template should be replaced before using
|
||||
|
||||
- NEW_PMC_NAME
|
||||
- NEW_PMC_EMAIL
|
||||
- NEW_PMC_APACHE_NAME
|
||||
|
||||
### PMC member Vote Template
|
||||
|
||||
```text
|
||||
To: private@hertzbeat.apache.org
|
||||
Subject: [VOTE] new PMC member candidate: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat PMC,
|
||||
|
||||
This is a formal vote about inviting `NEW_PMC_NAME` as our new PMC member.
|
||||
|
||||
${Work list}[1]
|
||||
|
||||
[1] https://github.com/apache/hertzbeat/commits?author=`NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
Note that, Voting ends one week from today, i.e. [midnight UTC on YYYY-MM-DD](https://www.timeanddate.com/counters/customcounter.html?year=YYYY&month=MM&day=DD)
|
||||
[Apache Voting Guidelines](https://community.apache.org/newcommitter.html)
|
||||
|
||||
### Close Vote Template
|
||||
|
||||
```text
|
||||
To: private@hertzbeat.apache.org
|
||||
Subject: [RESULT] [VOTE] new PMC member: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat PMC,
|
||||
|
||||
The vote has now closed. The results are:
|
||||
|
||||
Binding Votes:
|
||||
|
||||
+1 [TOTAL BINDING +1 VOTES]
|
||||
0 [TOTAL BINDING +0/-0 VOTES]
|
||||
-1 [TOTAL BINDING -1 VOTES]
|
||||
|
||||
The vote is ***successful/not successful***
|
||||
```
|
||||
|
||||
### Board Approval of new PMC member Template
|
||||
|
||||
```text
|
||||
To: board@apache.org
|
||||
Cc: private@`<project>`.apache.org
|
||||
Subject: [NOTICE] `NEW_PMC_NAME` for HertzBeat PMC member
|
||||
```
|
||||
|
||||
```text
|
||||
HertzBeat proposes to invite `NEW_PMC_NAME` to join the PMC.
|
||||
|
||||
The vote result is available here: https://lists.apache.org/...
|
||||
```
|
||||
|
||||
[Apache New Pmc Guide](https://www.apache.org/dev/pmc.html#newpmc)
|
||||
|
||||
### PMC member Invite Template
|
||||
|
||||
```text
|
||||
To: `NEW_PMC_EMAIL`
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Invitation to become HertzBeat PMC member: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hello [Candidate Name],
|
||||
|
||||
The HertzBeat Project Management Committee (PMC)
|
||||
hereby offers you PMC members privileges to the project
|
||||
These privileges are offered on the understanding that you'll use them
|
||||
reasonably and with common sense. We like to work on trust
|
||||
rather than unnecessary constraints.
|
||||
|
||||
Being a PMC member enables you
|
||||
to guide the direction of the project.
|
||||
|
||||
Being a committer does not require you to
|
||||
participate any more than you already do. It does
|
||||
tend to make one even more committed. You will
|
||||
probably find that you spend more time here.
|
||||
|
||||
Of course, you can decline and instead remain as a
|
||||
contributor, participating as you do now.
|
||||
|
||||
This personal invitation is a chance for you to accept or decline in private.
|
||||
Please let us know in reply to this message whether you accept or decline.
|
||||
Also, please refrain from sharing that you were invited before the official
|
||||
announcement by the PMC.
|
||||
|
||||
If you accept, you will need an Apache account (id) with privileges.
|
||||
Please follow these instructions.
|
||||
|
||||
A. If you already have an ICLA on file:
|
||||
|
||||
1. If you already have an Apache account, let us know your id and we
|
||||
will grant you privileges on the project repositories.
|
||||
|
||||
2. If you have previously sent an ICLA, let us know the email address
|
||||
and public name used on the ICLA and your preferred Apache id, and
|
||||
we will request your account.
|
||||
|
||||
3. If the email address on the previously submitted ICLA is no longer
|
||||
valid, let us know the email address and public name used on the new ICLA,
|
||||
and your preferred Apache id. Continue to step B below and file your new ICLA.
|
||||
|
||||
Look to see if your preferred ID is already taken at
|
||||
https://people.apache.org/committer-index.html
|
||||
|
||||
B. If there is not already an ICLA on file, you need to submit an ICLA:
|
||||
|
||||
1. Details of the ICLA and the forms are found
|
||||
through this link: https://www.apache.org/licenses/#clas
|
||||
|
||||
2. Instructions for its completion and return to
|
||||
the Secretary of the ASF are found at
|
||||
https://www.apache.org/licenses/contributor-agreements.html#submitting
|
||||
|
||||
Do not copy the project or any other individual on your message
|
||||
to Secretary, as the form contains Personally Identifiable Information
|
||||
that should be kept private.
|
||||
|
||||
3. When you complete the ICLA form, be sure to include in the form
|
||||
the Apache HertzBeat project and choose a
|
||||
unique Apache ID. Look to see if your preferred
|
||||
ID is already taken at
|
||||
https://people.apache.org/committer-index.html
|
||||
This will allow the Secretary to notify the PMC
|
||||
when your ICLA has been recorded.
|
||||
|
||||
When recording of your ICLA is noted, you will
|
||||
receive a follow-up message with the next steps for
|
||||
establishing you as a PMC.
|
||||
```
|
||||
|
||||
### PMC member Accept Template
|
||||
|
||||
```text
|
||||
To: `NEW_PMC_EMAIL`
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Re: invitation to become HertzBeat PMC member
|
||||
```
|
||||
|
||||
```text
|
||||
Welcome. Here are the next steps in becoming a project PMC. After that
|
||||
we will make an announcement to the dev@hertzbeat.apache.org list.
|
||||
|
||||
You need to send a Contributor License Agreement to the ASF.
|
||||
Normally you would send an Individual CLA. If you also make
|
||||
contributions done in work time or using work resources,
|
||||
see the Corporate CLA. Ask us if you have any issues.
|
||||
https://www.apache.org/licenses/#clas.
|
||||
|
||||
You need to choose a preferred ASF user name and alternatives.
|
||||
In order to ensure it is available you can view a list of taken IDs at
|
||||
https://people.apache.org/committer-index.html
|
||||
|
||||
Please notify us when you have submitted the CLA and by what means
|
||||
you did so. This will enable us to monitor its progress.
|
||||
|
||||
We will arrange for your Apache user account when the CLA has
|
||||
been recorded.
|
||||
|
||||
After that is done, please make followup replies to the dev@hertzbeat.apache.org list.
|
||||
We generally discuss everything there and keep the
|
||||
private@hertzbeat.apache.org list for occasional matters which must be private.
|
||||
|
||||
The developer section of the website describes roles within the ASF and provides other
|
||||
resources:
|
||||
https://www.apache.org/foundation/how-it-works.html
|
||||
https://www.apache.org/dev/
|
||||
|
||||
The incubator also has some useful information for new PMC
|
||||
in incubating projects:
|
||||
https://incubator.apache.org/guides/committer.html
|
||||
https://incubator.apache.org/guides/ppmc.html
|
||||
|
||||
Just as before you became a PMC member, participation in any ASF community
|
||||
requires adherence to the ASF Code of Conduct:
|
||||
https://www.apache.org/foundation/policies/conduct.html
|
||||
|
||||
Yours,
|
||||
The Apache HertzBeat PMC
|
||||
```
|
||||
|
||||
### PMC member Done Template
|
||||
|
||||
```text
|
||||
To: private@hertzbeat.apache.org, `NEW_PMC_EMAIL`
|
||||
Subject: account request: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
`NEW_PMC_EMAIL`, as you know, the ASF Infrastructure has set up your
|
||||
committer account with the username '`NEW_PMC_APACHE_NAME`'.
|
||||
|
||||
Please follow the instructions to set up your SSH,
|
||||
svn password, svn configuration, email forwarding, etc.
|
||||
https://www.apache.org/dev/#committers
|
||||
|
||||
You have commit access to specific sections of the
|
||||
ASF repository, as follows:
|
||||
|
||||
The general "committers" at:
|
||||
https://svn.apache.org/repos/private/committers
|
||||
|
||||
If you have any questions during this phase, then please
|
||||
see the following resources:
|
||||
|
||||
Apache developer's pages: https://www.apache.org/dev/
|
||||
Incubator committer guide: https://incubator.apache.org/guides/committer.html
|
||||
|
||||
Naturally, if you don't understand anything be sure to ask us on the dev@hertzbeat.apache.org mailing list.
|
||||
Documentation is maintained by volunteers and hence can be out-of-date and incomplete - of course
|
||||
you can now help fix that.
|
||||
|
||||
A PMC member will announce your election to the dev list soon.
|
||||
```
|
||||
|
||||
### PMC member Announce Template
|
||||
|
||||
```text
|
||||
To: dev@hertzbeat.apache.org
|
||||
[ANNOUNCE] new PMC member: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat Community,
|
||||
|
||||
The Podling Project Management Committee (PMC) for Apache HertzBeat
|
||||
has invited `NEW_PMC_NAME` to become our PMC member and
|
||||
we are pleased to announce that he has accepted.
|
||||
|
||||
### add specific details here ###
|
||||
|
||||
Please join me in congratulating `NEW_PMC_NAME`!
|
||||
|
||||
Being a committer enables easier contribution to the
|
||||
project since there is no need to go via the patch
|
||||
submission process. This should enable better productivity.
|
||||
A PMC member helps manage and guide the direction of the project.
|
||||
|
||||
Thanks,
|
||||
On behalf of the Apache HertzBeat PMC
|
||||
```
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
id: 'submit_code'
|
||||
title: 'Submit Code'
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
* First from the remote repository [https://github.com/apache/hertzbeat.git](https://github.com/apache/hertzbeat.git) fork a copy of the code into your own repository
|
||||
|
||||
* The remote dev and merge branch is `master`.
|
||||
|
||||
* Clone your repository to your local
|
||||
|
||||
```shell
|
||||
git clone git@github.com:<Your Github ID>/hertzbeat.git
|
||||
```
|
||||
|
||||
* Add remote repository address, named upstream
|
||||
|
||||
```shell
|
||||
git remote add upstream git@github.com:apache/hertzbeat.git
|
||||
```
|
||||
|
||||
* View repository
|
||||
|
||||
```shell
|
||||
git remote -v
|
||||
```
|
||||
|
||||
> At this time, there will be two repositories: origin (your own repository) and upstream (remote repository)
|
||||
|
||||
* Get/Update remote repository code
|
||||
|
||||
```shell
|
||||
git fetch upstream
|
||||
```
|
||||
|
||||
* Synchronize remote repository code to local repository
|
||||
|
||||
```shell
|
||||
git checkout origin/dev
|
||||
git merge --no-ff upstream/dev
|
||||
```
|
||||
|
||||
* **⚠️Note that you must create a new branch to develop features `git checkout -b feature-xxx`. It is not recommended to use the master branch for direct development**
|
||||
* After modifying the code locally, submit it to your own repository:
|
||||
**Note that the submission information does not contain special characters**
|
||||
|
||||
```shell
|
||||
git commit -m 'commit content'
|
||||
git push
|
||||
```
|
||||
|
||||
* Submit changes to the remote repository, you can see a green button "Compare & pull request" on your repository page, click it.
|
||||
* Select the modified local branch and the branch you want to merge with the past, you need input the message carefully, describe doc is important as code, click "Create pull request".
|
||||
* Then the community Committers will do CodeReview, and then he will discuss some details (design, implementation, performance, etc.) with you, afterward you can directly update the code in this branch according to the suggestions (no need to create a new PR). When this pr is approved, the commit will be merged into the master branch
|
||||
* Finally, congratulations, you have become an official contributor to HertzBeat ! You will be added to the contributor wall, you can contact the community to obtain a contributor certificate.
|
||||
@@ -0,0 +1,131 @@
|
||||
---
|
||||
id: download
|
||||
title: Download Apache HertzBeat - Latest Release
|
||||
sidebar_label: Download
|
||||
description: Download Apache HertzBeat monitoring system - server, collector, source code, and Docker Compose packages with signatures and checksums.
|
||||
---
|
||||
|
||||
## How to Download HertzBeat?
|
||||
|
||||
Download the latest Apache HertzBeat™ release (v1.8.0) as server binary, collector binary, source code, or Docker Compose package. All releases include GPG signatures and SHA512 checksums for verification.
|
||||
|
||||
**Latest Version:** v1.8.0 (Released: February 5, 2026)
|
||||
|
||||
**Quick Download:**
|
||||
|
||||
- [Server Binary](https://www.apache.org/dyn/closer.lua/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-bin.tar.gz)
|
||||
- [Collector Binary](https://www.apache.org/dyn/closer.lua/hertzbeat/1.8.0/apache-hertzbeat-collector-1.8.0-bin.tar.gz)
|
||||
- [Source Code](https://www.apache.org/dyn/closer.lua/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-src.tar.gz)
|
||||
|
||||
## Download Package Types
|
||||
|
||||
| Package Type | Size | Purpose | Platform |
|
||||
|-------------|------|---------|----------|
|
||||
| **Server Binary** | ~200MB | Main monitoring server | Linux, macOS, Windows |
|
||||
| **Collector Binary** | ~50MB | Distributed collectors | Linux, macOS, Windows |
|
||||
| **Source Code** | ~30MB | Build from source | Any with Java 25+ |
|
||||
| **Docker Compose** | ~5MB | Full stack deployment | Docker environments |
|
||||
|
||||
:::tip Native Collector Recommendation
|
||||
If you do not need external JDBC drivers from `ext-lib`, you can choose the native collector package for faster startup and lower memory usage. MySQL, MariaDB, and OceanBase are included in this native-friendly path when `mysql-connector-j` is not provided. TiDB follows the same rule for its SQL query metric set.
|
||||
|
||||
Trade-offs: native packages are platform-specific and do not support runtime `ext-lib` JDBC loading. See [Native Collector Guide](start/native-collector).
|
||||
:::
|
||||
|
||||
:::tip Security Verification
|
||||
Verify downloads using GPG signatures and SHA512 checksums. See [Apache Verification Guide](https://www.apache.org/dyn/closer.cgi#verify) and [HertzBeat KEYS](https://downloads.apache.org/hertzbeat/KEYS).
|
||||
:::
|
||||
|
||||
## Latest Release (Recommended)
|
||||
|
||||
:::tip Security Notice
|
||||
Previous releases may contain security vulnerabilities. Always use the latest version.
|
||||
:::
|
||||
|
||||
| Version | Date | Download | Release |
|
||||
|---------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
|
||||
| v1.8.0 | 2026.02.05 | [apache-hertzbeat-1.8.0-bin.tar.gz](https://www.apache.org/dyn/closer.lua/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-bin.tar.gz) (Server) ( [signature](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-bin.tar.gz.asc) , [sha512](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-collector-1.8.0-bin.tar.gz](https://www.apache.org/dyn/closer.lua/hertzbeat/1.8.0/apache-hertzbeat-collector-1.8.0-bin.tar.gz) (Collector) ( [signature](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-collector-1.8.0-bin.tar.gz.asc) , [sha512](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-collector-1.8.0-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.8.0-src.tar.gz](https://www.apache.org/dyn/closer.lua/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-src.tar.gz) (Source Code) ( [signature](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-src.tar.gz.asc) , [sha512](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-src.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.8.0-docker-compose.tar.gz](https://github.com/apache/hertzbeat/releases/download/1.8.0/apache-hertzbeat-1.8.0-docker-compose.tar.gz) (Docker Compose) ( [signature](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-docker-compose.tar.gz.asc) , [sha512](https://downloads.apache.org/hertzbeat/1.8.0/apache-hertzbeat-1.8.0-docker-compose.tar.gz.sha512) ) | [note](https://github.com/apache/hertzbeat/releases/tag/1.8.0) |
|
||||
|
||||
## Release Docker Image
|
||||
|
||||
> Apache HertzBeat™ provides a docker image for each release. You can pull the image from the [Docker Hub](https://hub.docker.com/r/apache/hertzbeat).
|
||||
|
||||
- HertzBeat [https://hub.docker.com/r/apache/hertzbeat](https://hub.docker.com/r/apache/hertzbeat)
|
||||
- HertzBeat Collector [https://hub.docker.com/r/apache/hertzbeat-collector](https://hub.docker.com/r/apache/hertzbeat-collector)
|
||||
|
||||
## All Archived Releases
|
||||
|
||||
For older releases, please check the [archive](https://archive.apache.org/dist/incubator/hertzbeat/).
|
||||
|
||||
## Download FAQ
|
||||
|
||||
### Which package should I download?
|
||||
|
||||
**Server Binary** - For most users. Includes the main HertzBeat monitoring server with web UI.
|
||||
|
||||
**Collector Binary** - For distributed deployments. Deploy collectors in remote networks to report to the main server.
|
||||
Native collector downloads are platform-specific, for example `apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` or `apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip`.
|
||||
|
||||
If you are deciding between JVM and native collector packages, start with [Native Collector Guide](start/native-collector).
|
||||
|
||||
**Source Code** - For developers who want to build, modify, or contribute to HertzBeat.
|
||||
|
||||
**Docker Compose** - For quick all-in-one deployment with database and time-series storage.
|
||||
|
||||
### How do I verify the download?
|
||||
|
||||
1. Download the GPG signature (.asc) and checksum (.sha512) files
|
||||
2. Verify signature: `gpg --verify apache-hertzbeat-*.tar.gz.asc apache-hertzbeat-*.tar.gz`
|
||||
3. Verify checksum: `sha512sum -c apache-hertzbeat-*.tar.gz.sha512`
|
||||
|
||||
Import Apache HertzBeat KEYS first: `wget https://downloads.apache.org/hertzbeat/KEYS && gpg --import KEYS`
|
||||
|
||||
### What are the system requirements?
|
||||
|
||||
**Server Binary Requirements:**
|
||||
|
||||
- Java 25 or higher
|
||||
- 4GB RAM minimum (8GB recommended)
|
||||
- 2 CPU cores minimum
|
||||
- 20GB disk space
|
||||
|
||||
**Collector Binary Requirements:**
|
||||
|
||||
- Java 25 or higher
|
||||
- 2GB RAM minimum
|
||||
- 1 CPU core minimum
|
||||
- 5GB disk space
|
||||
|
||||
Native collector packages are published per target platform, while the JVM collector package remains cross-platform.
|
||||
|
||||
### Can I use Docker instead of binary packages?
|
||||
|
||||
Yes. Docker is the recommended installation method:
|
||||
|
||||
```bash
|
||||
docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat
|
||||
```
|
||||
|
||||
### How do I extract and run the binary?
|
||||
|
||||
```bash
|
||||
tar -xzf apache-hertzbeat-1.8.0-bin.tar.gz
|
||||
cd apache-hertzbeat-1.8.0
|
||||
./bin/startup.sh
|
||||
```
|
||||
|
||||
Access web UI at `http://localhost:1157` with credentials admin/hertzbeat
|
||||
|
||||
### What's the difference between releases?
|
||||
|
||||
Each release includes bug fixes, security patches, and new features. The release notes link in the download table details specific changes.
|
||||
|
||||
**Always use the latest release** for security and stability.
|
||||
|
||||
### Where can I find old versions?
|
||||
|
||||
Previous versions are archived at [https://archive.apache.org/dist/incubator/hertzbeat/](https://archive.apache.org/dist/incubator/hertzbeat/)
|
||||
|
||||
### How often are new versions released?
|
||||
|
||||
HertzBeat follows a regular release schedule with new versions approximately every 2-3 months. Security patches may be released more frequently.
|
||||
@@ -0,0 +1,106 @@
|
||||
---
|
||||
id: redis_sentinel
|
||||
title: Monitoring Redis Sentinel
|
||||
sidebar_label: Redis Sentinel
|
||||
keywords: [open-source monitoring system, open-source database monitoring, Redis Sentinel monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor Redis Sentinel instances for key performance metrics.
|
||||
|
||||
## Pre-monitoring Requirements
|
||||
|
||||
> Before adding the Redis Sentinel monitor, please ensure the following:
|
||||
|
||||
1. The Redis Sentinel service is running and the sentinel port (default **26379**) is accessible from the HertzBeat server.
|
||||
2. If authentication is configured on the Sentinel instance, prepare the username and password.
|
||||
3. No firewall rules are blocking the sentinel port between HertzBeat and the target host.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter | Parameter Help Description |
|
||||
| --------- | -------------------------- |
|
||||
| Target Host | The IPv4, IPv6 address or domain name of the host being monitored. Note: do not include protocol headers, e.g. `192.168.0.1`. |
|
||||
| Port | The listening port of the Redis Sentinel instance. Default: **26379**. |
|
||||
| Timeout | Timeout value for the connection, in milliseconds. Default: `3000`. |
|
||||
| Username | The username used to authenticate with the Redis Sentinel instance. Optional. |
|
||||
| Password | The password used to authenticate with the Redis Sentinel instance. Optional. |
|
||||
| Collection Interval | How often HertzBeat polls this monitor, in seconds. Minimum value: 30s. |
|
||||
| Description/Remarks | Additional notes and descriptions for this monitor. |
|
||||
|
||||
## Collection Metrics
|
||||
|
||||
### Metric Set: sentinel
|
||||
|
||||
> Sentinel overview metrics collected via `INFO sentinel`.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- | ----------- | ----------------------- |
|
||||
| sentinel_masters | None | Total number of Redis master nodes monitored by this Sentinel instance. |
|
||||
| sentinel_tilt | None | Whether the Sentinel is currently in TILT mode (time-skew safety mode). `1` means TILT is active, `0` means normal. |
|
||||
| sentinel_running_scripts | None | Number of Lua scripts currently being executed by the Sentinel. |
|
||||
| sentinel_timedout_scripts | None | Number of scripts that have timed out. |
|
||||
| sentinel_scripts_queue_length | None | Number of scripts currently waiting in the execution queue. |
|
||||
| sentinel_simulate_failure_flags | None | Bitmask flags used for failure simulation testing (via `SENTINEL SIMULATE-FAILURE`). |
|
||||
|
||||
### Metric Set: master_status
|
||||
|
||||
> Status information for each monitored Redis master node.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- | ----------- | ----------------------- |
|
||||
| master0 | None | Status string for the first monitored master, e.g. `name=mymaster,status=ok,address=127.0.0.1:6379,slaves=1,sentinels=3`. |
|
||||
| master1 | None | Status string for the second monitored master (if present). |
|
||||
| master2 | None | Status string for the third monitored master (if present). |
|
||||
|
||||
### Metric Set: server
|
||||
|
||||
> Server-level information for the Sentinel process, collected via `INFO server`.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- | ----------- | ----------------------- |
|
||||
| redis_version | None | Version string of the Redis (Sentinel) binary. |
|
||||
| os | None | Operating system on which the Sentinel is running. |
|
||||
| arch_bits | None | CPU architecture (32 or 64 bits). |
|
||||
| process_id | None | PID of the Sentinel server process. |
|
||||
| tcp_port | None | The TCP port on which the Sentinel is listening. |
|
||||
| uptime_in_seconds | s | Number of seconds since the Sentinel process started. |
|
||||
| uptime_in_days | d | Number of days since the Sentinel process started. |
|
||||
| hz | None | Frequency of the server's background event loop (calls per second). |
|
||||
| executable | None | Absolute path to the server executable. |
|
||||
| config_file | None | Absolute path to the sentinel configuration file. |
|
||||
|
||||
### Metric Set: clients
|
||||
|
||||
> Client connection statistics, collected via `INFO clients`.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- | ----------- | ----------------------- |
|
||||
| connected_clients | None | Number of client connections currently open (excluding connections from replicas). |
|
||||
| blocked_clients | None | Number of clients blocked waiting on a blocking command (e.g. BLPOP, WAIT). |
|
||||
| maxclients | None | The configured maximum number of client connections allowed. |
|
||||
| client_recent_max_input_buffer | None | Largest input buffer size (in bytes) seen across all current client connections. |
|
||||
| client_recent_max_output_buffer | None | Largest output buffer size (in bytes) seen across all current client connections. |
|
||||
|
||||
### Metric Set: stats
|
||||
|
||||
> General statistics, collected via `INFO stats`.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- | ----------- | ----------------------- |
|
||||
| total_connections_received | None | Total number of connections accepted by the server since startup. |
|
||||
| total_commands_processed | None | Total number of commands processed by the server since startup. |
|
||||
| instantaneous_ops_per_sec | None | Number of commands processed per second (real-time snapshot). |
|
||||
| rejected_connections | None | Number of connections rejected because the `maxclients` limit was reached. |
|
||||
| total_net_input_bytes | None | Total bytes of data received from clients since startup. |
|
||||
| total_net_output_bytes | None | Total bytes of data sent to clients since startup. |
|
||||
|
||||
### Metric Set: cpu
|
||||
|
||||
> CPU consumption statistics, collected via `INFO cpu`.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- | ----------- | ----------------------- |
|
||||
| used_cpu_sys | None | System CPU time consumed by the Sentinel server process (kernel mode). |
|
||||
| used_cpu_user | None | User CPU time consumed by the Sentinel server process (user mode). |
|
||||
| used_cpu_sys_children | None | System CPU time consumed by the background child processes (kernel mode). |
|
||||
| used_cpu_user_children | None | User CPU time consumed by the background child processes (user mode). |
|
||||
@@ -0,0 +1,145 @@
|
||||
---
|
||||
id: activemq
|
||||
title: Monitoring Apache ActiveMQ
|
||||
sidebar_label: Apache ActiveMQ
|
||||
keywords: [open source monitoring tool, monitoring Apache ActiveMQ metrics]
|
||||
---
|
||||
|
||||
> Monitoring the running status of Apache ActiveMQ message middleware, nodes, topics and other related metrics.
|
||||
|
||||
**Use Protocol: JMX**
|
||||
|
||||
## Pre-monitoring Operations
|
||||
>
|
||||
> You need to enable the `JMX` service on ActiveMQ, HertzBeat uses the JMX protocol to collect metrics from ActiveMQ.
|
||||
|
||||
1. Modify the `conf/activemq.xml` file in the installation directory to enable JMX
|
||||
|
||||
> Add `userJmx="true"` attribute in `broker` tag
|
||||
|
||||
```xml
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="true">
|
||||
<!-- others -->
|
||||
</broker>
|
||||
```
|
||||
|
||||
2. Modify the `bin/env` file in the installation directory, configure the JMX port IP, etc.
|
||||
|
||||
The original configuration information will be as follows
|
||||
|
||||
```text
|
||||
# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099"
|
||||
# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=`ACTIVEMQ_CONF`/jmx.password"
|
||||
# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=`ACTIVEMQ_CONF`/jmx.access"
|
||||
# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false"
|
||||
|
||||
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"
|
||||
```
|
||||
|
||||
Update to the following configuration, ⚠️ pay attention to modify `local external IP`
|
||||
|
||||
```text
|
||||
# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=`ACTIVEMQ_CONF`/jmx.password"
|
||||
# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=`ACTIVEMQ_CONF`/jmx.access"
|
||||
|
||||
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099"
|
||||
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false"
|
||||
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false"
|
||||
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP"
|
||||
|
||||
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"
|
||||
```
|
||||
|
||||
3. Restart the ACTIVEMQ service, and add the corresponding ActiveMQ monitoring in HertzBeat. The parameters use the IP port configured by JMX.
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). |
|
||||
| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. |
|
||||
| JMX port | The HTTP port provided by JMX, the default is 11099. |
|
||||
| JMX URL | Optional, customize the JMX URL connection |
|
||||
| Username | Username used for authentication |
|
||||
| password | password used for authentication |
|
||||
| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful |
|
||||
| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here |
|
||||
|
||||
### Collect Metrics
|
||||
|
||||
#### metrics: broker
|
||||
|
||||
| Metric Name | Unit | Description |
|
||||
|-------------------------|------|-----------------------------------------------------------------------|
|
||||
| BrokerName | None | The name of the broker. |
|
||||
| BrokerVersion | None | The version of the broker. |
|
||||
| Uptime | None | Uptime of the broker. |
|
||||
| UptimeMillis | ms | Uptime of the broker in milliseconds. |
|
||||
| Persistent | None | Messages are synchronized to disk. |
|
||||
| MemoryPercentUsage | % | Percent of memory limit used. |
|
||||
| StorePercentUsage | % | Percent of store limit used. |
|
||||
| TempPercentUsage | % | Percent of temp limit used. |
|
||||
| CurrentConnectionsCount | None | Attribute exposed for management |
|
||||
| TotalConnectionsCount | None | Attribute exposed for management |
|
||||
| TotalEnqueueCount | None | Number of messages that have been sent to the broker. |
|
||||
| TotalDequeueCount | None | Number of messages that have been acknowledged on the broker. |
|
||||
| TotalConsumerCount | None | Number of message consumers subscribed to destinations on the broker. |
|
||||
| TotalProducerCount | None | Number of message producers active on destinations on the broker. |
|
||||
| TotalMessageCount | None | Number of unacknowledged messages on the broker. |
|
||||
| AverageMessageSize | None | Average message size on this broker |
|
||||
| MaxMessageSize | None | Max message size on this broker |
|
||||
| MinMessageSize | None | Min message size on this broker |
|
||||
|
||||
#### metrics: topic
|
||||
|
||||
| Metric Name | Unit | Description |
|
||||
|--------------------|------|-------------------------------------------------------------------------------------------|
|
||||
| Name | None | Name of this destination. |
|
||||
| MemoryLimit | MB | Memory limit, in bytes, used by undelivered messages before paging to temporary storage. |
|
||||
| MemoryPercentUsage | None | The percentage of the memory limit used |
|
||||
| ProducerCount | None | Number of producers attached to this destination |
|
||||
| ConsumerCount | None | Number of consumers subscribed to this destination. |
|
||||
| EnqueueCount | None | Number of messages that have been sent to the destination. |
|
||||
| DequeueCount | None | Number of messages that has been acknowledged (and removed) from the destination. |
|
||||
| ForwardCount | None | Number of messages that have been forwarded (to a networked broker) from the destination. |
|
||||
| InFlightCount | None | Number of messages that have been dispatched to, but not acknowledged by, consumers. |
|
||||
| DispatchCount | None | Number of messages that has been delivered to consumers, including those not acknowledged |
|
||||
| ExpiredCount | None | Number of messages that have been expired. |
|
||||
| StoreMessageSize | B | The memory size of all messages in this destination's store. |
|
||||
| AverageEnqueueTime | ms | Average time a message was held on this destination. |
|
||||
| MaxEnqueueTime | ms | The longest time a message was held on this destination |
|
||||
| MinEnqueueTime | ms | The shortest time a message was held on this destination |
|
||||
| TotalBlockedTime | ms | Total time (ms) messages have been blocked by flow control |
|
||||
| AverageMessageSize | B | Average message size on this destination |
|
||||
| MaxMessageSize | B | Max message size on this destination |
|
||||
| MinMessageSize | B | Min message size on this destination |
|
||||
|
||||
#### metrics: memory_pool
|
||||
|
||||
| Metric Name | Unit | Description |
|
||||
|-------------|------|--------------|
|
||||
| name | | metrics name |
|
||||
| committed | kb | total size |
|
||||
| init | kb | init size |
|
||||
| max | kb | max size |
|
||||
| used | kb | used size |
|
||||
|
||||
#### metrics: class_loading
|
||||
|
||||
| Metric Name | Unit | Description |
|
||||
|-----------------------|------|--------------------------|
|
||||
| LoadedClassCount | | Loaded Class Count |
|
||||
| TotalLoadedClassCount | | Total Loaded Class Count |
|
||||
| UnloadedClassCount | | Unloaded Class Count |
|
||||
|
||||
#### metrics: thread
|
||||
|
||||
| Metric Name | Unit | Description |
|
||||
|-------------------------|------|----------------------------|
|
||||
| TotalStartedThreadCount | | Total Started Thread Count |
|
||||
| ThreadCount | | Thread Count |
|
||||
| PeakThreadCount | | Peak Thread Count |
|
||||
| DaemonThreadCount | | Daemon Thread Count |
|
||||
| CurrentThreadUserTime | ms | Current Thread User Time |
|
||||
| CurrentThreadCpuTime | ms | Current Thread Cpu Time |
|
||||
@@ -0,0 +1,360 @@
|
||||
---
|
||||
id: ai_agent
|
||||
title: HertzBeat AI Agent User Guide
|
||||
sidebar_label: HertzBeat AI
|
||||
keywords: [AI, Chat, Agent, Monitoring, AI Agent, OpenAI]
|
||||
---
|
||||
|
||||
> HertzBeat AI Agent is an intelligent monitoring AI Agent that helps you manage monitors, configure alerts, and optimize your infrastructure monitoring through natural language conversation.
|
||||
|
||||
## Overview
|
||||
|
||||
The HertzBeat AI Agent feature provides an interactive chat interface where you can:
|
||||
|
||||
**Monitor Management:**
|
||||
|
||||
- 🔍 Query and filter existing monitors by status, type, host, and labels
|
||||
- ➕ Add new monitors for websites, APIs, databases, and services
|
||||
- 📊 Get detailed information about available monitor types and their parameters
|
||||
- ⚡ Check monitor status and troubleshoot monitoring issues
|
||||
|
||||
**Alert Management:**
|
||||
|
||||
- 🚨 Query active alerts with comprehensive filtering (type, status, search)
|
||||
- 📈 Get alert summary statistics and distribution
|
||||
- 🔔 View both single and grouped alerts
|
||||
- 📋 Analyze alert patterns and trends
|
||||
|
||||
**Metrics Analysis:**
|
||||
|
||||
- 📊 Retrieve real-time metrics data for any monitor
|
||||
- 📈 Access historical metrics with customizable time ranges
|
||||
- 💾 Check warehouse storage system status
|
||||
- 🔍 Query specific metric fields and labels
|
||||
|
||||
**Alert Rule Management:**
|
||||
|
||||
- ⚙️ Configure alert rules and thresholds
|
||||
- 📝 Manage alert definitions for different monitor types
|
||||
- 🎯 Set up custom alerting criteria
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before using the AI Agent, ensure:
|
||||
|
||||
1 **OpenAI Configuration**: Valid OpenAI API key must be configured. Optionally, you can change the model in `application.yml` under `spring.ai.openai.chat.options.model` (default is `gpt-4.1-nano`).
|
||||
2 **Database Connection**: HertzBeat database must be accessible for monitor operations
|
||||
|
||||
## Configuration
|
||||
|
||||
### OpenAI API Key Setup
|
||||
|
||||
The AI Agent uses OpenAI's GPT models. You need to configure an OpenAI API key in this ways:
|
||||
|
||||
#### Database Configuration via UI
|
||||
|
||||
1. Navigate to the AI Agent interface
|
||||
2. If no API key is configured, you'll see a configuration dialog
|
||||
3. Enter your OpenAI API key
|
||||
4. Click **Save Configuration**
|
||||
|
||||
### Configuration Priority
|
||||
|
||||
- **Database configuration** takes priority over YAML configuration
|
||||
- Configuration changes are applied immediately without restart
|
||||
- Invalid API keys are automatically validated before saving
|
||||
|
||||
## Using the AI Agent
|
||||
|
||||
### Accessing the Chat Interface
|
||||
|
||||
1. Navigate to the **AI Agent** section in HertzBeat web interface
|
||||
2. You'll see the HertzBeat Monitoring AI Agent welcome screen
|
||||
3. Start typing your questions in the chat input field
|
||||
|
||||
### Sample Conversations
|
||||
|
||||
#### Adding a New Monitor
|
||||
|
||||
```text
|
||||
You: Add a new HTTP monitor for my website https://example.com
|
||||
AI Agent: I'll help you add an HTTP monitor for https://example.com.
|
||||
Let me create that monitor with the following configuration:
|
||||
- Name: example.com Website Monitor
|
||||
- Type: HTTP
|
||||
- Host: example.com
|
||||
- Port: 443 (HTTPS)
|
||||
- Path: /
|
||||
- Interval: 60 seconds
|
||||
|
||||
Monitor created successfully with ID: 12345
|
||||
```
|
||||
|
||||
#### Listing Existing Monitors
|
||||
|
||||
```text
|
||||
You: Show me all my current monitors
|
||||
AI Agent: Here are your current monitors:
|
||||
|
||||
1. **Linux Server** (ID: 1001)
|
||||
- Status: ✅ Online
|
||||
- Host: 192.168.1.100
|
||||
- Last Check: 2 minutes ago
|
||||
|
||||
2. **MySQL Database** (ID: 1002)
|
||||
- Status: ⚠️ Warning
|
||||
- Host: db.example.com
|
||||
- Last Check: 30 seconds ago
|
||||
|
||||
3. **Website Monitor** (ID: 1003)
|
||||
- Status: ✅ Online
|
||||
- Host: https://example.com
|
||||
- Last Check: 1 minute ago
|
||||
|
||||
Would you like details on any specific monitor?
|
||||
```
|
||||
|
||||
#### Getting Monitor Type Information
|
||||
|
||||
```text
|
||||
You: What parameters do I need to monitor a PostgreSQL database?
|
||||
AI Agent: To monitor a PostgreSQL database, you'll need these parameters:
|
||||
|
||||
**Required Parameters:**
|
||||
- **Host**: Database server IP/hostname
|
||||
- **Port**: PostgreSQL port (default: 5432)
|
||||
- **Database**: Database name to connect to
|
||||
- **Username**: Database username
|
||||
- **Password**: Database password
|
||||
|
||||
**Optional Parameters:**
|
||||
- **Timeout**: Connection timeout (default: 6000ms)
|
||||
- **Query Timeout**: SQL query timeout (default: 3000ms)
|
||||
- **SSL**: Enable SSL connection (default: false)
|
||||
|
||||
Would you like me to help you add a PostgreSQL monitor?
|
||||
```
|
||||
|
||||
#### Alert Management
|
||||
|
||||
```text
|
||||
You: Show me all critical alerts from the last 24 hours
|
||||
AI Agent: Here are the critical alerts from the last 24 hours:
|
||||
|
||||
🚨 **Active Alerts (3 firing)**
|
||||
1. **High CPU Usage** - Linux Server (ID: 1001)
|
||||
- Status: 🔥 Firing
|
||||
- Triggered: 2 hours ago
|
||||
- Severity: Critical
|
||||
- Message: CPU usage 95% > threshold 90%
|
||||
|
||||
2. **Database Connection Failed** - MySQL Database (ID: 1002)
|
||||
- Status: 🔥 Firing
|
||||
- Triggered: 45 minutes ago
|
||||
- Severity: Critical
|
||||
- Message: Connection timeout after 10 seconds
|
||||
|
||||
3. **Website Response Time** - Website Monitor (ID: 1003)
|
||||
- Status: ⚠️ Warning
|
||||
- Triggered: 15 minutes ago
|
||||
- Severity: Warning
|
||||
- Message: Response time 5.2s > threshold 3s
|
||||
|
||||
**Alert Summary:**
|
||||
- Total alerts: 12
|
||||
- Firing: 3 (2 critical, 1 warning)
|
||||
- Resolved: 9
|
||||
|
||||
Would you like me to help you investigate any specific alert?
|
||||
```
|
||||
|
||||
#### Metrics Analysis
|
||||
|
||||
```text
|
||||
You: Show me the CPU usage for my Linux server over the last 6 hours
|
||||
AI Agent: Here's the CPU usage data for your Linux server (Monitor ID: 1001) over the last 6 hours:
|
||||
|
||||
📊 **CPU Usage Metrics - Last 6 Hours**
|
||||
```
|
||||
|
||||
Time | Usage (%) | Load Avg | Processes
|
||||
14:00-15:00 | 45.2% | 1.2 | 156
|
||||
15:00-16:00 | 67.8% | 2.1 | 178
|
||||
16:00-17:00 | 89.4% | 3.8 | 195
|
||||
17:00-18:00 | 92.1% | 4.2 | 203
|
||||
18:00-19:00 | 94.7% | 4.8 | 210
|
||||
19:00-20:00 | 88.3% | 3.5 | 188
|
||||
|
||||
``` text
|
||||
|
||||
**Analysis:**
|
||||
- Peak usage: 94.7% at 19:00
|
||||
- Average usage: 79.6%
|
||||
- Trend: High usage sustained for 3+ hours
|
||||
- Current status: Decreasing (88.3%)
|
||||
|
||||
**Real-time metrics:**
|
||||
- Current CPU: 76.2%
|
||||
- Memory usage: 82.1%
|
||||
- Disk I/O: Normal
|
||||
|
||||
Would you like me to check historical data for comparison or investigate the high usage cause?
|
||||
```
|
||||
|
||||
#### Alert Rule Configuration
|
||||
|
||||
```text
|
||||
You: Set up an alert rule for when my website response time exceeds 5 seconds
|
||||
AI Agent: I'll help you create an alert rule for website response time monitoring.
|
||||
|
||||
**Alert Rule Configuration:**
|
||||
- **Monitor Type**: HTTP/Website
|
||||
- **Metric**: Response Time
|
||||
- **Condition**: Greater than 5 seconds
|
||||
- **Severity**: Warning
|
||||
- **Evaluation**: Check every 60 seconds
|
||||
- **Notification**: Email + Dashboard
|
||||
|
||||
**Proposed Rule:**
|
||||
```yaml
|
||||
name: "Website Response Time Alert"
|
||||
condition: "response_time > 5000ms"
|
||||
severity: "warning"
|
||||
description: "Alert when website response time exceeds 5 seconds"
|
||||
evaluation_interval: 60s
|
||||
for: 2m # Alert after condition persists for 2 minutes
|
||||
```
|
||||
|
||||
This rule will:
|
||||
|
||||
1. Monitor response time every minute
|
||||
2. Trigger alert if response time > 5s for 2+ minutes
|
||||
3. Send notifications via configured channels
|
||||
4. Show in dashboard with warning status
|
||||
|
||||
Would you like me to apply this configuration or modify any settings?
|
||||
|
||||
``` text
|
||||
|
||||
### Chat Features
|
||||
|
||||
#### Message History
|
||||
|
||||
- All conversations are automatically saved
|
||||
- Access previous conversations from the sidebar
|
||||
- Search through conversation history
|
||||
- Export conversation logs
|
||||
|
||||
#### Real-time Responses
|
||||
|
||||
- Streaming responses for immediate feedback
|
||||
- Typing indicators show when the assistant is processing
|
||||
- Cancel ongoing requests if needed
|
||||
|
||||
#### Conversation Management
|
||||
|
||||
- Create new conversations for different topics
|
||||
- Rename conversations for better organization
|
||||
- Delete old conversations to keep things clean
|
||||
Note: Conversations are not saved in the database
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
#### Chat Interface Not Loading
|
||||
|
||||
**Symptoms**: Chat interface shows loading spinner indefinitely
|
||||
**Solutions**:
|
||||
|
||||
1. Check browser console for JavaScript errors
|
||||
2. Ensure network connectivity to HertzBeat server
|
||||
|
||||
#### "Service Unavailable" Message
|
||||
|
||||
**Symptoms**: Chat shows "HertzBeat AI monitoring service unavailable"
|
||||
**Solutions**:
|
||||
1.Verify OpenAI API key configuration
|
||||
2.Check application logs for errors
|
||||
3.Ensure database connectivity
|
||||
|
||||
#### Invalid API Key Error
|
||||
|
||||
**Symptoms**: Configuration dialog shows "Invalid API key" error
|
||||
**Solutions**:
|
||||
|
||||
1. Verify your OpenAI API key starts with `sk-`
|
||||
2. Check API key has sufficient credits/quota
|
||||
3. Test API key directly with OpenAI API
|
||||
4. Ensure no extra spaces in the API key
|
||||
|
||||
#### Monitor Creation Failures
|
||||
|
||||
**Symptoms**: AI suggests monitor configuration but creation fails
|
||||
**Solutions**:
|
||||
|
||||
1. Verify you have permissions to create monitors
|
||||
2. Check if monitor with same name already exists
|
||||
3. Ensure target host/service is accessible
|
||||
4. Review monitor parameter validation errors
|
||||
|
||||
### Debug Mode
|
||||
|
||||
Enable debug logging by setting log level to DEBUG for:
|
||||
|
||||
```yaml
|
||||
logging:
|
||||
level:
|
||||
org.apache.hertzbeat.ai.agent: DEBUG
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Effective Chat Usage
|
||||
|
||||
1. **Be Specific**: "Add HTTP monitor for api.example.com port 8080" vs "add a monitor"
|
||||
2. **Provide Context**: Mention if you want production vs test monitors
|
||||
3. **Ask Follow-ups**: Request configuration details if needed
|
||||
4. **Use Natural Language**: The AI understands conversational requests
|
||||
|
||||
### Monitor Management
|
||||
|
||||
1. **Naming Convention**: Use descriptive monitor names
|
||||
2. **Documentation**: Ask the AI to document complex configurations
|
||||
|
||||
### Security Considerations
|
||||
|
||||
1. **API Key Security**: Store OpenAI API keys securely
|
||||
2. **Access Control**: Limit AI chat access to authorized users
|
||||
3. **Data Privacy**: Be mindful of sensitive information in chat logs
|
||||
4. **Network Security**: Ensure secure connections to OpenAI API
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Bulk Operations
|
||||
|
||||
```text
|
||||
You: Add HTTP monitors for all services in my staging environment:
|
||||
- api-staging.example.com:8080
|
||||
- web-staging.example.com:80
|
||||
- admin-staging.example.com:3000
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
- Requires active internet connection for OpenAI API
|
||||
- OpenAI API usage incurs costs based on token consumption
|
||||
- Complex multi-step operations may require multiple interactions
|
||||
- Some advanced configurations may need manual setup
|
||||
- Rate limiting may apply based on OpenAI plan
|
||||
|
||||
## Support
|
||||
|
||||
For issues with AI Agent:
|
||||
|
||||
1. Check this documentation first
|
||||
2. Review application logs for errors
|
||||
3. Test OpenAI API connectivity independently
|
||||
4. Contact HertzBeat support with specific error messages
|
||||
|
||||
---
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
id: airflow
|
||||
title: Monitoring Apache Airflow
|
||||
sidebar_label: Apache Airflow
|
||||
keywords: [open source monitoring system, open source database monitoring, Apache Airflow monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for the Apache Airflow.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | IP address, IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ without protocol prefix (e.g., https://, http://). |
|
||||
| Task Name | Name identifying this monitoring, ensuring uniqueness. |
|
||||
| Port | Port number of the database exposed to the outside, default is 8080. |
|
||||
| Query Timeout | Set timeout for unresponsive connections, in milliseconds (ms), default is 3000ms. |
|
||||
| HTTPS | Whether to enable HTTPS. |
|
||||
| Collection Interval | Interval for periodic data collection during monitoring, in seconds, with a minimum interval of 30 seconds. |
|
||||
| Whether to detect | Whether to perform a probe check for monitoring availability before adding a new monitor; operations proceed if successful. |
|
||||
| Description | Additional information to identify and describe this monitoring, where users can add remarks. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metric Set: airflow_health
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|--------------|-------------|--------------------|
|
||||
| metadatabase | N/A | Response time |
|
||||
| scheduler | N/A | scheduler health |
|
||||
| triggerer | N/A | triggerer health |
|
||||
|
||||
#### Metric Set: airflow_version
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|---------------------|
|
||||
| value | N/A | Airflow version |
|
||||
| git_version | N/A | Airflow git version |
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
id: alarm_center
|
||||
title: Alarm Center
|
||||
sidebar_label: Alarm Center
|
||||
keywords:
|
||||
[open-source monitoring system, alarm center, alarm management, alarm display]
|
||||
---
|
||||
|
||||
> The Alarm Center serves as a comprehensive visualization platform that displays all alarms after undergoing grouping, consolidation, suppression, and silencing processes. It encompasses both internally triggered threshold-based alarms and integrated third-party notifications.
|
||||
|
||||
## Alarm Sources
|
||||
|
||||
The HertzBeat Alarm Center manages notifications from two primary sources:
|
||||
|
||||
1. Internal Threshold-Triggered Alarms
|
||||
- Generated when monitoring metrics exceed predefined thresholds
|
||||
- Directly correlated with monitoring tasks and threshold rules configured within the system
|
||||
- Manageable through adjustment of monitoring parameters and threshold configurations
|
||||
2. Third-Party Integrated Alarms
|
||||
- Received through API interfaces from external systems
|
||||
- Compatible with various monitoring systems and alarm platforms
|
||||
- Processed through identical workflow as internal alarms
|
||||
|
||||
## Alarm Processing Mechanism
|
||||
|
||||
Before appearing in the Alarm Center, all notifications undergo several processing stages:
|
||||
|
||||
1. Grouping
|
||||
- Categorizes related alarms based on source, type, severity, and other attributes (labels)
|
||||
- Facilitates efficient management of high-volume alarms
|
||||
- Supports customizable grouping rules for diverse scenarios
|
||||
2. Consolidation
|
||||
- Mitigates notification fatigue from multiple similar alarms within short intervals
|
||||
- Presents consolidated alarms in a streamlined format, eliminating redundancy
|
||||
3. Suppression
|
||||
- Manages alarm dependencies
|
||||
- Suppresses secondary alarms when primary alarms are triggered
|
||||
- Supports configurable suppression rules based on alarm dependencies
|
||||
4. Silencing
|
||||
- Temporarily mutes specific alarms during designated periods
|
||||
- Ideal for system maintenance windows and known issue handling
|
||||
- Enables time-based silence rule configuration
|
||||
|
||||
## Alarm Center Interface
|
||||
|
||||

|
||||
|
||||
The Alarm Center provides a comprehensive view of all system alarms:
|
||||
|
||||
1. Alarm Display
|
||||
- Lists all alarms with crucial information including status, source, labels, and timestamps
|
||||
- Offers detailed view functionality for comprehensive alarm information and context
|
||||
2. Search Functionality
|
||||
- Enables rapid alarm identification
|
||||
- Supports multiple search criteria (labels, annotations, alarm status)
|
||||
3. Alarm Management
|
||||
- Alarm Deletion: Removes alarms no longer requiring attention
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
id: alarm_group
|
||||
title: Alarm Grouping
|
||||
sidebar_label: Alarm Grouping
|
||||
keywords: [Open source monitoring system, alarm reduce, alarm grouping]
|
||||
---
|
||||
|
||||
> Group convergence supports grouping and convergence of alarms for specified packet labels, deduplication and convergence of the same repeated alarms for the time period. When the threshold rule triggers the alarm or external alarm reporting, it will enter the packet convergence to alarm grouping to deduplicate the alarm to avoid a large number of alarm messages causing alarm storms.
|
||||
|
||||
## Grouping Policy Parameter Configuration
|
||||
|
||||
- Strategy Name: The name that uniquely identifies the grouping policy
|
||||
- Group Labels: Alarm grouping tag, support up to 10 tags
|
||||
|
||||
> Tag source: monitoring, threshold rules, tags carried by external alarms
|
||||
|
||||
- Wait Time: Waiting time after a new alarm is generated. The same alarms received during this time will be grouped, with a default of 30 seconds.
|
||||
|
||||
> When a new (unable to join an existing group) alarm is generated, the group convergence will wait according to the `wait time`, during which time, the same alarm or the alarm that meets the grouping conditions will be grouped. The alarm after the grouping is sent to the alarm suppression module for subsequent processing until the time interval between the current time and the first alarm generation in the packet exceeds the `wait time`.
|
||||
|
||||
- Interval time: The minimum time interval for sending group alarm notifications to avoid excessive alarm notifications, default 5 minutes
|
||||
- Repeat interval: The minimum notification interval for repeated alarms. For continuously triggered alarms, avoid repeated notifications, default 4 hours
|
||||
|
||||
**Note**: Only grouped alarms can be suppressed using suppression rules.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
id: alarm_inhibit
|
||||
title: Alarm Inhibition
|
||||
sidebar_label: Alarm Inhibition
|
||||
keywords: [ Open Source Monitoring System, Alarm Convergence, Alarm Inhibition ]
|
||||
---
|
||||
|
||||
> Alarm inhibition is used to configure the inhibition relationship between alarms. When an alarm occurs, other alarms can be suppressed. It can be understood as "important" alarms suppressing "
|
||||
> unimportant" alarms. For example, the alarm generated by a server crash suppresses the alarms generated by other services on this server.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Correctly configure the alarm grouping rule
|
||||
|
||||
## Inhibit rule configuration
|
||||
|
||||
- Inhibit Rule Name: The name that uniquely identifies the suppression rule
|
||||
|
||||
- Source Labels: When the alarm contains these tags, the target alarm will be suppressed. Multiple tags can be added.
|
||||
|
||||
> Identify the tag of the "important" alarm. The alarm tag needs to contain all source tags to suppress the alarm marked by the target tag.
|
||||
|
||||
- Target Labels: Alarms matching these tags will be suppressed.
|
||||
|
||||
> Identify the label of "unimportant" alarms. Alarm labels need to contain all target labels to be suppressed.
|
||||
|
||||
- Equal Labels: Labels for determining alarm correlation. Supports up to 10 labels.
|
||||
- Enabled: Enable or disable this inhibit rule
|
||||
|
||||
## Example
|
||||
|
||||
Scenario: Use HertzBeat to monitor two Centos servers 192.168.1.1, 192.168.1.2, and Redis services Redis-1 and Redis-2 deployed on the two servers.
|
||||
And configure the following threshold rules:
|
||||
|
||||
- Monitor Centos Linux / Monitor availability. Bind label `server-status:down`
|
||||
- Monitor Redis database / Monitor availability. Bind label `redis-status:down`
|
||||
|
||||
If you need to achieve that when the Centos downtime alarm is generated, the Redis alarm will no longer be generated, you can configure the following alarm suppression rules:
|
||||
|
||||
- Source label: `server-status:down`
|
||||
- Target label: `redis-status:down`
|
||||
- Equal label: `instancehost`
|
||||
|
||||
When the Centos 192.168.1.1 downtime alarm is generated, the Redis-1 unavailable alarm will no longer be generated. And at the same time, when Centos 192.168.1.2 is running normally and Redis-2 is
|
||||
unavailable, the alarm notifying Redis-2 unavailable will be generated normally.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
id: alarm_silence
|
||||
title: Alarm Silence
|
||||
sidebar_label: Alarm Silence
|
||||
keywords: [ Open Source Monitoring System, Alert Silence ]
|
||||
---
|
||||
|
||||
> The alert silence management allows you to configure silence policies to suppress alert notifications during specified time periods, such as during system maintenance or when you don’t want to be disturbed by alerts at night or on weekends. Alert silence rules support both one-time and periodic time periods, and can match specific alerts using labels and alert levels.
|
||||
|
||||
## One-Time Time Period Silence Configuration
|
||||
|
||||
- Silence Strategy Name: A unique name to identify the silence policy;
|
||||
- Match All: Whether to enable this silence policy for all alerts;
|
||||
- Label Match: When "Apply to All" is disabled, you can match alerts to be silenced based on specified labels;
|
||||
- Silence Type: Select "One Time Silence";
|
||||
- Silence Period: After selecting "One Time Silence", the silence period configuration is shown in the following image, which can be configured as needed
|
||||

|
||||
- Enable: Enable or disable the silence policy.
|
||||
|
||||
## Periodic Time Period Silence Configuration
|
||||
|
||||
- Silence Strategy Name: A unique name to identify the silence policy;
|
||||
- Match All: Whether to enable this silence policy for all alerts;
|
||||
- Label Match: When "Apply to All" is disabled, you can match alerts to be silenced based on specified labels;
|
||||
- Silence Type: Select "Periodic Silence";
|
||||
- Choose Date: After selecting "Periodic Silence", you can configure the dates when alerts should be silenced;
|
||||
- Silence Period: After selecting "Periodic Silence", the silence period configuration is shown in the following image, which can be configured as needed (e.g., silencing alerts during weekends)
|
||||

|
||||
- Enable: Enable or disable the silence policy.
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
id: alert_console
|
||||
title: Custom console address in alarm template
|
||||
sidebar_label: Console address in alarm template
|
||||
---
|
||||
|
||||
> After the threshold is triggered, send the alarm information. When you notify through DingDing / enterprise Wechat / FeiShu robot or email, the alarm content has a detailed link to log in to the console.
|
||||
|
||||
## Custom settings
|
||||
|
||||
In our startup configuration file application.yml, find the following configuration
|
||||
|
||||
```yml
|
||||
alerter:
|
||||
console-url: #Here is our custom console address
|
||||
```
|
||||
|
||||
The default value is the official console address of HertzBeat.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
id: alert_dingtalk
|
||||
title: Alert DingDing robot notification
|
||||
sidebar_label: Alert DingDing robot notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source DingDing robot notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by DingDing robot.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【DingDing desktop client】-> 【Group settings】-> 【Intelligent group assistant】-> 【Add new robot-select custom】-> 【Set robot name and avatar】-> 【Note⚠️Set custom keywords: HertzBeat】 ->【Copy its webhook address after adding successfully】**
|
||||
|
||||
> Note⚠️ When adding a robot, its custom keywords need to be set in the security setting block: HertzBeat. Other security settings or the IP segment don't need to be filled in.
|
||||
|
||||

|
||||
|
||||
2. **【Save access_token value of the WebHook address of the robot】**
|
||||
|
||||
> eg: webHook address:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f`
|
||||
> Its robot access_token value is `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f`
|
||||
|
||||
3. **【Alarm notification】->【Add new recipient】 ->【Select DingDing robot notification method】->【Set DingDing robot ACCESS_TOKEN】-> 【Confirm】**
|
||||
|
||||

|
||||
|
||||
4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### DingDing robot common issues
|
||||
|
||||
1. DingDing group did not receive the robot alarm notification.
|
||||
|
||||
> Please check whether there is any triggered alarm information in the alarm center.
|
||||
> Please check whether DingDing robot is configured with security custom keywords :HertzBeat.
|
||||
> Please check whether the robot ACCESS_TOKEN is configured correctly and whether the alarm strategy association is configured.
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,68 @@
|
||||
---
|
||||
id: alert_discord
|
||||
title: Alert Discord Bot Notifications
|
||||
sidebar_label: Alert Discord bot notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source Discord bot notification]
|
||||
---
|
||||
|
||||
> Send an alarm message after the threshold is triggered, and notify the recipient through the Discord robot.
|
||||
|
||||
## Steps
|
||||
|
||||
### Create an application in Discord, create a robot under the application, and get the robot Token
|
||||
|
||||
1. Visit [https://discord.com/developers/applications](https://discord.com/developers/applications) to create an application
|
||||
|
||||

|
||||
|
||||
2. Create a robot under the application and get the robot Token
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. Authorize the bot to the chat server
|
||||
|
||||
> Authorize the robot under the OAuth2 menu, select `bot` for `SCOPES`, `BOT PERMISSIONS` select `Send Messages`
|
||||
|
||||

|
||||
|
||||
> Obtain the URL generated at the bottom, and the browser accesses this URL to officially authorize the robot, that is, to set which chat server the robot will join.
|
||||
|
||||
4. Check if your chat server has joined robot members
|
||||
|
||||

|
||||
|
||||
### Enable developer mode and get Channel ID
|
||||
|
||||
1. Personal Settings -> Advanced Settings -> Enable Developer Mode
|
||||
|
||||

|
||||
|
||||
2. Get channel Channel ID
|
||||
|
||||
> Right-click the chat channel you want to send the robot message to, click the COPY ID button to get the Channel ID
|
||||
|
||||

|
||||
|
||||
### Add an alarm notification person in HertzBeat, the notification method is Discord Bot
|
||||
|
||||
1. **[Alarm notification] -> [Add recipient] -> [Select Discord robot notification method] -> [Set robot Token and ChannelId] -> [OK]**
|
||||
|
||||

|
||||
|
||||
2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]**
|
||||
|
||||
> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**.
|
||||
|
||||

|
||||
|
||||
### Discord Bot Notification FAQ
|
||||
|
||||
1. Discord doesn't receive bot alert notifications
|
||||
|
||||
> Please check whether the alarm information has been triggered in the alarm center
|
||||
> Please check whether the robot Token and ChannelId are configured correctly, and whether the alarm policy association has been configured
|
||||
> Please check whether the bot is properly authorized by the Discord chat server
|
||||
|
||||
Other questions can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
id: alert_email
|
||||
title: Alert email notification
|
||||
sidebar_label: Alert email notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source email notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by email.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【Alarm notification】->【Add new recipient】 ->【Select email notification method】**
|
||||
|
||||

|
||||
|
||||
2. **【Get verification code】-> 【Enter email verification code】-> 【Confirm】**
|
||||

|
||||
|
||||

|
||||
|
||||
3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### Email notification common issues
|
||||
|
||||
1. HertzBeat deployed on its own intranet cannot receive email notifications
|
||||
|
||||
> HertzBeat needs to configure its own mail server. Please confirm whether you have configured its own mail server in application.yml
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
id: alert_enterprise_wechat_app
|
||||
title: Alert Enterprise Wechat App notification
|
||||
sidebar_label: Alert Enterprise Wechat App notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source Enterprise Wechat App notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by enterprise WeChat App.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【Enterprise Wechat backstage】-> 【App Management】-> 【Create an app】-> 【Set App message】->【Copy AgentId and Secret adding successfully】**
|
||||
|
||||

|
||||
|
||||
2. **【Alarm notification】->【Add new recipient】 ->【Select Enterprise WeChat App notification method】->【Set Enterprise WeChat ID,Enterprise App ID and Enterprise App Secret 】-> 【Confirm】**
|
||||
|
||||

|
||||
|
||||
3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### Enterprise WeChat App common issues
|
||||
|
||||
1. Enterprise WeChat App did not receive the alarm notification.
|
||||
|
||||
> Please check if the user has application permissions.
|
||||
> Please check if the enterprise application callback address settings are normal.
|
||||
> Please check if the server IP is on the enterprise application whitelist.
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
id: alert_feishu
|
||||
title: Alert FeiShu robot notification
|
||||
sidebar_label: Alert FeiShu robot notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source feishu bot notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by FeiShu robot.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【FeiShu client】-> 【Group settings】-> 【Bots】-> 【Add Bot】-> 【Custom Bot】 -> 【Set robot name and avatar】-> 【Copy its webhook URL after adding successfully】**
|
||||
|
||||
2. **【Save the key value of the WebHook address of the robot】**
|
||||
|
||||
> eg: webHook address:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4`
|
||||
> Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4`
|
||||
|
||||
3. **【Alarm notification】->【Add new recipient】 ->【Select FeiShu robot notification method】->【Set FeiShu robot KEY】-> 【Confirm】**
|
||||
|
||||
4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### FeiShu robot notification common issues
|
||||
|
||||
1. FeiShu group did not receive the robot alarm notification.
|
||||
|
||||
> Please check whether there is any triggered alarm information in the alarm center.
|
||||
> Please check whether the robot key is configured correctly and whether the alarm strategy association is configured.
|
||||
|
||||
2. How to @someone in alarm notification
|
||||
|
||||
> In the form for adding recipients, fill in the `User ID`. If you need to @everyone, you can enter `all` in the `User ID` field. Multiple user IDs are also supported, separated by commas `,`. For detailed instructions on how to get the Feishu user ID, please refer to: [Get feishu user id](https://open.feishu.cn/document/faq/trouble-shooting/how-to-get-internal-user-id).
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
id: alert_feishu_app
|
||||
title: Alert FeiShu app notification
|
||||
sidebar_label: Alert FeiShu app notification
|
||||
keywords: [Alert FeiShu app notification , open source alerter, open source feishu app notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by FeiShu app.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【[FeiShu Open Platform](https://open.feishu.cn/)】->【Create Custom App】->【Create】->【Add Features:Bot】**
|
||||
|
||||
2. **【Development Configuration】->【Permissions & Scopes】:Different types of notification objects require different API permissions, which can be opened as needed**
|
||||
|
||||
| Permission Name | Permission code | Designated User | Designated Group Chat | Designated Department | All User |
|
||||
|-----------------------------------------------------------------|-----------------------------------|:---------------:|:---------------------:|:---------------------:|:--------:|
|
||||
| Obtain user ID | contact:user.employee_id:readonly | ✓ | | | ✓ |
|
||||
| Send messages as an app | im:message:send_as_bot | ✓ | ✓ | ✓ | ✓ |
|
||||
| Obtain employee information in FeiShu CoreHR (Standard version) | ehr:employee:readonly | | | | ✓ |
|
||||
| Send batch messages to members from one or more departments | im:message:send_multi_depts | | | ✓ | |
|
||||
| Send batch messages to multiple users | im:message:send_multi_users | | | | ✓ |
|
||||
|
||||
> Attention⚠️:In the designated notification type of group chat,the application needs to be added as a robot to the group chat, to @someone, you need to enable the permission to 'obtain user ID'
|
||||
>
|
||||
> Batch import scopes
|
||||
>
|
||||
> ```json
|
||||
> {
|
||||
> "scopes": {
|
||||
> "tenant": [
|
||||
> "contact:user.employee_id:readonly",
|
||||
> "im:message:send_as_bot",
|
||||
> "ehr:employee:readonly",
|
||||
> "im:message:send_multi_depts",
|
||||
> "im:message:send_multi_users"
|
||||
> ],
|
||||
> "user": []
|
||||
> }
|
||||
> }
|
||||
> ```
|
||||
|
||||
3. **【App Versions】->【Version Management & Release】->【Create a version】->【Save】->【Publish】**
|
||||
|
||||
4. **【Basic Info】->【Credentials & Basic Info】->【copy and save AppID and AppSecret】**
|
||||
|
||||
5. **【Notice Receiver】->【New Receiver】 ->【Choose FeiShu App method】->【Set AppID and AppSecret】-> 【Select Notice Object Type】-> 【Set the corresponding ID】**
|
||||
|
||||
6. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### FeiShu app notification common issues
|
||||
|
||||
1. FeiShu app did not receive the robot alarm notification.
|
||||
|
||||
> Please check whether there is any triggered alarm information in the alarm center.
|
||||
> Please check whether the AppID and AppSecret is configured correctly and whether the alarm strategy association is configured.
|
||||
> Please check if the user was within the available range when the application was published.
|
||||
|
||||
2. How to @someone in a designated group chat
|
||||
|
||||
> In the form for adding recipients, fill in the `User ID`. If you need to @everyone, you can enter `all` in the `User ID` field. Multiple user IDs are also supported, separated by commas `,`. For detailed instructions on how to get the FeiShu user ID, please refer to: [Get FeiShu user id](https://open.feishu.cn/document/faq/trouble-shooting/how-to-obtain-user-id#529e21a9)
|
||||
|
||||
3. How to obtain a chat ID
|
||||
|
||||
> Please refer to: [Chat ID description](https://open.feishu.cn/document/server-docs/group/chat/chat-id-description#394516c9)
|
||||
|
||||
4. How to obtain party ID
|
||||
|
||||
> Please refer to: [Department resource introduction](https://open.feishu.cn/document/server-docs/contact-v3/department/field-overview#9c02ed7a)
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
id: alert_integration
|
||||
title: Alert Integration
|
||||
sidebar_label: Alert Integration
|
||||
keywords:
|
||||
[
|
||||
open-source monitoring,
|
||||
alert integration,
|
||||
alert management,
|
||||
multi-source alerts,
|
||||
]
|
||||
---
|
||||
|
||||
> The alert integration module of HertzBeat is designed to achieve unified reception, standardized processing, and intelligent dispatching of alerts from various third-party monitoring and observability platforms. As a centralized "Alert Center," HertzBeat efficiently ingests external alert information and applies flexible alert management strategies.
|
||||
|
||||
## Core Capabilities
|
||||
|
||||
- **Multi-Source Alert Ingestion**: Supports receiving alert messages from major platforms such as Webhook, Prometheus, Alertmanager, SkyWalking, and Tencent Cloud.
|
||||
- **Alert Format Standardization**: Converts alerts from different platforms into a unified internal format within HertzBeat for easier processing.
|
||||
- **Comprehensive Alert Processing Mechanisms**, including:
|
||||
- **Grouping and Convergence**: Manage alerts by grouping them based on labels and deduplicate repeated alerts within a specific time window.
|
||||
- **Inhibition**: Automatically suppresses secondary alerts when specific conditions are met.
|
||||
- **Silencing**: Temporarily disables alert notifications during system maintenance or known issues to avoid unnecessary noise.
|
||||
|
||||
### Supported Alert Sources
|
||||
|
||||
HertzBeat currently supports alert integration from the following third-party monitoring platforms:
|
||||
|
||||
- **Webhook**: A generic integration method supporting customized alert format push.
|
||||
- **Prometheus**: You can configure HertzBeat’s service address directly in the Prometheus Server's Alertmanager configuration, allowing HertzBeat to replace Alertmanager for receiving and handling Prometheus Server alerts.
|
||||
- **Alertmanager**: Supports forwarding alerts from Prometheus AlertManager to the HertzBeat alert platform.
|
||||
- **SkyWalking**: Sends SkyWalking alerts to the HertzBeat alert platform via Webhook.
|
||||
- **Tencent Cloud Monitoring**: Sends Tencent Cloud alerts to the HertzBeat alert platform via Webhook.
|
||||
- **And more**:HertzBeat is actively expanding its integration support. If the integration you need is not yet available, the community is actively contributing and can assist in adding it.
|
||||
|
||||
You can view the detailed integration methods and configuration examples through the "Integration" interface in HertzBeat.
|
||||
|
||||

|
||||
@@ -0,0 +1,124 @@
|
||||
---
|
||||
id: alert_notification_template
|
||||
title: Notification Template
|
||||
sidebar_label: Notification Template
|
||||
keywords: [Template, Alert Template, Alarm Template, Notification Template, Message Notification, Alert Webhook Callback Notification]
|
||||
---
|
||||
|
||||
> HertzBeat supports custom notification templates. Templates use placeholder variables for rendering, and the system automatically replaces variables with actual alert data during push notifications.
|
||||
|
||||
## Template Configuration
|
||||
|
||||
【Notification】->【Notice Template】->【Template Configuration】
|
||||
|
||||

|
||||
|
||||
## Template Rendering
|
||||
|
||||
HertzBeat notification templates are based on FreeMarker syntax, supporting variable placeholders, conditional judgments, loops, formatting, and other advanced features. During template rendering, the system injects alert data objects (e.g., GroupAlert, SingleAlert) into the template, and variables are automatically replaced with actual values.
|
||||
|
||||
## Available Variables and Data Structures
|
||||
|
||||
### GroupAlert Structure Fields
|
||||
|
||||
[GroupAlert Definition](https://github.com/apache/hertzbeat/blob/master/hertzbeat-common-spring/src/main/java/org/apache/hertzbeat/common/entity/alerter/GroupAlert.java)
|
||||
|
||||
- `id`:Primary key of the alert group
|
||||
- `groupKey`: Unique identifier for the group
|
||||
- `status`:Group status (e.g., firing, resolved)
|
||||
- `groupLabels`:Group labels (Map)
|
||||
- `commonLabels`:Common labels (Map)
|
||||
- `commonAnnotations`:Common annotations (Map)
|
||||
- `alertFingerprints`:List of alert fingerprints
|
||||
- `creator`、`modifier`、`gmtCreate`、`gmtUpdate`:Metadata
|
||||
- `alerts`:List of alert details (`List<SingleAlert>`)
|
||||
|
||||
### SingleAlert Structure Fields
|
||||
|
||||
[SingleAlert Definition](https://github.com/apache/hertzbeat/blob/master/hertzbeat-common-spring/src/main/java/org/apache/hertzbeat/common/entity/alerter/SingleAlert.java)
|
||||
|
||||
- `id`:Primary key of the detail
|
||||
- `fingerprint`:Unique fingerprint
|
||||
- `labels`:Labels (Map)
|
||||
- `annotations`:Annotations (Map)
|
||||
- `content`:Alert content
|
||||
- `status`:Status (firing|resolved)
|
||||
- `triggerTimes`:Number of triggers
|
||||
- `startAt`、`activeAt`、`endAt`:Timestamps
|
||||
- `creator`、`modifier`、`gmtCreate`、`gmtUpdate`:Metadata
|
||||
|
||||
## Template Variables and Syntax Explanation
|
||||
|
||||
- **Global Variables**:
|
||||
- ``status``:Alert status (e.g., alert, recovery, etc.)
|
||||
- ``groupKey``:Unique identifier for the group
|
||||
- `${commonLabels.xxx}`、`${commonAnnotations.xxx}`:Common labels and annotations, accessed via `xxx`
|
||||
|
||||
- **Alert Details List**:
|
||||
- ``alerts``:Collection of alert details, usually traversed with `<#list alerts as alert>`
|
||||
- `${alert.labels.xxx}`、`${alert.annotations.xxx}`:Labels and annotations for a single alert
|
||||
- `${alert.content}`:Alert content
|
||||
- `${alert.triggerTimes}`:Number of triggers
|
||||
- `${alert.startAt}`:First trigger time
|
||||
|
||||
- **Template Syntax Support**:
|
||||
- Supports FreeMarker syntax, including conditional statements `<#if>`, loops `<#list>`, JSON stringification `?json_string`, time formatting `?number_to_datetime`, string formatting `?string('yyyy-MM-dd HH:mm:ss')`, etc.
|
||||
- Allows flexible combination of variables and template syntax to achieve complex message customization.
|
||||
- For more syntax, refer to the [FreeMarker Documentation](https://freemarker.apache.org/)
|
||||
|
||||
## Template Example
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "🔔 HertzBeat Alert Notification",
|
||||
"status": "${status!"UNKNOWN"}",
|
||||
"commonLabels": {
|
||||
<#if commonLabels?? && commonLabels.severity??>
|
||||
"severity": "${commonLabels.severity?switch("critical", "❤️ Critical", "warning", "💛 Warning", "info", "💚 Info", "Unknown")}"<#if commonLabels.alertname??>,</#if>
|
||||
</#if>
|
||||
<#if commonLabels?? && commonLabels.alertname??>
|
||||
"alertName": "${commonLabels.alertname}"
|
||||
</#if>
|
||||
},
|
||||
"alerts": [
|
||||
<#if alerts?? && alerts?size gt 0>
|
||||
<#list alerts as alert>
|
||||
{
|
||||
"index": ${alert?index + 1},
|
||||
"labels": {
|
||||
<#if alert.labels?? && alert.labels?size gt 0>
|
||||
<#list alert.labels?keys as key>
|
||||
"`key`": "${alert.labels[key]?json_string}"<#if key?has_next>,</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
},
|
||||
<#if alert.content?? && alert.content != "">
|
||||
"content": "${alert.content?json_string}",
|
||||
</#if>
|
||||
"triggerTimes": ${alert.triggerTimes!0},
|
||||
"startAt": "${((alert.startAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}",
|
||||
<#if alert.activeAt?? && alert.activeAt gt 0>
|
||||
"activeAt": "${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}",
|
||||
</#if>
|
||||
<#if alert.endAt?? && alert.endAt gt 0>
|
||||
"endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"<#if alert.annotations?? && alert.annotations?size gt 0>,</#if>
|
||||
</#if>
|
||||
<#if alert.annotations?? && alert.annotations?size gt 0>
|
||||
"annotations": {
|
||||
<#list alert.annotations?keys as key>
|
||||
"`key`": "${alert.annotations[key]?json_string}"<#if key?has_next>,</#if>
|
||||
</#list>
|
||||
}
|
||||
</#if>
|
||||
}<#if alert?has_next>,</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
],
|
||||
"commonAnnotations": {
|
||||
<#if commonAnnotations?? && commonAnnotations?size gt 0>
|
||||
<#list commonAnnotations?keys as key>
|
||||
"`key`": "${commonAnnotations[key]?json_string}"<#if key?has_next>,</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
id: alert_slack
|
||||
title: Alert Slack Webhook Notifications
|
||||
sidebar_label: Alert Slack Webhook Notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source slack webhook notification]
|
||||
---
|
||||
|
||||
> Send an alarm message after the threshold is triggered, and notify the recipient through the Slack Webhook.
|
||||
|
||||
## Steps
|
||||
|
||||
### Open Webhook in Slack, get Webhook URL
|
||||
|
||||
Refer to the official website document [Sending messages using Incoming Webhooks](https://api.slack.com/messaging/webhooks)
|
||||
|
||||
### Add an alarm notifier to HertzBeat, and the notification method is Slack Webhook
|
||||
|
||||
1. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Webhook URL】-> 【OK】**
|
||||
|
||||

|
||||
|
||||
2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]**
|
||||
|
||||
> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**.
|
||||
|
||||

|
||||
|
||||
### Slack Notification FAQ
|
||||
|
||||
1. Slack did not receive the robot warning notification
|
||||
|
||||
> Please check whether the alarm information has been triggered in the alarm center
|
||||
> Please check whether the slack webhook url are configured correctly, and whether the alarm policy association has been configured
|
||||
|
||||
Other questions can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
id: alert_smn
|
||||
title: Alert Huawei Cloud SMN Notifications
|
||||
sidebar_label: Alert Huawei Cloud SMN Notifications
|
||||
keywords: [ open source monitoring tool, open source alerter, open source Huawei Cloud SMN notification ]
|
||||
---
|
||||
|
||||
> Send an alarm message after the threshold is triggered, and notify the recipient through the Huawei Cloud SMN.
|
||||
|
||||
## 操作步骤
|
||||
|
||||
1. **According to [Huawei Cloud SMN Official Document](https://support.huaweicloud.com/qs-smn/smn_json.html) activate the SMN service and configure SMN**
|
||||
|
||||

|
||||
|
||||
2. **Save topic URN for SMN**
|
||||
|
||||

|
||||
|
||||
3. **According to [Huawei Cloud Signature Document](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html) obtain AK, SK, and project ID**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
4. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Huawei Cloud SMN AK, SK and other configurations】-> 【OK】**
|
||||
|
||||

|
||||
|
||||
5. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]**
|
||||
|
||||
> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**.
|
||||
|
||||

|
||||
|
||||
### Huawei Cloud SMN Notification FAQ
|
||||
|
||||
1. Huawei Cloud SMN did not receive the robot warning notification
|
||||
|
||||
> Please check whether the alarm information has been triggered in the alarm center
|
||||
> Please check whether the Huawei Cloud SMN AK, SK and other configurations are configured correctly, and whether the alarm policy association has been configured
|
||||
|
||||
Other questions can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,282 @@
|
||||
---
|
||||
id: alert_sms
|
||||
title: Alert SMS notification
|
||||
sidebar_label: Alert SMS notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source SMS alert notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by SMS.
|
||||
|
||||
## SMS Service Configuration
|
||||
|
||||
Only when you successfully configure your own SMS service will the alert SMS triggered within the monitoring system be sent correctly.
|
||||
HertzBeat provides two ways to configure the SMS service: modifying the `application.yml` configuration file directly or configuring it through the HertzBeat frontend interface (Settings > Message Server Setting).
|
||||
|
||||
> ⚠️ Note: Only one method can be effective at a time. If both methods are configured and enabled, HertzBeat will prioritize the SMS service configured in the frontend interface.
|
||||
|
||||
### Tencent Cloud SMS Configuration
|
||||
|
||||
Add/Fill in the following Tencent Cloud SMS server configuration to `application.yml` (replace parameters with your own SMS server configuration):
|
||||
|
||||
```yaml
|
||||
alerter:
|
||||
sms:
|
||||
enable: true # Whether to enable
|
||||
type: tencent # SMS provider type, supports "tencent"
|
||||
tencent: # Tencent Cloud SMS configuration
|
||||
secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY
|
||||
secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA
|
||||
app-id: 1435441637
|
||||
sign-name: HertzBeat
|
||||
template-id: 1343434
|
||||
```
|
||||
|
||||
1. Create a signature (sign-name) in Tencent Cloud SMS
|
||||

|
||||
|
||||
2. Create a message template (template-id) in Tencent Cloud SMS
|
||||
|
||||
```text
|
||||
Monitor: {1}, Alert Level: {2}. Content: {3}
|
||||
```
|
||||
|
||||

|
||||
|
||||
3. Create an application (app-id) in Tencent Cloud SMS
|
||||

|
||||
|
||||
4. Obtain Tencent Cloud Access Management credentials (secret-id, secret-key)
|
||||

|
||||
|
||||
### Alibaba Cloud SMS Configuration
|
||||
|
||||
To activate and use Alibaba Cloud SMS service, you can refer to the official Alibaba Cloud documentation: [SMS Getting Started Guide](https://help.aliyun.com/zh/sms/getting-started/get-started-with-sms)
|
||||
|
||||
You can configure the Alibaba Cloud SMS service either through the graphical interface or in the `application.yml` file.
|
||||
To use `application.yml`, add/fill in the following Alibaba Cloud SMS configuration (replace parameters with your own SMS server configuration):
|
||||
|
||||
```yaml
|
||||
alerter:
|
||||
sms:
|
||||
enable: true # Whether to enable
|
||||
type: alibaba # SMS provider type, supports "alibaba"
|
||||
alibaba: # Alibaba Cloud SMS configuration
|
||||
access-key-id: # Your AccessKey ID
|
||||
access-key-secret: # Your AccessKey Secret
|
||||
sign-name: # SMS signature
|
||||
template-code: # SMS template code
|
||||
```
|
||||
|
||||
1. Create an Alibaba Cloud account and activate SMS service
|
||||
- Visit [Alibaba Cloud SMS Console](https://dysms.console.aliyun.com/)
|
||||
- Activate SMS service
|
||||
|
||||
2. Create a signature (sign-name)
|
||||
- Log in to [SMS Console](https://dysms.console.aliyun.com/)
|
||||
- Select Domestic/International SMS service
|
||||
- Go to "Signature Management" page and click "Add Signature"
|
||||
- Fill in signature information and submit for review
|
||||
- Wait for signature approval
|
||||
|
||||
3. Create a message template (template-code)
|
||||
- Go to "Template Management" page
|
||||
- Click "Add Template"
|
||||
- Create a template with the following format:
|
||||
|
||||
```text
|
||||
Monitor: `instance`, Alert Level: `priority`. Content: `content`
|
||||
```
|
||||
|
||||
- Submit the template for review
|
||||
|
||||
4. Obtain Access Key credentials (access-key-id, access-key-secret)
|
||||
:::tip
|
||||
Alibaba Cloud officially recommends using RAM user AccessKey with minimal permissions.
|
||||
:::
|
||||
- [Go to RAM Access Control](https://ram.console.aliyun.com/users) to manage RAM users
|
||||
- Create user and select "Access Key for API Access"
|
||||
- Securely save the AccessKey ID and AccessKey Secret
|
||||
- Grant SMS service permission "AliyunDysmsFullAccess" to the user
|
||||
|
||||
Now you can configure this information in your hertzbeat application.
|
||||
|
||||
### UniSMS Configuration
|
||||
|
||||
UniSMS is an aggregated SMS service platform. You can refer to [UniSMS Documentation](https://unisms.apistd.com/docs/tutorials) for configuration.
|
||||
|
||||
Add/Fill in the following UniSMS configuration to `application.yml` (replace parameters with your own SMS server configuration):
|
||||
|
||||
```yaml
|
||||
alerter:
|
||||
sms:
|
||||
enable: true # Whether to enable
|
||||
type: unisms # SMS provider type, set to unisms
|
||||
unisms: # UniSMS configuration
|
||||
# auth-mode: simple or hmac
|
||||
auth-mode: simple
|
||||
access-key-id: YOUR_ACCESS_KEY_ID
|
||||
# hmac mode need to fill in access-key-secret
|
||||
access-key-secret: YOUR_ACCESS_KEY_SECRET
|
||||
signature: YOUR_SMS_SIGNATURE
|
||||
template-id: YOUR_TEMPLATE_ID
|
||||
```
|
||||
|
||||
1. Register UniSMS account
|
||||
- Visit [UniSMS website](https://unisms.apistd.com/)
|
||||
|
||||
2. Create signature
|
||||
- Log in to [UniSMS Console](https://unisms.apistd.com/console/)
|
||||
- Go to "SMS Filing - Signature Management" page
|
||||
- Click "Add Signature"
|
||||
- Fill in signature information and submit for review
|
||||
- Wait for signature approval
|
||||
|
||||
3. Create message template
|
||||
- Go to "SMS Filing - Template Management" page
|
||||
- Click "Add Template"
|
||||
- Create a template with the following format:
|
||||
|
||||
```text
|
||||
Monitor: {instance}, Alert Level: {priority}. Content: {content}
|
||||
```
|
||||
|
||||
- Submit the template for review
|
||||
|
||||
4. Obtain `access-key-id` and `access-key-secret`
|
||||
- Log in to [UniSMS Console](https://unisms.apistd.com/console/)
|
||||
- Go to "Credential Management" page
|
||||
- Get AccessKey ID and AccessKey Secret
|
||||
- Securely save the AccessKey ID and AccessKey Secret
|
||||
|
||||
:::note
|
||||
UniSMS provides two authentication methods for developers to choose from, which can be set in Console - Credential Management, with Simple Mode as default.
|
||||
- Simple Mode [Default]: This mode only verifies AccessKey ID without request parameter signature, making it easier for developers to integrate quickly.
|
||||
- HMAC Mode: This mode requires signing request parameters with AccessKey Secret to enhance the security and authenticity of requests.
|
||||
:::
|
||||
|
||||
Now you can configure this information in your hertzbeat application.
|
||||
|
||||
### Smslocal SMS Configuration
|
||||
|
||||
SMSLocal is an all-in-one SMS service for businesses, with features like multi-way sending, strong security, and 24/7 support. You can refer to smslocal's [Developer Documentation](https://www.smslocal.com/developer/) for configuration.
|
||||
|
||||
Add/Fill in the following Smslocal configuration to `application.yml` (replace parameters with your own SMS server configuration):
|
||||
|
||||
```yaml
|
||||
alerter:
|
||||
sms:
|
||||
enable: true # Whether to enable
|
||||
type: smslocal # SMS provider type, set to smslocal
|
||||
smslocal: # Smslocal configuration
|
||||
api-key: YOUR_API_KEY_HERE
|
||||
```
|
||||
|
||||
1. Register smslocal account
|
||||
- Visit [Smslocal Website](https://www.smslocal.com/)
|
||||
|
||||
2. Obtain `api-key`
|
||||
- Log in to [Smslocal Api Access](https://secure.smslocal.com/cpaas/pages/profile/settings/api-reference)
|
||||
- Go to "API Access" page
|
||||
- Click the eye button
|
||||
- Copy the displayed access key
|
||||
- Then you can configure the `application.yml` file
|
||||
|
||||
Now you can configure this information in your hertzbeat application.
|
||||
|
||||
### AWS Cloud SMS Configuration
|
||||
|
||||
To activate and use the AWS Cloud SMS service, refer to the official AWS documentation: [SMS Getting Started Guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/what-is-sms-mms.html)
|
||||
|
||||
You can configure the AWS Cloud SMS service either through the graphical interface or in the `application.yml` file.
|
||||
To use `application.yml`, add/fill in the following AWS Cloud SMS configuration (replace parameters with your own SMS server configuration):
|
||||
|
||||
```yaml
|
||||
alerter:
|
||||
sms:
|
||||
enable: true # Whether to enable
|
||||
type: aws # SMS provider type, supports "aws"
|
||||
aws: # AWS Cloud SMS configuration
|
||||
access-key-id: # Your AccessKey ID
|
||||
access-key-secret: # Your AccessKey Secret
|
||||
region: # Region Of Your AWS
|
||||
```
|
||||
|
||||
1. Create an AWS Cloud account
|
||||
- If you don’t already have an AWS account, sign up at [AWS Cloud SMS Console](https://aws.amazon.com/console/)
|
||||
|
||||
2. Obtain Access Key credentials (access-key-id, access-key-secret)
|
||||
- Go to the AWS IAM (Identity and Access Management) Console.
|
||||
- Create an IAM user with programmatic access and attach the necessary permissions.
|
||||
- Retrieve your Access Key ID and Secret Access Key (You will need these for configuration).
|
||||
|
||||
3. Select a Specific AWS Region for SMS Messaging
|
||||
- Choose a region that supports AWS End User Messaging (SMS Service).
|
||||
- You can check the supported regions [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html).
|
||||
|
||||
4. Move from the AWS SMS Sandbox to Production
|
||||
- By default, AWS SMS operates in sandbox mode, which restricts SMS delivery to verified phone numbers.
|
||||
To send messages to any number, you must move your account to production mode. follow this [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/sandbox.html#sandbox-sms-move-to-production)
|
||||
|
||||
5. Verify Destination Phone Numbers (for Sandbox Mode)
|
||||
- if you are still in sandbox mode, you can only send SMS messages to verified phone numbers. To add a verified number, follow this [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/verify-destination-phone-number.html)
|
||||
- Note: You do not need to create an Origination Identity or Origination Simulator—just use the AWS CLI to add verified phone numbers.
|
||||
|
||||
> The message template is fixed as follows: "Instance: {}, Priority: {}, Content: {}"
|
||||
|
||||
Now you can configure this information in your hertzbeat application.
|
||||
|
||||
### Twilio SMS Configuration
|
||||
|
||||
To activate and use the Twilio SMS service, refer to the official Twilio documentation: [SMS Getting Started Guide](https://www.twilio.com/docs/sms/quickstart)
|
||||
|
||||
You can configure the Twilio SMS service either through the graphical interface or in the `application.yml` file.
|
||||
To use `application.yml`, add/fill in the following Twilio SMS configuration (replace parameters with your own SMS server configuration):
|
||||
|
||||
```yaml
|
||||
alerter:
|
||||
sms:
|
||||
enable: true # Whether to enable
|
||||
type: twilio # SMS provider type, supports "twilio"
|
||||
twilio: # Twilio SMS configuration
|
||||
account-sid: # Your Twilio Account SID
|
||||
auth-token: # Your Twilio Auth Token
|
||||
twilio-phone-number: # Your Twilio Phone Number
|
||||
```
|
||||
|
||||
1. Create a Twilio account
|
||||
|
||||
- If you don't have a Twilio account, sign up at [Twilio Console](https://www.twilio.com/console)
|
||||
- You'll get a free trial account that allows you to test the SMS service
|
||||
|
||||
2. Obtain Twilio credentials
|
||||
|
||||
- After signing in, locate your Account SID and Auth Token on the dashboard
|
||||
- These credentials will be used to authenticate API requests
|
||||
|
||||
3. Get a Twilio Phone Number
|
||||
|
||||
- In the Twilio Console, navigate to "Phone Numbers" > "Manage" > "Active Numbers"
|
||||
- Click "Buy a Number" or use the trial number provided by Twilio
|
||||
- Make sure the number has SMS capabilities enabled
|
||||
- This number will be used as the sender for your SMS alerts
|
||||
- A phone number is required for the Twilio SMS service to work
|
||||
|
||||
4. Testing Your Configuration on Twilio
|
||||
|
||||
- Twilio provides a sandbox environment for testing
|
||||
- If you are in the trial period, you will only be able to send SMS to verified phone numbers
|
||||
- To verify a phone number, add it to your verified phone numbers list in the Twilio Console
|
||||
|
||||
> The message follows the format: "Instance: {}, Priority: {}, Content: {}"
|
||||
|
||||
This information can be configured in the HertzBeat application.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【Alarm notification】->【Add new recipient】 ->【Select SMS notification method】**
|
||||
|
||||
2. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||
If you have any issues, please provide feedback through the communication group or ISSUE!
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
id: alert_telegram
|
||||
title: Alert Telegram Bot Notification
|
||||
sidebar_label: Alert Telegram bot notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source Telegram bot notification]
|
||||
---
|
||||
|
||||
> Send an alarm message after the threshold is triggered, and notify the recipient through the Telegram robot.
|
||||
|
||||
## Steps
|
||||
|
||||
### Create a bot in Telegram, get Bot Token and UserId
|
||||
|
||||
1. Use [@BotFather](https://t.me/BotFather) to create your own bot and get an access token `Token`
|
||||
|
||||

|
||||
|
||||
2. Get the `User ID` of the recipient
|
||||
|
||||
**Use the recipient account you want to notify to send a message to the newly created Bot account**,
|
||||
Visit ```https://api.telegram.org/bot`<TOKEN>`/getUpdates```, **`use the Bot Token from the previous step to replace the <TOKEN>`**, and respond to the first in the `Json` data A `result.message.from.id` value is the recipient's `User ID`
|
||||
|
||||
```json
|
||||
{
|
||||
"ok": true,
|
||||
"result": [
|
||||
{
|
||||
"update_id": 632299191,
|
||||
"message": {
|
||||
"from":{
|
||||
"id": "User ID"
|
||||
},
|
||||
"chat":{
|
||||
},
|
||||
"date": 1673858065,
|
||||
"text": "111"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
3. Record and save the `Token` and `User Id` we got
|
||||
|
||||
### Add an alarm notification person to HertzBeat, the notification method is Telegram Bot
|
||||
|
||||
1. **【Alarm Notification】->【Add Recipient】->【Select Telegram Robot Notification Method】->【Set Robot Token and UserId】-> 【OK】**
|
||||
|
||||

|
||||
|
||||
2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]**
|
||||
|
||||
> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**.
|
||||
|
||||

|
||||
|
||||
### Telegram Bot Notification FAQ
|
||||
|
||||
1. Telegram did not receive the robot warning notification
|
||||
|
||||
> Please check whether the alarm information has been triggered in the alarm center
|
||||
> Please check whether the robot Token and UserId are configured correctly, and whether the alarm policy association has been configured
|
||||
> UserId should be the UserId of the recipient of the message
|
||||
|
||||
Other questions can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,198 @@
|
||||
---
|
||||
id: alert_threshold
|
||||
title: Alarm Threshold Configuration
|
||||
sidebar_label: Alarm Threshold
|
||||
---
|
||||
|
||||
:::tip
|
||||
Alarm Threshold are the core function of `HertzBeat`, users can configure the trigger conditions of the alarm through the threshold rules.
|
||||
Threshold rules support real-time threshold and scheduled threshold, and can be applied to **monitoring metrics** and **log data** data types. Real-time thresholds can directly trigger alerts when monitoring data is collected, and scheduled thresholds support PromQL, SQL and other expressions to calculate trigger alerts within a specified time period.
|
||||
Support visual page configuration or more flexible expression rule configuration, support configuring trigger times, alarm levels, notification templates, associated specified monitoring and so on. Notification templates support object nested access, which can display alarm information more flexibly.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
## Real-time Threshold
|
||||
|
||||
> Real-time threshold means that the alarm is triggered directly when the monitoring data is collected, which is suitable for scenarios with high real-time requirements. Supports both monitoring metrics and log data types.
|
||||
|
||||
### Creating Real-time Threshold Rules
|
||||
|
||||
> System Page -> Alerting -> Alert Threshold -> New Threshold -> Select Real-time Threshold -> Select Data Type (Monitoring Metrics/Log Data)
|
||||
|
||||
#### Monitoring Metrics Real-time Threshold
|
||||
|
||||
> HertzBeat Page -> Alerting -> Threshold -> New Threshold -> ReadTime Threshold Rule
|
||||
|
||||
Configure the threshold, for example: Select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc.
|
||||
|
||||

|
||||
|
||||
Configuration item details:
|
||||
|
||||
- **Threshold Name**: Unique name defining this threshold rule
|
||||
- **Data Type**: Select monitoring metrics or log data
|
||||
- **Metric Object**: Select the monitoring metric object for which we need to configure the threshold. For example: Under website monitoring type -> response time metric
|
||||
- **Threshold Rule**: Configure the alarm trigger rules for specific indicators, support graphical interface and expression rules. For expression environment variables and operators, see the page prompts. For detailed help on threshold expressions, see [Threshold Expression Help](alert_threshold_expr)
|
||||
- **Associated Monitors**: Apply this threshold rule to the specified monitoring object (support direct binding and label association). If not configured, it will be applied to all monitoring objects that meet this threshold type rule
|
||||
- **Alert Level**: The alert level triggered by the threshold, from low to high: warning, critical, emergency
|
||||
- **Trigger Count**: Set how many times the threshold must be triggered before the alert is actually triggered
|
||||
- **Notification Template**: The template for the notification message sent after the alert is triggered. Template variables are provided on the page, supports object nested access. For example: `__instancename__`, metric value is `responseTime`, which is greater than 50 triggering the alert, also supports accessing object properties like `${log.attributes.hostname}`
|
||||
- **Additional Labels**: Add labels to this threshold rule. When an alert is generated, these labels will also be attached to the alert
|
||||
- **Additional Annotations**: Add annotation information to this threshold rule (the annotation content supports environment variables). When an alarm is generated, this annotation information will be rendered and attached to the alarm
|
||||
- **Enable Alert**: Enable or disable this alert threshold configuration
|
||||
|
||||
#### Log Data Real-time Threshold
|
||||
|
||||
Configure real-time alert rules for log data, supporting condition judgment on log content, attributes, resource information, etc.
|
||||
|
||||
For example, trigger an alert when 60 error logs are received within 300 seconds.
|
||||
|
||||

|
||||
|
||||
Configuration item details:
|
||||
|
||||
- **Threshold Name**: Unique name defining this threshold rule
|
||||
- **Data Type**: Select log data
|
||||
- **Threshold Rule**: Configure log alert trigger rules, support graphical interface and expression rules:
|
||||
- **Graphical Interface**: Visual configuration of log field conditions, supports `log.level`, `log.message`, `log.attributes.*`, `log.resource.*` and other fields
|
||||
- **Expression Rules**: Use custom expressions, supports object nested access, for example: `equals(log.level,"ERROR")` or `contains(log.attributes.hostname,"server-01")`
|
||||
- **Time Window**: Set the time window for log aggregation, in seconds, minimum 60 seconds. Logs within this time window will be aggregated and processed
|
||||
- **Alert Level**: The alert level triggered by the threshold, from low to high: warning, critical, emergency
|
||||
- **Alert Mode**: Select alert sending method:
|
||||
- **Window Group Mode (group)**: Send all logs that meet the conditions within the time window as one alert
|
||||
- **Individual Mode (individual)**: Send each log that meets the conditions as a separate alert
|
||||
- **Trigger Count**: Set how many logs that meet the conditions within the time window will trigger the alert
|
||||
- **Notification Template**: The template for the notification message sent after the alert is triggered, supports object nested access:
|
||||
- Basic variables: ``__instancename__``, ``__alertname__``, etc.
|
||||
- Log fields: `${log.level}`, `${log.message}`, `${log.timestamp}`, etc.
|
||||
- Nested attributes: `${log.attributes.hostname}`, `${log.resource.service.name}`, etc.
|
||||
- **Additional Labels**: Add labels to this threshold rule. When an alert is generated, these labels will also be attached to the alert
|
||||
- **Additional Annotations**: Add annotation information to this threshold rule (the annotation content supports environment variables). When an alarm is generated, this annotation information will be rendered and attached to the alarm
|
||||
- **Enable Alert**: Enable or disable this alert threshold configuration
|
||||
|
||||
**The threshold alert configuration is complete, and alerts that have been successfully triggered can be viewed in the [Alarm Center].**
|
||||
**If you need to send alert notifications via email, WeChat, DingTalk, or Feishu, you can configure it in [Notification].**
|
||||
|
||||
## Scheduled Threshold
|
||||
|
||||
> **Scheduled Threshold Rules** refer to rules where the system evaluates an expression (such as PromQL, SQL) at specified periodic intervals to determine whether monitoring data or log data within a given time range meets alert conditions. These rules are suitable for scenarios requiring trend analysis or aggregated data evaluation, rather than immediate reactions to single real-time data points. Supports both monitoring metrics and log data types.
|
||||
|
||||
### Syntax for Scheduled Threshold Expressions
|
||||
|
||||
Scheduled threshold rules use a dedicated expression language based on ANTLR syntax, supporting different query syntax based on data type:
|
||||
|
||||
#### Monitoring Metrics Expression Syntax (PromQL)
|
||||
|
||||
Supports PromQL-style queries. For specific syntax, please refer to the official documentation of your configured time-series database regarding PromQL. The syntax includes:
|
||||
|
||||
1. **Query Expressions**: Used to reference monitoring data
|
||||
|
||||
```text
|
||||
cpu_usage
|
||||
memory{__field__="field1"}
|
||||
```
|
||||
|
||||
2. **Comparison Expressions**: Used to compare values against thresholds
|
||||
|
||||
```text
|
||||
cpu_usage > 80
|
||||
memory_usage >= 90.5
|
||||
response_time < 1000
|
||||
```
|
||||
|
||||
3. **Logical Expressions**: Used to combine multiple conditions
|
||||
|
||||
```text
|
||||
cpu_usage > 80 and memory_usage > 70
|
||||
disk_usage > 90 or inode_usage > 85
|
||||
cpu_usage > 80 unless maintenance_mode == 1
|
||||
```
|
||||
|
||||
4. **Parenthesis Expressions**: Used to control the order of evaluation
|
||||
|
||||
```text
|
||||
(cpu_usage > 80 or memory_usage > 90) and service_status == 1
|
||||
```
|
||||
|
||||
#### Log Data Expression Syntax (SQL)
|
||||
|
||||
Supports standard SQL syntax to query log data and filter data, allowing aggregated queries on log tables:
|
||||
|
||||
```sql
|
||||
-- Query error log count
|
||||
SELECT COUNT(*) as error_count
|
||||
FROM hertzbeat_logs
|
||||
WHERE level = 'ERROR'
|
||||
AND timestamp >= NOW() - INTERVAL 5 MINUTE
|
||||
|
||||
-- Group by service to count errors
|
||||
SELECT service_name, COUNT(*) as error_count
|
||||
FROM hertzbeat_logs
|
||||
WHERE level = 'ERROR'
|
||||
GROUP BY service_name
|
||||
HAVING COUNT(*) > 10
|
||||
```
|
||||
|
||||
### Creating Scheduled Threshold Rules
|
||||
|
||||
> System Page -> Alerting -> Alert Threshold -> New Threshold -> Select Scheduled Threshold -> Select Data Type (Monitoring Metrics/Log Data)
|
||||
|
||||
#### Monitoring Metrics Scheduled Threshold
|
||||
|
||||
Configure scheduled thresholds for monitoring metrics. For example: define the expression `cpu_usage{instance="server1"}` > 80` for a group of CPU metrics, and trigger an alert when the expression is satisfied.
|
||||
|
||||

|
||||
|
||||
Configuration Items Explained:
|
||||
|
||||
- **Rule Name**: A unique identifier for the threshold rule
|
||||
- **Data Type**: Select monitoring metrics
|
||||
- **Query Language**: Select PromQL as the query language
|
||||
- **Threshold Expression**: The expression that defines the alert condition. It will be evaluated periodically according to the "Execution Interval". Supported elements include:
|
||||
- **Query Identifiers**: References to monitoring metrics (e.g., `cpu_usage`, `memory{instance="server1"}`)
|
||||
- **Comparison Operators**: `>`, `>=`, `<`, `<=`, `==`, `!=`
|
||||
- **Logical Operators**: `and`, `or`, `unless`
|
||||
- **Parentheses**: Used for grouping and controlling evaluation order
|
||||
- **Numeric Literals**: Threshold values (e.g., `80`, `90.5`)
|
||||
- **Execution Interval**: The time interval (in seconds) at which the expression is evaluated. For example, `300` means the rule is checked every 5 minutes
|
||||
- **Alert Level**: The severity level triggered when the condition is met. Available levels: `warning`, `critical`, `emergency`
|
||||
- **Trigger Count**: The number of consecutive times the expression must evaluate to true before an alert is actually triggered
|
||||
- **Notification Template**: The message template sent when an alert is triggered. Template variables are available on the configuration page, supports object nested access
|
||||
- **Additional Labels**: Custom labels that will be attached to the alert when it is generated
|
||||
- **Additional Annotations**: Custom annotation information (supports environment variables) that will be rendered and attached to the alert
|
||||
- **Enable Alerting**: Controls whether this threshold rule is active or not
|
||||
|
||||
#### Log Data Scheduled Threshold
|
||||
|
||||
Configure scheduled thresholds for log data, performing aggregated analysis and alert judgment on logs through SQL queries.
|
||||
|
||||

|
||||
|
||||
Configuration Items Explained:
|
||||
|
||||
- **Rule Name**: A unique identifier for the threshold rule
|
||||
- **Data Type**: Select log data
|
||||
- **Query Language**: Select SQL as the query language
|
||||
- **Log Query Expression**: Use standard SQL syntax to query log data, supporting aggregation functions, grouping, filtering and other operations. For example:
|
||||
|
||||
```sql
|
||||
SELECT COUNT(*) as error_count FROM hertzbeat_logs
|
||||
WHERE level = 'ERROR' AND timestamp >= NOW() - INTERVAL 5 MINUTE
|
||||
```
|
||||
|
||||
- **Execution Interval**: The time interval (in seconds) at which the SQL query is executed. For example, `300` means the query is executed every 5 minutes
|
||||
- **Alert Level**: The severity level triggered when the condition is met. Available levels: `warning`, `critical`, `emergency`
|
||||
- **Alert Mode**: Select alert sending method:
|
||||
- **Window Group Mode (group)**: Send the query result as a single alert
|
||||
- **Individual Mode (individual)**: Send each row in the query result as a separate alert
|
||||
- **Trigger Count**: The number of consecutive times the query result meets the alert condition before an alert is actually triggered
|
||||
- **Notification Template**: The message template sent when an alert is triggered, supports accessing fields in the query result, for example:
|
||||
- Query result fields: ``error_count``, ``service_name``, etc.
|
||||
- Basic variables: ``__alertname__``, ``__severity__``, etc.
|
||||
- **Additional Labels**: Custom labels that will be attached to the alert when it is generated
|
||||
- **Additional Annotations**: Custom annotation information (supports environment variables) that will be rendered and attached to the alert
|
||||
- **Enable Alerting**: Controls whether this threshold rule is active or not
|
||||
|
||||
**Once the threshold rules are configured, successfully triggered alerts will be displayed in the [Alert Center].**
|
||||
**To send alert notifications via Email, WeChat, DingTalk, or Feishu, please go to [Notification Configuration] to set up the appropriate channels.**
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
id: alert_threshold_expr
|
||||
title: Threshold Trigger Expression
|
||||
sidebar_label: Threshold Trigger Expression
|
||||
---
|
||||
|
||||
> When configuring threshold alerts, it is necessary to set up threshold trigger expressions. The system calculates whether to trigger an alert based on the expression and the monitored metric values. Here, we provide a detailed explanation of expression usage.
|
||||
|
||||
## Supported Operators in Expressions
|
||||
|
||||
| Operator (Visual Configuration) | Operator (Expression Configuration) | Supported Types | Description |
|
||||
|---------------------------------|-------------------------------------|-----------------------|--------------------------------------------|
|
||||
| Equals | equals(str1,str2) | String | Check if strings are equal |
|
||||
| Not Equals | !equals(str1,str2) | String | Check if strings are not equal |
|
||||
| Contains | contains(str1,str2) | String | Check if string contains |
|
||||
| Not Contains | !contains(str1,str2) | String | Check if string does not contain |
|
||||
| Matches | matches(str1,str2) | String | Check if string matches regex |
|
||||
| Not Matches | !matches(str1,str2) | String | Check if string does not match regex |
|
||||
| Exists | exists(obj) | String, Numeric, Time | Check if value exists |
|
||||
| Not Exists | !exists(obj) | String, Numeric, Time | Check if value does not exist |
|
||||
| Greater than | obj1 > obj2 | Numeric, Time | Check if value is greater than |
|
||||
| Less than | `obj1 < obj2` | Numeric, Time | Check if value is less than |
|
||||
| Greater than or Equal to | obj1 >= obj2 | Numeric, Time | Check if value is greater than or equal to |
|
||||
| Less than or Equal to | `obj1 <= obj2` | Numeric, Time | Check if value is less than or equal to |
|
||||
| Not Equal to | obj1 != obj2 | Numeric, Time | Check if values are not equal |
|
||||
| Equal to | obj1 == obj2 | Numeric, Time | Check if values are equal |
|
||||
|
||||
### Expression Function Library List
|
||||
|
||||
| Supported Function Library | Description |
|
||||
|--------------------------------------------|------------------------------------------------------------------------------------------|
|
||||
| condition ? trueExpression : falseExpression | Ternary operator |
|
||||
| toDouble(str) | Convert string to Double type |
|
||||
| toBoolean(str) | Convert string to Boolean type |
|
||||
| toInteger(str) | Convert string to Integer type |
|
||||
| array[n] | Retrieve the nth element of an array |
|
||||
| * | Multiplication |
|
||||
| / | Division |
|
||||
| % | Modulo |
|
||||
| ( and ) | Parentheses for controlling the order of operations in logical or mathematical expressions |
|
||||
| + | Addition |
|
||||
| - | Subtraction |
|
||||
| && | Logical AND operator |
|
||||
| \|\| | Logical OR operator |
|
||||
|
||||
#### Supported Environment Variables
|
||||
|
||||
> Environment variables refer to variables supported by metric values, used in expressions. During threshold calculation and judgment, these variables will be replaced with actual values.
|
||||
|
||||
Non-fixed Environment Variables: These variables change dynamically based on the selected monitoring metric. For example, if we choose **response time metric for website monitoring**, the environment variable would be `responseTime - this represents response time variable`. If we want to set an alert trigger for **response time greater than 400 for website monitoring**, the expression would be `responseTime>400`.
|
||||
|
||||
Fixed Environment Variables (Less commonly used): `instance: instance value`
|
||||
This variable is mainly used for calculations involving multiple instances. For instance, if we collect usage metrics for C drive and D drive (`usage` being a non-fixed environment variable), and we only want to set an alert for **usage greater than 80 for the C drive**, the expression would be `equals(instance,"c")&&usage>80`.
|
||||
|
||||
#### Expression Configuration Examples
|
||||
|
||||
1. Website Monitoring -> Alert when response time is greater than or equal to 400ms
|
||||
`responseTime>=400`
|
||||
2. API Monitoring -> Alert when response time is greater than 3000ms
|
||||
`responseTime>3000`
|
||||
3. Overall Monitoring -> Alert when response time for URL (instance) path '[https://baidu.com](https://baidu.com)' is greater than 200ms
|
||||
`equals(instance,"https://baidu.com")&&responseTime>200`
|
||||
4. MYSQL Monitoring -> Alert when 'threads_running' metric under 'status' exceeds 7
|
||||
`threads_running>7`
|
||||
|
||||
If you encounter any issues, feel free to discuss and provide feedback through our community group or ISSUE tracker!
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
id: alert_webhook
|
||||
title: Alert WebHook callback notification
|
||||
sidebar_label: Alert webHook notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source webhook notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and call the Webhook interface through post request to notify the recipient.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【Alarm notification】->【Add new recipient】 ->【Select WebHook notification method】-> 【Set WebHook callback address】 -> 【Confirm】**
|
||||
|
||||

|
||||
|
||||
2. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### WebHook callback POST body BODY content
|
||||
|
||||
Content format:JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"alarmId": 76456,
|
||||
"target": "`target`",
|
||||
"thresholdId": 33455,
|
||||
"priority": 0,
|
||||
"content": "udp_port monitoring availability alert, code is FAIL",
|
||||
"status": 0,
|
||||
"times": 1,
|
||||
"triggerTime": "2022-02-25T13:32:13",
|
||||
"tags": {
|
||||
"app": "windows",
|
||||
"monitorId": "180427708350720",
|
||||
"metrics": "availability",
|
||||
"code": "UN_CONNECTABLE",
|
||||
"thresholdId": "112",
|
||||
"monitorName": "WINDOWS_192.168.124.12"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| | |
|
||||
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| alarmId | integer($int64) title: Alarm record entity primary key index ID 告警记录实体主键索引ID |
|
||||
| target | string title: Alert target object: monitor availability-available metrics-app.metrics.field 告警目标对象: 监控可用性-available 指标-app.metrics.field |
|
||||
| thresholdId | integer($int64) title: Alarm definition ID associated with the alarm 告警关联的告警定义ID |
|
||||
| priority | string($byte) title: Alarm level 0: high-emergency-critical alarm-red 1: medium-critical-critical alarm-orange 2: low-warning-warning alarm-yellow 告警级别 0:高-emergency-紧急告警-红色 1:中-critical-严重告警-橙色 2:低-warning-警告告警-黄色 |
|
||||
| content | string title: The actual content of the alarm notification 告警通知实际内容 |
|
||||
| status | string($byte) title: Alarm status: 0-normal alarm (to be processed) 1-threshold triggered but not reached the number of alarms 2-recovered alarm 3-processed 告警状态: 0-正常告警(待处理) 1-阈值触发但未达到告警次数 2-恢复告警 3-已处理 |
|
||||
| times | integer($int32) title: Alarm threshold trigger times 告警阈值触发次数 |
|
||||
| triggerTime | integer($int64) title: Alarm trigger time (timestamp in milliseconds) 首次告警触发时间(毫秒时间戳) |
|
||||
| tags | example: `{key1:value1}` |
|
||||
|
||||
### Webhook notification common issues
|
||||
|
||||
1. WebHook callback did not take effect
|
||||
|
||||
> Please check whether there is any triggered alarm information in the alarm center.
|
||||
> Please check whether the configured webhook callback address is correct.
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
id: alert_wework
|
||||
title: Alert enterprise Wechat notification
|
||||
sidebar_label: Alert enterprise Wechat notification
|
||||
keywords: [open source monitoring tool, open source alerter, open source WeWork notification]
|
||||
---
|
||||
|
||||
> After the threshold is triggered send alarm information and notify the recipient by enterprise Wechat robot.
|
||||
|
||||
## Operation steps
|
||||
|
||||
1. **【Enterprise Wechat】-> 【Group settings】-> 【Group robot】-> 【Add new robot】-> 【Set robot name and avatar】-> 【Copy its webhook address after adding successfully】**
|
||||
|
||||

|
||||
|
||||
2. **【Save the key value of the WebHook address of the robot】**
|
||||
|
||||
> eg: webHook address:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4`
|
||||
> Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4`
|
||||
|
||||
3. **【Alarm notification】->【Add new recipient】 ->【Select enterprise Wechat robot notification method】->【Set enterprise Wechat robot KEY】-> 【Confirm】**
|
||||
|
||||

|
||||
|
||||
4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】**
|
||||
|
||||
> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.**
|
||||
|
||||

|
||||
|
||||
### Enterprise Wechat robot common issues
|
||||
|
||||
1. The enterprise wechat group did not receive the robot alarm notification.
|
||||
|
||||
> Please check whether there is any triggered alarm information in the alarm center.
|
||||
> Please check whether the robot key is configured correctly and whether the alarm strategy association is configured.
|
||||
|
||||
Other issues can be fed back through the communication group ISSUE!
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
id: almalinux
|
||||
title: Monitoring AlmaLinux Operating System
|
||||
sidebar_label: AlmaLinux Operating System
|
||||
keywords: [open-source monitoring system, open-source operating system monitoring, AlmaLinux operating system monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor common performance metrics of the AlmaLinux operating system.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | None | Number of context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used for cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | None | Total number of disks |
|
||||
| partition_num | None | Total number of partitions |
|
||||
| block_write | None | Total number of blocks written to disk |
|
||||
| block_read | None | Total number of blocks read from disk |
|
||||
| write_rate | iops | Disk block write rate per second |
|
||||
|
||||
#### Metric Set: Network Card Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network card name |
|
||||
| receive_bytes | Byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | Byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | Name of the file system |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Usage rate |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
id: api
|
||||
title: Monitoring HTTP API
|
||||
sidebar_label: HTTP API
|
||||
keywords: [ open source monitoring tool, monitoring http api ]
|
||||
---
|
||||
|
||||
> Call HTTP API interface, check whether the interface is available, and monitor its response time and other Metrics.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) |
|
||||
| Monitoring name | Identify the name of this monitoring. The name needs to be unique |
|
||||
| Port | Ports provided by website, http generally defaults to 80 and https generally defaults to 443 |
|
||||
| Relative path | Suffix path of website address except IP port. For example, the relative path of `www.tancloud.io/console` website is `/console` |
|
||||
| Request mode | Set the request mode of interface call:GET, POST, PUT, DELETE |
|
||||
| Enable HTTPS | Whether to access the website through HTTPS. Note⚠️When HTTPS is enabled, the default corresponding port needs to be changed to 443 |
|
||||
| Username | User name used for interface Basic authentication or Digest authentication |
|
||||
| Password | Password used for interface Basic authentication or Digest authentication |
|
||||
| Headers | HTTP request headers |
|
||||
| Params | HTTP query params, support [time expression](time_expression) |
|
||||
| Content-Type | Set the resource type when carrying the BODY request body data request |
|
||||
| Request BODY | Set the carry BODY request body data, which is valid when PUT or POST request method is used, support [time expression](time_expression) |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here |
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set:summary
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|--------------|-------------|-------------------------|
|
||||
| responseTime | ms | Website response time |
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
id: apollo
|
||||
title: Apollo Configuration Center
|
||||
sidebar_label: Apollo Configuration Center
|
||||
keywords: [ Open Source Monitoring System, Open Source Middleware Monitoring, Apollo configuration center monitoring ]
|
||||
---
|
||||
|
||||
> Monitoring of general metrics for the Apollo Configuration Center service is performed by calling the Prometheus
|
||||
> interface of the Apollo Configuration Center.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Set up the Apollo configuration center according to
|
||||
the [deployment documentation](https://www.apolloconfig.com/#/en/deployment/quick-start).
|
||||
2. Visit ```http://${someIp:somePort}/prometheus``` to verify if you can access the metrics data.
|
||||
For more details, please refer
|
||||
to: [Apollo Monitoring Documentation](https://www.apolloconfig.com/#/en/design/apollo-design?id=v-monitoring-related)
|
||||
3. Note⚠️: Starting from version 1.5.0, the Apollo server supports exposing Prometheus-formatted metrics
|
||||
via `/prometheus`.
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-------------------|-----------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The monitored peer's IPv4, IPv6, or domain name. Note⚠️: Do not include protocol headers (e.g., https://, http://). |
|
||||
| Port | Pulsar's webServicePort value, defaulting to 8080. |
|
||||
| Task Name | The name identifying this monitoring task. The name must be unique. |
|
||||
| Query Timeout | Set the connection timeout in milliseconds (ms). Default is 3000 ms. |
|
||||
| Monitoring Cycle | The interval time for periodic data collection, measured in seconds. The minimum configurable interval is 30 seconds. |
|
||||
| Binding Tags | Used for classifying and managing monitored resources |
|
||||
| Description Notes | Additional identifiers and descriptive notes for this monitoring task. Users can add notes here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metric Set: Basic Information Metrics
|
||||
|
||||
| Metric Name | Unit | Metric Help Description |
|
||||
|--------------------------------|---------|--------------------------------------------------------------------------|
|
||||
| application_ready_time_seconds | Seconds | Time taken for the application to transition from startup to ready state |
|
||||
| process_uptime_seconds | seconds | Total time the process has been running |
|
||||
| process_cpu_usage | % | Current process CPU usage |
|
||||
|
||||
#### Metric Set: : JVM
|
||||
|
||||
| Metric Name | Unit | Metric Help Description |
|
||||
|-----------------------------------|------|---------------------------------------------------------------|
|
||||
| system_cpu_usage | % | System CPU Usage |
|
||||
| system_load_average_1m | None | System load average over the past minute |
|
||||
| jvm_memory_committed_bytes | MB | Size of memory requested by the JVM from the operating system |
|
||||
| jvm_memory_used_bytes | MB | JVM's current actual memory usage |
|
||||
| jvm_memory_max_bytes | MB | Maximum memory limit available to the JVM |
|
||||
| jvm_gc_pause_seconds_count | None | Total number of JVM GC pause events |
|
||||
| jvm_gc_pause_seconds_sum | None | Total time spent in JVM GC pauses |
|
||||
| jvm_memory_usage_after_gc_percent | None | JVM memory usage after garbage collection |
|
||||
|
||||
#### Metric Set: System Resources
|
||||
|
||||
| Metric Name | Unit | Metric Help Description |
|
||||
|--------------------------|------|--------------------------------------------------------------------|
|
||||
| process_files_max_files | None | Limit on the maximum number of file descriptors a process may open |
|
||||
| process_files_open_files | None | Number of file descriptors currently opened by the process |
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
id: bulletin
|
||||
title: Customizable bulletins
|
||||
sidebar_label: Customized bulletins
|
||||
keywords: [bulletin, custom]
|
||||
---
|
||||
|
||||
> Customize a bulletin to show a table of self-selected metrics for some kind of monitoring.
|
||||
|
||||
## Add Bulletin Item
|
||||
|
||||
1. Click the `New` button in the toolbar to open the bulletin creation dialog.
|
||||
|
||||
2. Enter the `Bulletin Name`, select the `Monitor Type`, and then select the associated `Monitor Task Name`.
|
||||
|
||||
- The `Monitor Task Name` is a multi-select field. Type in its search box to filter monitors by **name, label key, or label value**; each option also shows its labels as `key:value` tags.
|
||||
|
||||
3. In the `Monitor Metrics` tree, check the metrics you want to show. The tree is grouped by metric, and checking a parent node selects all of its fields at once.
|
||||
|
||||
4. Click the `OK` button to finish creating the customized bulletin.
|
||||
|
||||

|
||||
|
||||
## Edit Bulletin Item
|
||||
|
||||
1. Click a bulletin name in the tab bar to make it the current bulletin.
|
||||
|
||||
2. Click the `...` (more) button in the toolbar and choose `Edit`. The dialog opens pre-filled with the current bulletin's name, monitor tasks, and selected metrics.
|
||||
|
||||
- The `Monitor Type` cannot be changed while editing. To use a different monitor type, create a new bulletin instead.
|
||||
|
||||
3. Adjust the name, monitor tasks, or metrics as needed, then click `OK` to save.
|
||||
|
||||

|
||||
|
||||
## Viewing Multiple Bulletins
|
||||
|
||||
1. Each bulletin appears as a tab. Click the name of a bulletin in the tab bar to view its details.
|
||||
|
||||

|
||||
|
||||
## Deleting Bulletins
|
||||
|
||||
1. Select the bulletin you want to remove, click the `...` (more) button in the toolbar, and choose `Delete Bulletin` to delete the current bulletin.
|
||||
|
||||
2. Choose `Batch Delete Bulletin` from the same `...` menu to select and delete multiple bulletins at once.
|
||||
|
||||

|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
id: centos
|
||||
title: CentOS operating system monitoring
|
||||
sidebar_label: CentOS operating system
|
||||
keywords: [open source monitoring tool, open source os monitoring tool, monitoring CentOS operating system metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of CentOS operating system.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | None | Number of context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used for cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | None | Total number of disks |
|
||||
| partition_num | None | Total number of partitions |
|
||||
| block_write | None | Total number of blocks written to disk |
|
||||
| block_read | None | Total number of blocks read from disk |
|
||||
| write_rate | iops | Disk block write rate per second |
|
||||
|
||||
#### Metric Set: Network Card Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network card name |
|
||||
| receive_bytes | Byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | Byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | Name of the file system |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Usage rate |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
id: clickhouse
|
||||
title: Monitoring ClickHouse Database
|
||||
sidebar_label: ClickHouse Database
|
||||
keywords: [open source monitoring system, open source database monitoring, ClickHouse database monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for the ClickHouse database.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | IP address, IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ without protocol prefix (e.g., https://, http://). |
|
||||
| Task Name | Name identifying this monitoring, ensuring uniqueness. |
|
||||
| Port | Port number of the database exposed to the outside, default is 8123. |
|
||||
| Query Timeout | Timeout for SQL queries to respond, in milliseconds (ms), default is 6000ms. |
|
||||
| Database Name | Name of the database instance, optional. |
|
||||
| Username | Username for database connection, optional. |
|
||||
| Password | Password for database connection, optional. |
|
||||
| Collection Interval | Interval for periodic data collection during monitoring, in seconds, with a minimum interval of 30 seconds. |
|
||||
| Tag Binding | Used for categorizing and managing monitored resources. |
|
||||
| Description | Additional information to identify and describe this monitoring, where users can add remarks. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: ping Availability
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|--------------|-------------|--------------------|
|
||||
| responseTime | N/A | Response time |
|
||||
|
||||
#### Metric Set: Data from system.metrics table
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|----------------------|-------------|----------------------------------------------------------|
|
||||
| Query | N/A | Number of queries being executed |
|
||||
| Merge | N/A | Number of background merges being executed |
|
||||
| Move | N/A | Number of background moves being executed |
|
||||
| PartMutation | N/A | Number of table mutations |
|
||||
| ReplicatedFetch | N/A | Number of data blocks fetched from replicas |
|
||||
| ReplicatedSend | N/A | Number of data blocks sent to replicas |
|
||||
| ReplicatedChecks | N/A | Number of consistency checks on data blocks |
|
||||
| QueryPreempted | N/A | Number of queries stopped or waiting |
|
||||
| TCPConnection | N/A | Number of TCP connections |
|
||||
| HTTPConnection | N/A | Number of HTTP connections |
|
||||
| OpenFileForRead | N/A | Number of open readable files |
|
||||
| OpenFileForWrite | N/A | Number of open writable files |
|
||||
| QueryThread | N/A | Number of threads processing queries |
|
||||
| ReadonlyReplica | N/A | Number of Replicated tables in read-only state |
|
||||
| EphemeralNode | N/A | Number of ephemeral nodes in ZooKeeper |
|
||||
| ZooKeeperWatch | N/A | Number of ZooKeeper event subscriptions |
|
||||
| StorageBufferBytes | Bytes | Bytes in Buffer tables |
|
||||
| VersionInteger | N/A | ClickHouse version number |
|
||||
| RWLockWaitingReaders | N/A | Number of threads waiting for read-write lock on a table |
|
||||
| RWLockWaitingWriters | N/A | Number of threads waiting for write lock on a table |
|
||||
| RWLockActiveReaders | N/A | Number of threads holding read lock on a table |
|
||||
| RWLockActiveWriters | N/A | Number of threads holding write lock on a table |
|
||||
| GlobalThread | N/A | Number of threads in global thread pool |
|
||||
| GlobalThreadActive | N/A | Number of active threads in global thread pool |
|
||||
| LocalThread | N/A | Number of threads in local thread pool |
|
||||
| LocalThreadActive | N/A | Number of active threads in local thread pool |
|
||||
|
||||
#### Metric Set: Data from system.events table
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Query | N/A | Number of queries to parse and possibly execute. Excludes queries rejected due to AST size limits, quota limits, or simultaneous query limits. May include internal queries initiated by ClickHouse. Subqueries are not counted. |
|
||||
| SelectQuery | N/A | Number of Select queries possibly executed |
|
||||
| InsertQuery | N/A | Number of Insert queries possibly executed |
|
||||
| InsertedRows | N/A | Number of rows inserted into all tables |
|
||||
| InsertedBytes | Bytes | Number of bytes inserted into all tables |
|
||||
| FailedQuery | N/A | Number of failed queries |
|
||||
| FailedSelectQuery | N/A | Number of failed Select queries |
|
||||
| FileOpen | N/A | Number of file openings |
|
||||
| MergeTreeDataWriterRows | N/A | Number of data rows written to MergeTree tables |
|
||||
| MergeTreeDataWriterCompressedBytes | Bytes | Number of compressed data bytes written to MergeTree tables |
|
||||
|
||||
#### Metric Set: Data from system.asynchronous_metrics table
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|------------------------------------------|-------------|-------------------------------------------------------|
|
||||
| AsynchronousMetricsCalculationTimeSpent | N/A | Time spent calculating asynchronous metrics (seconds) |
|
||||
| jemalloc.arenas.all.muzzy_purged | N/A | Number of purged muzzy pages |
|
||||
| jemalloc.arenas.all.dirty_purged | N/A | Number of purged dirty pages |
|
||||
| BlockReadBytes_ram1 | N/A | Number of bytes read from ram1 block |
|
||||
| jemalloc.background_thread.run_intervals | N/A | Number of intervals jemalloc background thread ran |
|
||||
| BlockQueueTime_nbd13 | N/A | Queue wait time for nbd13 block |
|
||||
| jemalloc.background_thread.num_threads | N/A | Number of jemalloc background threads |
|
||||
| jemalloc.resident | N/A | Physical memory size allocated by jemalloc (bytes) |
|
||||
| InterserverThreads | N/A | Number of Interserver threads |
|
||||
| BlockWriteMerges_nbd7 | N/A | Number of block write merges for nbd7 block |
|
||||
| MarkCacheBytes | N/A | Size of marks cache in StorageMergeTree |
|
||||
| MarkCacheFiles | N/A | Number of files in marks cache for StorageMergeTree |
|
||||
| MaxPartCountForPartition | N/A | Maximum active data blocks in partitions |
|
||||
@@ -0,0 +1,131 @@
|
||||
---
|
||||
id: collector
|
||||
title: HertzBeat Collector
|
||||
sidebar_label: Collector
|
||||
keywords: [monitoring, observability, collector, metrics]
|
||||
---
|
||||
|
||||
> HertzBeat Collector is a lightweight data collection module that enables metrics collection, high availability deployments, and cloud-edge collaboration in Apache HertzBeat.
|
||||
|
||||
## Introduction
|
||||
|
||||
HertzBeat Collector is a versatile and lightweight metrics collection module within the Apache HertzBeat™ monitoring system. It's designed to gather monitoring data from various targets and send the collected metrics to the main HertzBeat server for processing, alerting, and visualization.
|
||||
|
||||
With the collector module, you can implement:
|
||||
|
||||
- **High Availability**: Deploy multiple collectors to ensure continuous monitoring even if some collector instances fail
|
||||
- **Load Balancing**: Distribute monitoring tasks across multiple collectors to improve performance
|
||||
- **Cloud-Edge Collaboration**: Monitor resources in isolated networks while managing everything from a central HertzBeat server
|
||||
|
||||
## Collector Architecture
|
||||
|
||||
The collector module is built with a modular design to make it easily extensible for various monitoring scenarios. The architecture consists of:
|
||||
|
||||
1. **Collector Entry Point**: The main entry point for running the collector module, from which collection tasks are executed after startup.
|
||||
|
||||
2. **collector-basic**: Contains implementations for common protocols like HTTP, JDBC, SSH, SNMP, etc. These collectors typically don't require additional proprietary dependencies and can handle most basic monitoring needs.
|
||||
|
||||
3. **collector-common**: Provides general utility classes and methods, such as connection pools and caching mechanisms that other modules can reuse.
|
||||
|
||||
4. **collector-xxx**: Extension modules for specific services or protocols (MongoDB, RocketMQ, Kafka, NebulaGraph, etc.). These modules often require specific dependencies for their respective services.
|
||||
|
||||
## Supported Protocols
|
||||
|
||||
HertzBeat Collector supports an extensive list of monitoring protocols:
|
||||
|
||||
| Protocol Category | Protocols |
|
||||
| ----------------- | ------------------------------------------------------------------------------------- |
|
||||
| Web/API | `http`, `ssl_cert`, `websocket` |
|
||||
| Databases | `jdbc`, `redis`, `mongodb`, `memcached` |
|
||||
| Operating Systems | `ssh`, `ipmi` |
|
||||
| Network | `icmp` (ping), `telnet`, `snmp`, `modbus` |
|
||||
| Messaging | `mqtt`, `rocketmq`, `kafka` |
|
||||
| Email | `pop3`, `smtp`, `imap` |
|
||||
| Cloud Services | `prometheus`, `nebulagraph`, `ngql` |
|
||||
| Others | `jmx`, `dns`, `ftp`, `ntp`, `udp`, `nginx`, `redfish`, `script`, `registry`, `httpsd` |
|
||||
|
||||
## Deployment Options
|
||||
|
||||
You can deploy HertzBeat Collector in several ways depending on your environment and needs, once you log in to the HertzBeat web interface and go to the collector, you can see the deployment options.
|
||||
|
||||
Parameters explanation:
|
||||
|
||||
- `-e IDENTITY=custom-collector-name`: (Optional) Set a unique identifier for this collector. Must be unique across all collectors.
|
||||
- `-e MODE=public`: Set the running mode (public or private), for public cluster or private cloud-edge mode.
|
||||
- `-e MANAGER_HOST=192.168.1.100`: Important! Set the IP address of the main HertzBeat server. Replace with your actual server IP.
|
||||
- `-e MANAGER_PORT=1158`: (Optional) Set the port of the main HertzBeat server, default is 1158.
|
||||
- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs`: (Optional) Mount the log files to the local host.
|
||||
|
||||
## Operating Modes
|
||||
|
||||
HertzBeat Collector supports two operating modes:
|
||||
|
||||
### Public Mode (Cluster Mode)
|
||||
|
||||
In public mode, collectors form a cluster with the main HertzBeat server. Tasks are automatically distributed among collectors, providing high availability and load balancing.
|
||||
|
||||
- Set `MODE=public` when deploying the collector
|
||||
- All collectors must have connectivity to the main HertzBeat server
|
||||
- Great for horizontal scaling to handle large numbers of monitoring tasks
|
||||
|
||||
### Private Mode (Cloud-Edge Mode)
|
||||
|
||||
In private mode, collectors operate in isolated networks while still reporting to a central HertzBeat server. This allows monitoring of resources in multiple separate networks.
|
||||
|
||||
- Set `MODE=private` when deploying the collector
|
||||
- Collectors need outbound connectivity to the HertzBeat server, but inbound connectivity is not required
|
||||
- Ideal for monitoring resources across different data centers, cloud providers, or network segments
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| -------------- | ----------------------------------- | ------------------------- |
|
||||
| `identity` | Unique identifier for the collector | Auto-generated if not set |
|
||||
| `mode` | Operating mode (public/private) | public |
|
||||
| `manager-host` | IP address of the HertzBeat server | IP |
|
||||
| `manager-port` | Port of the HertzBeat server | 1158 |
|
||||
|
||||
## Collector Management
|
||||
|
||||
You can manage collectors through the HertzBeat web interface:
|
||||
|
||||
1. Navigate to the Overview page to see all registered collectors
|
||||
2. Monitor collector status (online/offline), metrics tasks, and system information
|
||||
3. Enable or disable collectors as needed
|
||||
|
||||
## High Availability Setup
|
||||
|
||||
To achieve high availability with HertzBeat collectors:
|
||||
|
||||
1. Deploy multiple collector instances across different servers or containers
|
||||
2. Ensure all collectors have the same `mode` setting
|
||||
3. Connect all collectors to the same HertzBeat server
|
||||
4. HertzBeat will automatically distribute monitoring tasks and handle failover
|
||||
|
||||
If a collector goes offline, its tasks will be reassigned to other available collectors. When the collector comes back online, it will receive new tasks based on the current load distribution.
|
||||
|
||||
## Cloud-Edge Collaboration
|
||||
|
||||
For monitoring across isolated networks:
|
||||
|
||||
1. Deploy HertzBeat Server in your central management network
|
||||
2. Deploy collectors in each isolated network you need to monitor
|
||||
3. Configure collectors with:
|
||||
- `MODE=private`
|
||||
- `MANAGER_HOST=` pointing to your central HertzBeat server
|
||||
4. Ensure outbound connectivity from each isolated network to the central server
|
||||
5. Manage all monitoring tasks from the central HertzBeat dashboard
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Custom Protocol Support
|
||||
|
||||
HertzBeat's architecture allows for extending the collector with custom protocols. Developers can create new collector modules following the project's modular design.
|
||||
|
||||
### Task Scheduling
|
||||
|
||||
The collector automatically handles task scheduling based on task priority, available resources, and current system load. Tasks are processed with intelligent prioritization to ensure critical monitoring is performed first.
|
||||
|
||||
### Resource Utilization
|
||||
|
||||
Collectors are designed to be lightweight and efficient with system resources, making them suitable for deployment on various hardware, from small edge devices to powerful servers.
|
||||
@@ -0,0 +1,108 @@
|
||||
---
|
||||
id: consul_sd
|
||||
title: Monitoring Consul Service Discovery
|
||||
sidebar_label: Consul Service Discovery
|
||||
keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring Consul service discovery]
|
||||
---
|
||||
|
||||
> HertzBeat integrates with Consul registry to automatically discover service instances and create monitoring tasks for them.
|
||||
|
||||
## Overview
|
||||
|
||||
Consul Service Discovery allows HertzBeat to connect to your Consul server and automatically discover all registered service instances. When a new service instance is registered or an existing instance goes offline, HertzBeat will automatically create or delete corresponding monitoring tasks, achieving automated monitoring in microservice environments.
|
||||
|
||||
### PreRequisites
|
||||
|
||||
#### Deploy Consul Server
|
||||
|
||||
1. Deploy Consul server according to [Consul official documentation](https://developer.hashicorp.com/consul/docs/fundamentals/install).
|
||||
2. Ensure Consul server is accessible from HertzBeat.
|
||||
3. Verify that you can access Consul UI at `http://your-consul-server:8500/ui/`
|
||||
4. Ensure the Consul HTTP API is accessible (default port: 8500)
|
||||
|
||||
### Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Name | Identify the name of this monitoring. The name needs to be unique. |
|
||||
| Consul Host | Consul server IP address or domain name. Note⚠️Without protocol header (eg: https://, http://). Example: `consul-server` or `192.168.1.100` |
|
||||
| Consul Port | Port provided by the Consul server. The default is 8500 |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here. |
|
||||
|
||||
### Usage Steps
|
||||
|
||||
1. **Create Service Discovery Monitoring**
|
||||
- In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring**
|
||||
- Select monitoring type: **Consul Service Discovery**
|
||||
- Fill in the basic configuration parameters
|
||||
|
||||
2. **Configure Monitoring Template**
|
||||
- After creating the service discovery monitoring, you need to specify a monitoring template
|
||||
- The template defines what type of monitoring to create for discovered service instances
|
||||
- For example: If discovered instances are HTTP services, you can select HTTP monitoring template
|
||||
- Common template types: Port, HTTP, HTTPS, Ping, etc.
|
||||
|
||||
3. **Automatic Discovery**
|
||||
- HertzBeat will periodically query Consul server based on the collection interval
|
||||
- Automatically create monitoring tasks for newly registered service instances
|
||||
- Automatically delete monitoring tasks for offline service instances
|
||||
|
||||
4. **View Discovered Instances**
|
||||
- In the monitoring list, you can see all automatically created sub-monitoring tasks
|
||||
- Each sub-monitoring task corresponds to a discovered service instance
|
||||
|
||||
### Example of usage
|
||||
|
||||
Suppose your Consul server is running at `192.168.1.100:8500`, and you want to automatically monitor all service instances registered in it.
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **Target Name**: `Consul-Service-Discovery`
|
||||
- **Consul Host**: `192.168.1.100`
|
||||
- **Consul Port**: `8500`
|
||||
- **Collection interval**: `60` seconds
|
||||
- **Monitoring Template**: Select `Port` monitoring (to detect instance availability)
|
||||
|
||||
After configuration:
|
||||
|
||||
1. HertzBeat connects to Consul server via HTTP API
|
||||
2. Retrieves all registered service instances
|
||||
3. Automatically creates Port monitoring for each instance (e.g., `api-service-192.168.1.101:8080`)
|
||||
4. Every 60 seconds, checks for newly registered or offline services and updates monitoring tasks accordingly
|
||||
|
||||
### Notes
|
||||
|
||||
- **Network Connectivity**: Ensure HertzBeat can access the Consul server address and port (default: 8500)
|
||||
- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances
|
||||
- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive requests to Consul server
|
||||
- **ACL Token**: If Consul is configured with ACL (Access Control List), you may need to configure the appropriate token
|
||||
- **Service Health**: Consul service discovery will discover both healthy and unhealthy instances
|
||||
- **Datacenter**: By default, discovers services in the local datacenter. If you need to discover services in a specific datacenter, additional configuration may be required
|
||||
- **Instance Naming**: Automatically created monitoring tasks are named in the format: `{ServiceName}-{Host}:{Port}`
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set: Monitor Target
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------|-------------|--------------------------------------------|
|
||||
| target | none | Discovered service instance target |
|
||||
| host | none | Service instance host address |
|
||||
| port | none | Service instance port number |
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Microservice Architecture**: Automatically monitor all microservice instances registered in Consul
|
||||
- **Service Mesh**: Monitor services using Consul Connect service mesh
|
||||
- **Multi-Datacenter**: Monitor service instances across multiple Consul datacenters
|
||||
- **Dynamic Scaling**: Automatically adapt to service instances added/removed due to autoscaling
|
||||
- **Health Check**: Combine with Consul's health check mechanism to monitor service health status
|
||||
- **Service Governance**: Centrally manage monitoring of all services in the Consul service ecosystem
|
||||
|
||||
### Integration with Consul Features
|
||||
|
||||
- **Service Health**: Consul service discovery can leverage Consul's health check information
|
||||
- **Service Tags**: Service instances discovered from Consul may include tag information
|
||||
- **KV Storage**: Can be used in conjunction with Consul KV storage to achieve more flexible service discovery
|
||||
- **Service Mesh**: Supports service discovery in Consul Connect service mesh environment
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
id: dahua
|
||||
title: Monitor Dahua Devices
|
||||
sidebar_label: Dahua
|
||||
keywords: [ monitor, dahua ]
|
||||
---
|
||||
|
||||
> Monitor Dahua devices through HTTP interface to collect health data.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Parameter | Description |
|
||||
| ----------- | ----------- |
|
||||
| Host | Target IP/Domain |
|
||||
| Name | Unique monitor name |
|
||||
| Port | Network port (default 80) |
|
||||
| Timeout | Request timeout in ms |
|
||||
| Username | Device username |
|
||||
| Password | Device password |
|
||||
| SSL | Enable HTTPS |
|
||||
| Interval | Collection interval (≥30s) |
|
||||
|
||||
## Metrics
|
||||
|
||||
### Network Info
|
||||
|
||||
- Default Interface
|
||||
- Domain Name
|
||||
- Hostname
|
||||
- eth0 IP Address
|
||||
- eth0 Gateway
|
||||
- eth0 MAC
|
||||
- eth0 Subnet Mask
|
||||
- eth0 MTU
|
||||
- DNS Servers
|
||||
|
||||
### User Info
|
||||
|
||||
- Client Address
|
||||
- Username
|
||||
- Login Type
|
||||
- Login Time
|
||||
|
||||
### NTP Info
|
||||
|
||||
- NTP Server
|
||||
- NTP Port
|
||||
- Sync Interval
|
||||
|
||||
## Implementation
|
||||
|
||||
Access device APIs via:
|
||||
|
||||
1. Network: `/cgi-bin/configManager.cgi?action=getConfig&name=Network`
|
||||
|
||||
2. Users: `/cgi-bin/userManager.cgi?action=getActiveUserInfoAll`
|
||||
|
||||
3. NTP: `/cgi-bin/configManager.cgi?action=getConfig&name=NTP`
|
||||
|
||||
Using Digest Auth and parsing config format responses.
|
||||
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: darwin
|
||||
title: darwin operating system monitoring
|
||||
sidebar_label: darwin operating system
|
||||
keywords: [open source monitoring tool, open source os monitoring tool, monitoring darwin operating system metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of darwin operating system.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | None | Number of context switches |
|
||||
| usage | % | CPU usage (to be fixed) |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used for cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information - to be finished
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | None | Total number of disks |
|
||||
| partition_num | None | Total number of partitions |
|
||||
|
||||
#### Metric Set: Network Card Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network card name |
|
||||
| receive_bytes | Byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | Byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | Name of the file system |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Usage rate |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
id: db2
|
||||
title: Monitoring:DB2 database monitoring
|
||||
sidebar_label: DB2 Database
|
||||
keywords: [ open source monitoring tool, open source database monitoring tool, monitoring DB2 database metrics ]
|
||||
---
|
||||
|
||||
|
||||
> Collect and monitor general performance metrics (tablespace, session status, process count, locks, slow queries, etc.)
|
||||
> for DB2 databases.
|
||||
|
||||
## Note: DB2 JDBC Driver JAR Must be Added
|
||||
|
||||
- Download the DB2 JDBC driver JAR package, for
|
||||
example, [jcc.jar](https://repo1.maven.org/maven2/com/ibm/db2/jcc/11.5.9.0/jcc-11.5.9.0.jar).
|
||||
- Copy the JAR package to the `hertzbeat/ext-lib` directory.
|
||||
- Restart the HertzBeat service.
|
||||
|
||||
:::important Collector package selection
|
||||
DB2 monitoring requires external JDBC driver loading from `ext-lib`.
|
||||
|
||||
- Use HertzBeat server built-in collector or the JVM collector package for DB2 monitoring
|
||||
- Do not use the native collector package for DB2 monitoring
|
||||
:::
|
||||
|
||||
### Configuration Parameters
|
||||
|
||||
The following are the required configuration parameters for DB2 monitoring:
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|:---------------------|:---------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **Target Host** | The IPv4, IPv6, or domain name of the monitored DB2 database server. |
|
||||
| **Port** | The port provided by the DB2 database, default is `50000`. |
|
||||
| **Database Name** | The name of the DB2 database to connect to. |
|
||||
| **Username** | The username for the database connection. |
|
||||
| **Password** | The password for the database connection. |
|
||||
| **Query Timeout** | Sets the timeout for when an SQL query does not return data, in milliseconds (ms), default is `6000`. |
|
||||
| **Reuse Connection** | Whether to reuse the database connection, boolean value, default is `true`. |
|
||||
| **URL** | The database connection URL, optional. If configured, it will override the database name, username, and password parameters set above. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: Basic Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|:-------------------|:------------|:------------------------|
|
||||
| `database_version` | None | Database Version. |
|
||||
| `instance_name` | None | Database Instance Name. |
|
||||
| `status` | None | Instance Status. |
|
||||
| `num_db` | None | Number of Databases. |
|
||||
|
||||
#### Metric Set: Tablespace Usage
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|:------------------|:---------------|:-------------------|
|
||||
| `tablespace_name` | None | Tablespace Name. |
|
||||
| `status` | None | Type. |
|
||||
| `total` | MB | Total Size. |
|
||||
| `used` | MB | Used Size. |
|
||||
| `free` | MB | Free Size. |
|
||||
| `used_percentage` | Percentage (%) | Used Percentage. |
|
||||
|
||||
#### Metric Set: Session Status
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|:--------------|:------------|:----------------------------------|
|
||||
| `status_type` | None | Session Status Type. |
|
||||
| `count` | None | Count of sessions in that status. |
|
||||
|
||||
#### Metric Set: Application Process Count
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|:----------------|:------------|:-----------------------------------------------------------------------------------|
|
||||
| `process_count` | None | Total number of application processes/sessions. |
|
||||
|
||||
#### Metric Set: Locks
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|:----------------|:------------|:-----------------------------------|
|
||||
| `waiting_locks` | None | Number of currently waiting locks. |
|
||||
|
||||
#### Metric Set: Slow Query
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|:---------------|:------------|:----------------------------|
|
||||
| `avg_exe_time` | ms | Average Execution Time. |
|
||||
| `sql_text` | None | SQL Text of the slow query. |
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
id: debian
|
||||
title: Monitoring Debian System
|
||||
sidebar_label: Debian
|
||||
keywords: [Open Source Monitoring System, Operating System Monitoring, Debian Monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics of the Debian system.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | None | Number of context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used for cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | None | Total number of disks |
|
||||
| partition_num | None | Total number of partitions |
|
||||
| block_write | None | Total number of blocks written to disk |
|
||||
| block_read | None | Total number of blocks read from disk |
|
||||
| write_rate | iops | Disk block write rate per second |
|
||||
|
||||
#### Metric Set: Network Card Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network card name |
|
||||
| receive_bytes | Byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | Byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | Name of the file system |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Usage rate |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
id: deepseek
|
||||
title: Monitoring Deepseek Account Status
|
||||
sidebar_label: Deepseek Account Status
|
||||
keywords: [Open Source Monitoring System, Open Source Network Monitoring, Deepseek Account Monitoring]
|
||||
---
|
||||
|
||||
## Preparation
|
||||
|
||||
### Obtain Session Key
|
||||
|
||||
Log in to the Deepseek backend and visit the `https://platform.deepseek.com/api_keys` page to obtain the session key.
|
||||
|
||||
### Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
| ------------- | --------------------- |
|
||||
| Monitoring Host | Enter `api.deepseek.com` here. |
|
||||
| Task Name | The name that identifies this monitoring task, which must be unique. |
|
||||
| Session Key | The session key obtained in the preparation step. |
|
||||
| Collector | Configure which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Interval | The interval for periodically collecting data, in seconds. The minimum interval that can be set is 30 seconds. |
|
||||
| Bound Tags | Tags for categorizing and managing monitoring resources. |
|
||||
| Description/Remarks | Additional remarks to identify and describe this monitoring. Users can add notes here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metric Set: Billing
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
| ---------- | ---------- | ----------------- |
|
||||
| Currency | None | Currency, either RMB or USD. |
|
||||
| Available Balance | RMB/USD | Total available balance, including bonus and recharge balance. |
|
||||
| Unexpired Bonus Balance | RMB/USD | Unexpired bonus balance. |
|
||||
| Recharge Balance | RMB/USD | Recharge balance. |
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
id: dm
|
||||
title: Monitoring DM database
|
||||
sidebar_label: DM Database
|
||||
keywords: [open source monitoring tool, open source database monitoring tool, monitoring DM database metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance metrics of the DM database. DM8+ is supported.
|
||||
|
||||
## Configuration parameters
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | Monitored peer IPV4, IPV6 or domain name. Note ⚠️ without protocol headers (eg: https://, http://). |
|
||||
| Monitor Name | Identifies the name of this monitor. The name needs to be unique. |
|
||||
| Port | The port provided by the database externally, the default is 5236. |
|
||||
| Query Timeout | Set the timeout when the SQL query does not respond to data, in ms milliseconds, the default is 3000 milliseconds. |
|
||||
| database name | database instance name, optional. |
|
||||
| username | database connection username, optional |
|
||||
| password | database connection password, optional |
|
||||
| URL | Database connection URL, optional |
|
||||
| Collection Interval | Monitor periodical collection data interval, in seconds, the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and then continue to add and modify operations if the detection is successful |
|
||||
| Description Remarks | More remarks that identify and describe this monitoring, users can remark information here |
|
||||
|
||||
### Collect metrics
|
||||
|
||||
#### Metric collection: basic
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|--------------|-------------|-------------------------------|
|
||||
| PORT_NUM | None | Database exposed service port |
|
||||
| CTL_PATH | None | Control File Path |
|
||||
| MAX_SESSIONS | None | Maximum database connections |
|
||||
|
||||
#### Metric collection: status
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|----------------------------------|
|
||||
| status$ | None | Open/Close status of DM database |
|
||||
|
||||
#### Metric collection: thread
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------------------------------------------|
|
||||
| dm_sql_thd | None | Thread for writing dmsql dmserver |
|
||||
| dm_io_thd | None | IO threads, controlled by IO_THR_GROUPS parameter, default is 2 threads |
|
||||
| dm_quit_thd | None | Thread used to perform a graceful shutdown of the database |
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
id: dns
|
||||
title: Monitoring DNS
|
||||
sidebar_label: DNS Monitor
|
||||
keywords: [ open source monitoring tool, open source DNS monitoring tool, monitoring DNS metrics ]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of DNS.
|
||||
|
||||
**Protocol Use:DNS**
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | Monitored IPV4, IPV6. Note⚠️Without protocol header (eg: https://, http://). |
|
||||
| Monitoring name | Identify the name of this monitoring. The name needs to be unique. |
|
||||
| Monitoring port | The port for DNS service provided to the outside,default is 53. |
|
||||
| Address For DNS | The address for domain name resolution. |
|
||||
| Connect Timeout | Set the timeout for connecting to the DNS server, default is 6000 milliseconds. |
|
||||
| Record Type | The type of DNS record to query. Optional values include `A`, `AAAA`, `MX`, `NS`, `SRV`, and `ANY`. |
|
||||
| Query Class | Resource class for DNS query. Optional values include `IN`, `CHAOS`, `HESIOD`, `NONE`, and `ANY`,default is IN. |
|
||||
| Use TCP Protocol | DNS queries use the TCP protocol. |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. |
|
||||
| Bind Tags | Used to classify and manage monitoring resources. |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metrics Set:Header
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------------------|-------------|---------------------------------------------------|
|
||||
| Response Time | ms | Time taken for DNS server to respond to requests. |
|
||||
| Opcode | none | Type of the current message. |
|
||||
| Response Status | none | Status code of the response. |
|
||||
| Response Flags | none | Response flags. |
|
||||
| Question Record Count | none | Number of question records. |
|
||||
| Answer Record Count | none | Number of answer records. |
|
||||
| Authority Record Count | none | Number of authoritative resource records. |
|
||||
| Additional Record Count | none | Number of additional resource records. |
|
||||
|
||||
### Metrics Set: Question
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Section | none | Question record information, including the queried domain name, resource type, resource record class, and additional information. |
|
||||
|
||||
### Metrics Set: Answer
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| Section0 | none | Answer record information, including the queried domain name, TTL, resource record class, resource type, and query result. |
|
||||
|
||||
> The metric set collects up to 10 records, with metric names from Section0 to Section9.
|
||||
|
||||
### Metrics Set: Authority
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Section0 | none | SOA (Start of Authority) record for the domain name, including queried domain name, TTL, resource type, resource record class, and other information. |
|
||||
|
||||
> The metric set collects up to 10 records, with metric names from Section0 to Section9.
|
||||
|
||||
### Metrics Set: Additional
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-----------------------------------------|
|
||||
| Section0 | none | Additional information for DNS queries. |
|
||||
|
||||
> The metric set collects up to 10 records, with metric names from Section0 to Section9.
|
||||
@@ -0,0 +1,223 @@
|
||||
---
|
||||
id: dns_sd
|
||||
title: Monitoring DNS Service Discovery
|
||||
sidebar_label: DNS Service Discovery
|
||||
keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring DNS service discovery]
|
||||
---
|
||||
|
||||
> HertzBeat integrates with DNS service to automatically discover service instances through DNS records and create monitoring tasks for them.
|
||||
|
||||
## Overview
|
||||
|
||||
DNS Service Discovery allows HertzBeat to discover service instances by querying DNS records. This is a simple and reliable service discovery method that utilizes standard DNS infrastructure to find service instances. It is particularly suitable for environments using DNS SRV records or environments that need to discover services through DNS.
|
||||
|
||||
### PreRequisites
|
||||
|
||||
#### Configure DNS Records
|
||||
|
||||
Ensure your DNS server has properly configured service discovery records. Different record types have different formats:
|
||||
|
||||
1. **SRV Records**: Used for service discovery, containing service host and port information
|
||||
2. **A Records**: Return IPv4 addresses
|
||||
3. **AAAA Records**: Return IPv6 addresses
|
||||
4. **MX Records**: Mail server records
|
||||
5. **NS Records**: Name server records
|
||||
|
||||
### Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Name | Identify the name of this monitoring. The name needs to be unique. |
|
||||
| DNS Host | DNS server address. Example: `8.8.8.8` or `192.168.1.1` |
|
||||
| DNS Port | DNS server port. The default is 53 |
|
||||
| Record Type | Type of DNS record to query. Options: `SRV`, `A`, `AAAA`, `MX`, `NS` |
|
||||
| Record Name | Name of the DNS record to query. Example: `_http._tcp.example.com` for SRV records |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here. |
|
||||
|
||||
### Usage Steps
|
||||
|
||||
1. **Create Service Discovery Monitoring**
|
||||
- In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring**
|
||||
- Select monitoring type: **DNS Service Discovery**
|
||||
- Fill in the basic configuration parameters
|
||||
|
||||
2. **Configure Monitoring Template**
|
||||
- After creating the service discovery monitoring, you need to specify a monitoring template
|
||||
- The template defines what type of monitoring to create for discovered service instances
|
||||
- For SRV records, commonly used templates include Port, HTTP, etc.
|
||||
- For A/AAAA records, Ping or Port monitoring can be used
|
||||
|
||||
3. **Automatic Discovery**
|
||||
- HertzBeat will periodically query the DNS server based on the collection interval
|
||||
- Automatically create monitoring tasks for newly discovered service instances
|
||||
- Automatically delete monitoring tasks for disappeared service instances
|
||||
|
||||
4. **View Discovered Instances**
|
||||
- In the monitoring list, you can see all automatically created sub-monitoring tasks
|
||||
- Each sub-monitoring task corresponds to a discovered service instance
|
||||
|
||||
### Example of usage
|
||||
|
||||
#### Example 1: SRV Record Discovery
|
||||
|
||||
Suppose you have an SRV record for your web service:
|
||||
|
||||
- **SRV Record**: `_http._tcp.example.com`
|
||||
- **DNS Server**: `8.8.8.8`
|
||||
- **Expected discovery**: Automatically discover all HTTP service instances
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **Target Name**: `DNS-SRV-Discovery`
|
||||
- **DNS Host**: `8.8.8.8`
|
||||
- **DNS Port**: `53`
|
||||
- **Record Type**: Select `SRV`
|
||||
- **Record Name**: `_http._tcp.example.com`
|
||||
- **Collection interval**: `60` seconds
|
||||
- **Monitoring Template**: Select `Port` monitoring (using the port from SRV record)
|
||||
|
||||
After configuration:
|
||||
|
||||
1. HertzBeat queries the SRV record for `_http._tcp.example.com`
|
||||
2. Extracts host and port information from the SRV record response
|
||||
3. Automatically creates Port monitoring for each service instance
|
||||
|
||||
#### Example 2: A Record Discovery
|
||||
|
||||
Discover service instances through A records:
|
||||
|
||||
- **A Record**: `services.example.com`
|
||||
- This domain may resolve to multiple IP addresses
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **DNS Host**: `192.168.1.1` (Internal DNS server)
|
||||
- **DNS Port**: `53`
|
||||
- **Record Type**: Select `A`
|
||||
- **Record Name**: `services.example.com`
|
||||
- **Monitoring Template**: Select `Ping` or `Port` monitoring
|
||||
|
||||
#### Example 3: MX Record Discovery
|
||||
|
||||
Discover mail servers through MX records:
|
||||
|
||||
- **DNS Host**: `8.8.8.8`
|
||||
- **Record Type**: Select `MX`
|
||||
- **Record Name**: `example.com`
|
||||
- **Monitoring Template**: Select `Port` monitoring (port 25)
|
||||
|
||||
### DNS Record Types
|
||||
|
||||
#### SRV Records (Recommended)
|
||||
|
||||
SRV records are the most commonly used record type for service discovery, containing service name, port number, and priority information.
|
||||
|
||||
Format: `_service._protocol.example.com`
|
||||
|
||||
Example: `_http._tcp.example.com`
|
||||
|
||||
Typical SRV record response contains:
|
||||
|
||||
- Target domain name
|
||||
- Port number
|
||||
- Priority and weight
|
||||
|
||||
#### A Records
|
||||
|
||||
A records map domain names to IPv4 addresses. If a domain name resolves to multiple IPs, all IPs can be discovered.
|
||||
|
||||
Example: `services.example.com` → `192.168.1.10`, `192.168.1.11`, `192.168.1.12`
|
||||
|
||||
#### AAAA Records
|
||||
|
||||
AAAA records map domain names to IPv6 addresses.
|
||||
|
||||
Example: `services.example.com` → `2001:db8::1`
|
||||
|
||||
#### MX Records
|
||||
|
||||
MX records specify mail servers for a domain and include priority information.
|
||||
|
||||
Example: `example.com` → `mail.example.com`
|
||||
|
||||
#### NS Records
|
||||
|
||||
NS records specify name servers for a domain.
|
||||
|
||||
Example: `example.com` → `ns1.example.com`
|
||||
|
||||
### Notes
|
||||
|
||||
- **DNS Server**: Ensure the specified DNS server is accessible and contains the service discovery records
|
||||
- **Record Name**: Record name must be accurate, including the service and protocol prefix for SRV records
|
||||
- **Port Information**:
|
||||
- SRV records contain port information
|
||||
- A/AAAA records do not contain port information; a default port needs to be specified in the monitoring template
|
||||
- **Monitoring Templates**: Service discovery only discovers service instance addresses; you need to configure appropriate monitoring templates to actually monitor the instances
|
||||
- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive DNS queries
|
||||
- **DNS Caching**: DNS responses may be cached; the actual update frequency depends on the DNS record's TTL value
|
||||
- **Network Connectivity**: Ensure HertzBeat can access the specified DNS server and port (default: 53)
|
||||
- **Firewall**: Ensure firewalls allow DNS query traffic (UDP/TCP 53)
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set: Monitor Target
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------|-------------|--------------------------------------------|
|
||||
| target | none | Discovered service instance target |
|
||||
| host | none | Service instance host address |
|
||||
| port | none | Service instance port number |
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Kubernetes Headless Services**: Discover Kubernetes pod instances through DNS
|
||||
- **Cloud Services**: Discover cloud service instances (AWS Route53, Azure DNS, GCP Cloud DNS)
|
||||
- **Traditional DNS**: Use existing DNS infrastructure for service discovery
|
||||
- **Load Balancing**: Discover all backend server instances
|
||||
- **Mail Servers**: Discover mail server instances through MX records
|
||||
- **Multi-Environment**: Use different DNS records for service discovery across different environments
|
||||
|
||||
### Common SRV Record Formats
|
||||
|
||||
Different services use different SRV record formats:
|
||||
|
||||
- **HTTP**: `_http._tcp.example.com`
|
||||
- **HTTPS**: `_https._tcp.example.com`
|
||||
- **LDAP**: `_ldap._tcp.example.com`
|
||||
- **FTP**: `_ftp._tcp.example.com`
|
||||
- **MySQL**: `_mysql._tcp.example.com`
|
||||
- **PostgreSQL**: `_postgresql._tcp.example.com`
|
||||
|
||||
### Kubernetes Integration
|
||||
|
||||
In Kubernetes clusters, DNS service discovery can be used to discover pod instances:
|
||||
|
||||
1. **Headless Services**: Kubernetes creates DNS A records for each pod of headless services
|
||||
2. **Service Discovery**: Use DNS service discovery to monitor all pods of a specific service
|
||||
|
||||
Example:
|
||||
|
||||
- **DNS Host**: Kubernetes cluster DNS service IP (usually `10.96.0.10`)
|
||||
- **Record Type**: `A`
|
||||
- **Record Name**: `my-service.default.svc.cluster.local`
|
||||
- **Monitoring Template**: `Port` monitoring
|
||||
|
||||
### DNS Server Examples
|
||||
|
||||
Commonly used DNS servers:
|
||||
|
||||
- **Google Public DNS**: `8.8.8.8`, `8.8.4.4`
|
||||
- **Cloudflare DNS**: `1.1.1.1`, `1.0.0.1`
|
||||
- **Quad9 DNS**: `9.9.9.9`
|
||||
- **OpenDNS**: `208.67.222.222`, `208.67.220.220`
|
||||
- **Internal DNS**: Usually the enterprise's internal DNS server address
|
||||
|
||||
### Best Practices
|
||||
|
||||
1. **Use SRV Records**: SRV records are the recommended method for service discovery as they contain complete host and port information
|
||||
2. **Set Proper TTL**: Set an appropriate DNS record TTL to balance real-time performance and DNS server load
|
||||
3. **Redundancy**: Configure multiple DNS servers to ensure high availability
|
||||
4. **Monitoring**: Regularly check DNS record validity and availability
|
||||
5. **Security**: Ensure DNS queries are secure, consider using DNS over HTTPS (DoH) or DNS over TLS (DoT)
|
||||
@@ -0,0 +1,101 @@
|
||||
---
|
||||
id: docker
|
||||
title: Monitor:Docker Monitor
|
||||
sidebar_label: Docker Monitor
|
||||
keywords: [open source monitoring tool, open source docker monitoring tool, monitoring docker metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance Metrics of Docker containers.
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
If you want to monitor the container information in `Docker`, you need to open the port according to the following steps, so that the collection request can obtain the corresponding information.
|
||||
|
||||
**1. Edit the docker.server file:**
|
||||
|
||||
````shell
|
||||
vi /usr/lib/systemd/system/docker.service
|
||||
````
|
||||
|
||||
Find the **[Service]** node, modify the ExecStart property, and add `-H tcp://0.0.0.0:2375`
|
||||
|
||||
````shell
|
||||
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H tcp://0.0.0.0:2375
|
||||
````
|
||||
|
||||
This is equivalent to the **2375** port that is open to the outside world. Of course, it can be modified to other ports according to your own situation.
|
||||
|
||||
**2. Reload the Docker configuration to take effect:**
|
||||
|
||||
```shell
|
||||
systemctl daemon-reload
|
||||
systemctl restart docker
|
||||
```
|
||||
|
||||
**Note: Remember to open the `2375` port number in the server console.**
|
||||
|
||||
**3. If the above method does not work:**
|
||||
|
||||
Open the `2375` port number inside the server.
|
||||
|
||||
```shell
|
||||
firewall-cmd --zone=public --add-port=2375/tcp --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | Monitored peer IPV4, IPV6 or domain name. Note ⚠️ without protocol headers (eg: https://, http://). |
|
||||
| Monitor Name | Identifies the name of this monitor. The name needs to be unique. |
|
||||
| Port | The port provided by the database externally, the default is 2375. |
|
||||
| Query Timeout | Set the timeout when getting the Docker server API interface, in ms, the default is 3000 ms. |
|
||||
| Container Name | Generally monitors all running container information. |
|
||||
| username | connection username, optional |
|
||||
| password | connection password, optional |
|
||||
| URL | Database connection URL, optional, if configured, the parameters such as database name, username and password in the URL will override the parameters configured above |
|
||||
| Collection Interval | Monitor periodical collection data interval, in seconds, the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and then continue to add and modify operations if the detection is successful |
|
||||
| Description Remarks | More remarks that identify and describe this monitoring, users can remark information here |
|
||||
|
||||
### Collect metrics
|
||||
|
||||
#### Metric collection: system
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|--------------------|-------------|----------------------------------------------------|
|
||||
| Name | None | Server Name |
|
||||
| version | none | docker version number |
|
||||
| os | none | server version eg: linux x86_64 |
|
||||
| root_dir | none | docker folder directory eg: /var/lib/docker |
|
||||
| containers | None | Total number of containers (running + not running) |
|
||||
| containers_running | None | Number of running containers |
|
||||
| containers_paused | none | number of containers in pause |
|
||||
| images | None | The total number of container images. |
|
||||
| ncpu | none | ncpu |
|
||||
| mem_total | MB | Total size of memory used |
|
||||
| system_time | none | system time |
|
||||
|
||||
#### Metric collection: containers
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|----------------------------------------------|
|
||||
| id | None | The ID of the container in Docker |
|
||||
| name | None | The container name in the Docker container |
|
||||
| image | None | Image used by the Docker container |
|
||||
| command | None | Default startup command in Docker |
|
||||
| state | None | The running state of the container in Docker |
|
||||
| status | None | Update time in Docker container |
|
||||
|
||||
#### Metrics collection: stats
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|------------------|-------------|------------------------------------------------------------|
|
||||
| name | None | The name in the Docker container |
|
||||
| available_memory | MB | The amount of memory that the Docker container can utilize |
|
||||
| used_memory | MB | The amount of memory already used by the Docker container |
|
||||
| memory_usage | None | Memory usage of the Docker container |
|
||||
| cpu_delta | None | The number of CPUs already used by the Docker container |
|
||||
| number_cpus | None | The number of CPUs that the Docker container can use |
|
||||
| cpu_usage | None | Docker container CPU usage |
|
||||
@@ -0,0 +1,106 @@
|
||||
---
|
||||
id: dolphinscheduler
|
||||
title: Monitoring: Apache DolphinScheduler
|
||||
sidebar_label: Apache DolphinScheduler
|
||||
keywords: [ Open Source Monitoring System, Monitor Apache DolphinScheduler ]
|
||||
---
|
||||
|
||||
> Collect monitoring metrics for Apache DolphinScheduler.
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
> Support Apache DolphinScheduler version 3.3.0 or later
|
||||
|
||||
You need to create a token in Apache DolphinScheduler.
|
||||
|
||||
<!-- markdown-link-check-disable -->
|
||||
Please refer to [Open API](https://dolphinscheduler.apache.org/zh-cn/docs/3.2.2/guide/api/open-api) to create a new token.The main steps are as follows
|
||||
|
||||
1. Log in to the Apache DolphinScheduler system, click "Security", then click "Token manage" on the left, and click "Create token" to create a token.
|
||||
2. Select the "Expiration time" (Token validity time), select "User" (choose the specified user to perform the API operation), click "Generate token", copy the Token string, and click "Submit".
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|---------------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The monitored endpoint's IPV4, IPV6, or domain name. Note ⚠️ no protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring task, which needs to be unique. |
|
||||
| Port | The monitoring port opened by DolphinScheduler, default value: 12345. |
|
||||
| SSL | Whether SSL is enabled for connecting to DolphinScheduler. |
|
||||
| Token | Apache DolphinScheduler token string. |
|
||||
| Query Timeout | Set the timeout for unresponsive queries, in milliseconds (ms), default 6000 ms. |
|
||||
| Collection Interval | The interval time for periodic data collection, in seconds; the minimum interval that can be set is 30 seconds. |
|
||||
| Binding Tags | Used for categorizing and managing monitoring resources. |
|
||||
| Description Notes | Additional identification and description notes for this monitoring; users can add notes here. |
|
||||
|
||||
## Collected Metrics
|
||||
|
||||
### Metric Set: Master
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|---------------|-------------------------|
|
||||
| host | None | Host |
|
||||
| port | None | Port |
|
||||
| serverStatus | None | Server Status |
|
||||
| processId | None | Process Id |
|
||||
| runningTime | Day | Running Time |
|
||||
| cpuUsage | Percentage(%) | CPU Usage |
|
||||
| memoryUsage | Percentage(%) | Memory Usage |
|
||||
| diskUsage | Percentage(%) | Disk Usage |
|
||||
| jvmCpuUsage | Percentage(%) | JVM CPU Usage |
|
||||
| jvmMemoryUsage | Percentage(%) | JVM Memory Usage |
|
||||
| jvmHeapUsed | None | JVM Heap Used |
|
||||
| jvmNonHeapUsed | None | JVM NonHeap Used |
|
||||
| jvmHeapMax | None | JVM Heap Max |
|
||||
| jvmNonHeapMax | None | JVM NonHeap Max |
|
||||
|
||||
### Metric Set: Worker
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|------------------|---------------|-------------------------|
|
||||
| host | None | Host |
|
||||
| port | None | Port |
|
||||
| serverStatus | None | Server Status |
|
||||
| processId | None | Process Id |
|
||||
| runningTime | Day | Running Time |
|
||||
| cpuUsage | Percentage(%) | CPU Usage |
|
||||
| memoryUsage | Percentage(%) | Memory Usage |
|
||||
| diskUsage | Percentage(%) | Disk Usage |
|
||||
| jvmCpuUsage | Percentage(%) | JVM CPU Usage |
|
||||
| jvmMemoryUsage | Percentage(%) | JVM Memory Usage |
|
||||
| jvmHeapUsed | None | JVM Heap Used |
|
||||
| jvmNonHeapUsed | None | JVM NonHeap Used |
|
||||
| jvmHeapMax | None | JVM Heap Max |
|
||||
| jvmNonHeapMax | None | JVM NonHeap Max |
|
||||
| workerHostWeight | None | Weight |
|
||||
| threadPoolUsage | None | Thread Pool Usage |
|
||||
| workerGroup | None | Worker Group |
|
||||
|
||||
### Metric Set: Alert Server
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|---------------|-------------------------|
|
||||
| host | None | Host |
|
||||
| port | None | Port |
|
||||
| serverStatus | None | Server Status |
|
||||
| processId | None | Process Id |
|
||||
| runningTime | Day | Running Time |
|
||||
| cpuUsage | Percentage(%) | CPU Usage |
|
||||
| memoryUsage | Percentage(%) | Memory Usage |
|
||||
| diskUsage | Percentage(%) | Disk Usage |
|
||||
| jvmCpuUsage | Percentage(%) | JVM CPU Usage |
|
||||
| jvmMemoryUsage | Percentage(%) | JVM Memory Usage |
|
||||
| jvmHeapUsed | None | JVM Heap Used |
|
||||
| jvmNonHeapUsed | None | JVM NonHeap Used |
|
||||
| jvmHeapMax | None | JVM Heap Max |
|
||||
| jvmNonHeapMax | None | JVM NonHeap Max |
|
||||
|
||||
### Metric Set: Database
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------------------|-------------|-----------------------------|
|
||||
| dbType | None | Database Type |
|
||||
| state | None | State |
|
||||
| maxConnections | None | Max Connections |
|
||||
| threadsConnections | None | Threads Connections |
|
||||
| threadsRunningConnections | Day | Threads Running Connections |
|
||||
@@ -0,0 +1,170 @@
|
||||
---
|
||||
id: doris_be
|
||||
title: Monitoring DORIS Database BE
|
||||
sidebar_label: DORIS Database BE
|
||||
keywords: [Open Source Monitoring System, Open Source Database Monitoring, DORIS Database BE Monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for DORIS database BE. Supports DORIS 2.0.0.
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|--------|-----------------------------------------------------|
|
||||
| Monitor Host | The monitored target's IPV4, IPV6, or domain name. Note: Without the protocol header (e.g., https://, http://) |
|
||||
| Task Name | A unique name identifying this monitoring task |
|
||||
| Port | The port provided by the database to the outside, default is 8040 ,get the value of the`http_port` configuration item |
|
||||
| Query Timeout | The timeout for the connection to not respond, in milliseconds, default is 3000 milliseconds |
|
||||
| Database Name | Optional database instance name |
|
||||
| Collection Interval | The interval between periodic data collections for monitoring, in seconds, with a minimum interval of 30 seconds |
|
||||
| Probe Required | Whether to probe and check the availability of monitoring before adding new monitoring, continue with the addition or modification operation only if the probe is successful |
|
||||
| Description | Additional notes and descriptions for this monitoring task |
|
||||
|
||||
### Collection Indicators
|
||||
|
||||
#### Metric Set:doris_be_load_channel_count
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|-----------------------|
|
||||
| value | None | The current number of load channels |
|
||||
|
||||
#### Metric Set:doris_be_memtable_flush_total
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|--------------------|
|
||||
| value | None | Cumulative number of memtable writes to disk |
|
||||
|
||||
#### Metric Set:doris_be_plan_fragment_count
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|------------------------------|
|
||||
| value | None | Number of fragment instances currently received |
|
||||
|
||||
#### Metric Set:doris_be_process_thread_num
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|---------------------------------|
|
||||
| value | None | Number of BE process threads, collected through /proc/pid/task |
|
||||
|
||||
#### Metric Set:doris_be_query_scan_rows
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|------------------------------------------------------------------------------|
|
||||
| value | None | Cumulative number of rows read. This only counts the data volume read from OLAP tables, and it represents RawRowsRead (some data rows may be skipped by the index and not actually read, but they are still recorded in this value). |
|
||||
|
||||
#### Metric Set:doris_be_result_buffer_block_count
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|---------------------|
|
||||
| value | None | Number of queries in the current query result cache |
|
||||
|
||||
#### Metric Set:doris_be_send_batch_thread_pool_queue_size
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|---------------------|
|
||||
| value | None | Number of tasks in the queue of the thread pool used for sending data packets during import |
|
||||
|
||||
#### Metric Set:doris_be_tablet_base_max_compaction_score
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|-----------------------------|
|
||||
| value | None | Current maximum Base Compaction Score |
|
||||
|
||||
#### Metric Set:doris_be_timeout_canceled_fragment_count
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|----------------------------------|
|
||||
| value | None | Cumulative number of fragment instances cancelled due to timeout |
|
||||
|
||||
#### Metric Set:doris_be_load_rows
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|------------------------|
|
||||
| value | None | Cumulative number of rows sent through tablet sink |
|
||||
|
||||
#### Metric Set:doris_be_all_rowsets_num
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|-----------------|
|
||||
| value | None | Current number of rowsets |
|
||||
|
||||
#### Metric Set:doris_be_all_segments_num
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|------------------|
|
||||
| value | None | Current number of segments |
|
||||
|
||||
#### Metric Set:doris_be_heavy_work_max_threads
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|-------------------|
|
||||
| value | None | Number of threads in the brpc heavy thread pool |
|
||||
|
||||
#### Metric Set:doris_be_light_work_max_threads
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|-------------------|
|
||||
| value | None | Number of threads in the brpc light thread pool|
|
||||
|
||||
#### Metric Set:doris_be_heavy_work_pool_queue_size
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|---------------------------------|
|
||||
| value | None | Maximum queue length of the brpc heavy thread pool; if exceeded, work submissions will be blocked |
|
||||
|
||||
#### Metric Set:doris_be_light_work_pool_queue_size
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|---------------------------------|
|
||||
| value | None | Maximum queue length of the brpc light thread pool; if exceeded, work submissions will be blocked |
|
||||
|
||||
#### Metric Set:doris_be_heavy_work_active_threads
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|--------------------|
|
||||
| value | None | Number of active threads in the brpc heavy thread pool |
|
||||
|
||||
#### Metric Set:doris_be_light_work_active_threads
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|--------------------|
|
||||
| value | None | Number of active threads in the brpc light thread pool |
|
||||
|
||||
#### Metric Set:doris_be_compaction_bytes_total
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|------------|------|------------------------------|
|
||||
| base | Bytes | Cumulative data volume of Base Compaction |
|
||||
| cumulative | Bytes | Cumulative data volume of Cumulative Compaction |
|
||||
|
||||
#### Metric Set:doris_be_disks_avail_capacity
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|--------------------------------------------|
|
||||
| path | None | Specify data directory |
|
||||
| value | Bytes | `{path="/path1/"}` represents the remaining disk space of the /path1 directory's disk. |
|
||||
|
||||
#### Metric Set:doris_be_disks_total_capacity
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|--------------------------------------------|
|
||||
| path | None | Specify data directory |
|
||||
| value | Bytes | `{path="/path1/"}` represents the total disk space of the disk where the /path1 directory is located. |
|
||||
|
||||
#### Metric Set:doris_be_local_bytes_read_total
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|----------------------------|
|
||||
| value | Bytes | Number of bytes read by LocalFileReader |
|
||||
|
||||
#### Metric Set:doris_be_local_bytes_written_total
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|----------------------------|
|
||||
| value | Bytes | Number of bytes written by LocalFileWriter |
|
||||
|
||||
#### Metric Set:doris_be_memory_allocated_bytes
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------|------|------------------------------------------|
|
||||
| value | Bytes | Physical memory size of the BE process, retrieved from /proc/self/status/VmRSS |
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
id: doris_fe
|
||||
title: Monitoring DORIS Database FE
|
||||
sidebar_label: DORIS Database FE
|
||||
keywords: [Open Source Monitoring System, Open Source Database Monitoring, DORIS Database FE Monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for DORIS database FE. Supports DORIS 2.0.0.
|
||||
|
||||
**Protocol: HTTP**
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
Check the `fe/conf/fe.conf` file to obtain the value of the `http_port` configuration item, which is used for monitoring.
|
||||
|
||||
### Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | The monitored target's IPV4, IPV6, or domain name. Note: Without the protocol header (e.g., https://, http://) |
|
||||
| Task Name | A unique name identifying this monitoring task |
|
||||
| Port | The port provided by the database to the outside, default is 8030 ,get the value of the`http_port` configuration item |
|
||||
| Query Timeout | The timeout for the connection to not respond, in milliseconds, default is 3000 milliseconds |
|
||||
| Database Name | Optional database instance name |
|
||||
| Collection Interval | The interval between periodic data collections for monitoring, in seconds, with a minimum interval of 30 seconds |
|
||||
| Probe Required | Whether to probe and check the availability of monitoring before adding new monitoring, continue with the addition or modification operation only if the probe is successful |
|
||||
| Description | Additional notes and descriptions for this monitoring task |
|
||||
|
||||
### Collection Indicators
|
||||
|
||||
#### Metric Set: doris_fe_connection_total
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|----------------------------------------------------|
|
||||
| value | None | The current number of MySQL port connections on FE |
|
||||
|
||||
#### Metric Set: doris_fe_edit_log_clean
|
||||
|
||||
Should not fail; if it does, manual intervention is required.
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|---------------------------------------------------------------|
|
||||
| success | None | The number of successful cleanups of historical metadata logs |
|
||||
| failed | None | The number of failed cleanups of historical metadata logs |
|
||||
|
||||
#### Metric Set: doris_fe_edit_log
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------------|-------------|---------------------------------------------|
|
||||
| write | None | The count of metadata log write operations |
|
||||
| read | None | The count of metadata log read operations |
|
||||
| current | None | The current number of metadata logs |
|
||||
| accumulated_bytes | Bytes | The cumulative value of metadata log writes |
|
||||
| current_bytes | Bytes | The current value of metadata logs |
|
||||
|
||||
#### Metric Set: doris_fe_image_clean
|
||||
|
||||
Should not fail; if it does, manual intervention is required.
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|----------------------------------------------------------------------|
|
||||
| success | None | The number of successful cleanups of historical metadata image files |
|
||||
| failed | None | The number of failed cleanups of historical metadata image files |
|
||||
|
||||
#### Metric Set: doris_fe_image_write
|
||||
|
||||
Should not fail; if it does, manual intervention is required.
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------------------------------|
|
||||
| success | None | The number of successful generations of metadata image files |
|
||||
| failed | None | The number of failed generations of metadata image files |
|
||||
|
||||
#### Metric Set: doris_fe_query_err
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-------------------------------------------|
|
||||
| value | None | The cumulative value of erroneous queries |
|
||||
|
||||
#### Metric Set: doris_fe_max_journal_id
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| value | None | The current maximum metadata log ID on the FE node. If it is a Master FE, it is the maximum ID currently written; if it is a non-Master FE, it represents the maximum metadata log ID currently being replayed. Used to observe if there is a large gap between the IDs of multiple FEs. A large gap indicates issues with metadata synchronization |
|
||||
|
||||
#### Metric Set: doris_fe_max_tablet_compaction_score
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| value | None | The largest compaction score value among all BE nodes. This value can observe the current cluster's maximum compaction score to judge if it is too high. If too high, there may be delays in queries or writes |
|
||||
|
||||
#### Metric Set: doris_fe_qps
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|---------------------------------------------------------------------------------|
|
||||
| value | None | The number of queries per second on the current FE (only counts query requests) |
|
||||
|
||||
#### Metric Set: doris_fe_query_err_rate
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------------|
|
||||
| value | None | The number of erroneous queries per second |
|
||||
|
||||
#### Metric Set: doris_fe_report_queue_size
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| value | None | The length of the queue for various regular reporting tasks on the BE side at the FE end. This value reflects the degree of blocking of reporting tasks on the Master FE node. A larger value indicates insufficient processing capacity on the FE |
|
||||
|
||||
#### Metric Set: doris_fe_rps
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|------------------------------------------------------------------------------------------------------|
|
||||
| value | None | The number of requests per second on the current FE (includes queries and other types of statements) |
|
||||
|
||||
#### Metric Set: doris_fe_scheduled_tablet_num
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| value | None | The number of tablets currently being scheduled by the Master FE node. This includes tablets that are being repaired and tablets that are being balanced. This value can reflect the number of tablets currently migrating in the cluster. If there is a value for a long time, it indicates that the cluster is unstable |
|
||||
|
||||
#### Metric Set: doris_fe_txn_status
|
||||
|
||||
Can observe the number of import transactions in various states to determine if there is a backlog.
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| unknown | None | Unknown state |
|
||||
| prepare | None | In preparation |
|
||||
| committed | None | Committed |
|
||||
| visible | None | Visible |
|
||||
| aborted | None | Aborted / Revoked |
|
||||
@@ -0,0 +1,101 @@
|
||||
---
|
||||
id: dynamic_tp
|
||||
title: Monitoring DynamicTp ThreadPool
|
||||
sidebar_label: DynamicTp Monitor
|
||||
keywords: [open source monitoring tool, open source dynamicTp monitoring tool, monitoring DynamicTp metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the thread pool performance Metrics exposed by DynamicTp actuator.
|
||||
|
||||
## PreRequisites
|
||||
|
||||
1. Integration Using `DynamicTp`
|
||||
|
||||
`DynamicTp` is a lightweight dynamic thread pool based on the configuration center of the Jvm language. It has built-in monitoring and alarm functions, which can be realized through SPI custom extensions.
|
||||
|
||||
For integrated use, please refer to the document [Quick Start](https://dynamictp.cn/guide/use/quick-start.html)
|
||||
|
||||
2. Open SpringBoot Actuator Endpoint to expose `DynamicTp` Metric interface
|
||||
|
||||
```yaml
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
```
|
||||
|
||||
Test whether the access Metric interface `ip:port/actuator/dynamic-tp` has response json data as follows:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"poolName": "commonExecutor",
|
||||
"corePoolSize": 1,
|
||||
"maximumPoolSize": 1,
|
||||
"queueType": "LinkedBlockingQueue",
|
||||
"queueCapacity": 2147483647,
|
||||
"queueSize": 0,
|
||||
"fair": false,
|
||||
"queueRemainingCapacity": 2147483647,
|
||||
"activeCount": 0,
|
||||
"taskCount": 0,
|
||||
"completedTaskCount": 0,
|
||||
"largestPoolSize": 0,
|
||||
"poolSize": 0,
|
||||
"waitTaskCount": 0,
|
||||
"rejectCount": 0,
|
||||
"rejectHandlerName": null,
|
||||
"dynamic": false,
|
||||
"runTimeoutCount": 0,
|
||||
"queueTimeoutCount": 0
|
||||
},
|
||||
{
|
||||
"maxMemory": "4GB",
|
||||
"totalMemory": "444MB",
|
||||
"freeMemory": "250.34 MB",
|
||||
"usableMemory": "3.81GB"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
3. Add DynamicTp monitoring under HertzBeat middleware monitoring
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|-------------------|-------------------------------------------------------------------------|
|
||||
| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). |
|
||||
| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. |
|
||||
| Port | The port provided by the application service, the default is 8080. |
|
||||
| Enable HTTPS | Whether to access the website through HTTPS, note ⚠️Enable HTTPS, the default corresponding port needs to be changed to 443 |
|
||||
| Base Path | Exposed interface path prefix, default /actuator |
|
||||
| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful |
|
||||
| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here |
|
||||
|
||||
### Collect metrics
|
||||
|
||||
#### Metric collection: thread_pool
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|--------------------------|-------------|---------------------------------------------|
|
||||
| pool_name | None | Thread pool name |
|
||||
| core_pool_size | None | Number of core threads |
|
||||
| maximum_pool_size | None | Maximum number of threads |
|
||||
| queue_type | None | Task queue type |
|
||||
| queue_capacity | MB | task queue capacity |
|
||||
| queue_size | None | The current occupied size of the task queue |
|
||||
| fair | None | Queue mode, SynchronousQueue will be used |
|
||||
| queue_remaining_capacity | MB | task queue remaining size |
|
||||
| active_count | None | Number of active threads |
|
||||
| task_count | None | Total number of tasks |
|
||||
| completed_task_count | None | Number of completed tasks |
|
||||
| largest_pool_size | None | The largest number of threads in history |
|
||||
| pool_size | none | current number of threads |
|
||||
| wait_task_count | None | Number of tasks waiting to be executed |
|
||||
| reject_count | None | Number of rejected tasks |
|
||||
| reject_handler_name | None | Reject policy type |
|
||||
| dynamic | None | Dynamic thread pool or not |
|
||||
| run_timeout_count | None | Number of running timeout tasks |
|
||||
| queue_timeout_count | None | Number of tasks waiting for timeout |
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
id: elasticsearch
|
||||
title: Monitoring:ElasticSearch
|
||||
sidebar_label: ElasticSearch
|
||||
keywords: [ open source monitoring tool, monitoring ElasticSearch metrics ]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of ElasticSearch
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | Monitored IPV4, IPV6. Note⚠️Without protocol header (eg: https://, http://). |
|
||||
| Monitoring name | Identify the name of this monitoring. The name needs to be unique. |
|
||||
| Monitoring port | The HTTP API port opened by Elasticsearch,default is 9200. |
|
||||
| SSL | Whether SSL is enabled for connecting to Elasticsearch. |
|
||||
| Auth Type | Authentication type,Optional. |
|
||||
| Username | Username,Optional. |
|
||||
| Password | Password,Optional. |
|
||||
| Connect Timeout | Set the timeout for elasticsearch query, default is 6000 milliseconds. |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. |
|
||||
| Bind Tags | Used to classify and manage monitoring resources. |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metrics Set:health
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------------|-------------|-------------------------------------------|
|
||||
| cluster_name | none | Cluster Name |
|
||||
| status | none | status |
|
||||
| nodes | none | Number of nodes in the cluster. |
|
||||
| data_nodes | none | Number of data nodes in the cluster. |
|
||||
| active_primary_shards | none | Number of active shards on primary nodes. |
|
||||
| active_shards | none | Number of active shards. |
|
||||
| active_percentage | % | Active Percentage |
|
||||
| initializing_shards | none | Number of initialized shards. |
|
||||
| unassigned_shards | none | Number of unassigned shards. |
|
||||
|
||||
#### Metrics Set:nodes
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|--------------------------|
|
||||
| total | none | Number of nodes. |
|
||||
| successful | none | Number of online nodes. |
|
||||
| failed | none | Number of offline nodes. |
|
||||
|
||||
#### Metrics Set:nodes_detail
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------------|-------------|-------------------------|
|
||||
| node_name | none | Node Name |
|
||||
| ip | none | IP Address |
|
||||
| cpu_load_average | none | Cpu Load Average |
|
||||
| cpu_percent | % | Cpu Percent |
|
||||
| heap_used | MB | Heap Used |
|
||||
| heap_used_percent | % | Heap Used Percent |
|
||||
| heap_total | MB | Heap Total |
|
||||
| disk_free | GB | Disk Free |
|
||||
| disk_total | GB | Disk Total |
|
||||
| disk_used_percent | % | Disk Used Percent |
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
id: euleros
|
||||
title: Monitoring EulerOS
|
||||
sidebar_label: EulerOS
|
||||
keywords: [ Open Source Monitoring System, Open Source OS Monitoring, EulerOS Monitoring ]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for EulerOS (system information, CPU, memory, disk, network interface, file system, top resource processes, etc.).
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | None | Number of context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used for cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | None | Total number of disks |
|
||||
| partition_num | None | Total number of partitions |
|
||||
| block_write | None | Total number of blocks written to disk |
|
||||
| block_read | None | Total number of blocks read from disk |
|
||||
| write_rate | iops | Disk block write rate per second |
|
||||
|
||||
#### Metric Set: Network Card Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network card name |
|
||||
| receive_bytes | Byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | Byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | Name of the file system |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Usage rate |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
id: eureka_sd
|
||||
title: Monitoring Eureka Service Discovery
|
||||
sidebar_label: Eureka Service Discovery
|
||||
keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring Eureka service discovery]
|
||||
---
|
||||
|
||||
> HertzBeat integrates with Eureka registry to automatically discover service instances and create monitoring tasks for them.
|
||||
|
||||
## Overview
|
||||
|
||||
Eureka Service Discovery allows HertzBeat to connect to your Eureka server and automatically discover all registered service instances. When a new service instance is registered or an existing instance goes offline, HertzBeat will automatically create or delete corresponding monitoring tasks, achieving automated monitoring in microservice environments.
|
||||
|
||||
### PreRequisites
|
||||
|
||||
#### Deploy Eureka Server
|
||||
|
||||
1. Deploy Eureka server according to [Eureka official documentation](https://spring.io/guides/gs/service-registration-and-discovery/).
|
||||
2. Ensure Eureka server is accessible from HertzBeat.
|
||||
3. Verify that you can access Eureka dashboard at `http://your-eureka-server:port/`
|
||||
|
||||
### Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Name | Identify the name of this monitoring. The name needs to be unique |
|
||||
| Eureka Service Discovery Url | Eureka server address. Example: `http://eureka-server:8761/eureka` |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here |
|
||||
|
||||
### Usage Steps
|
||||
|
||||
1. **Create Service Discovery Monitoring**
|
||||
- In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring**
|
||||
- Select monitoring type: **Eureka Service Discovery**
|
||||
- Fill in the basic configuration parameters
|
||||
|
||||
2. **Configure Monitoring Template**
|
||||
- After creating the service discovery monitoring, you need to specify a monitoring template
|
||||
- The template defines what type of monitoring to create for discovered service instances
|
||||
- For example: If discovered instances are HTTP services, you can select HTTP monitoring template
|
||||
- Common template types: Port, HTTP, HTTPS, etc.
|
||||
|
||||
3. **Automatic Discovery**
|
||||
- HertzBeat will periodically query Eureka server based on the collection interval
|
||||
- Automatically create monitoring tasks for newly registered service instances
|
||||
- Automatically delete monitoring tasks for offline service instances
|
||||
|
||||
4. **View Discovered Instances**
|
||||
- In the monitoring list, you can see all automatically created sub-monitoring tasks
|
||||
- Each sub-monitoring task corresponds to a discovered service instance
|
||||
|
||||
### Example of usage
|
||||
|
||||
Suppose your Eureka server is running at `http://192.168.1.100:8761/eureka`, and you want to automatically monitor all service instances registered in it.
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **Target Name**: `Eureka-Service-Discovery`
|
||||
- **Eureka Service Discovery Url**: `http://192.168.1.100:8761/eureka`
|
||||
- **Collection interval**: `60` seconds
|
||||
- **Monitoring Template**: Select `Port` monitoring (to detect instance availability)
|
||||
|
||||
After configuration:
|
||||
|
||||
1. HertzBeat connects to Eureka server
|
||||
2. Retrieves all registered application instances
|
||||
3. Automatically creates Port monitoring for each instance (e.g., `USER-SERVICE-192.168.1.101:8080`)
|
||||
4. Every 60 seconds, checks for newly registered or offline services and updates monitoring tasks accordingly
|
||||
|
||||
### Notes
|
||||
|
||||
- **Network Connectivity**: Ensure HertzBeat can access the Eureka server address
|
||||
- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances
|
||||
- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive requests to Eureka server
|
||||
- **Permission Requirements**: Eureka server does not require authentication by default, but if authentication is configured, the URL needs to include username and password
|
||||
- **Instance Naming**: Automatically created monitoring tasks are named in the format: `{ApplicationName}-{Host}:{Port}`
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set: Monitor Target
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------|-------------|--------------------------------------------|
|
||||
| target | none | Discovered service instance target |
|
||||
| host | none | Service instance host address |
|
||||
| port | none | Service instance port number |
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Microservice Architecture**: Automatically monitor all microservice instances registered in Eureka
|
||||
- **Dynamic Scaling**: Automatically adapt to service instances added/removed due to autoscaling
|
||||
- **Unified Monitoring**: Centrally manage monitoring of all services in the microservice environment
|
||||
- **Operation and Maintenance**: Reduce manual configuration work and improve operation efficiency
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
id: fedora
|
||||
title: Monitoring Fedora Operating System
|
||||
sidebar_label: Fedora OS Operating System
|
||||
keywords: [ Open Source Monitoring System, Open Source OS Monitoring, Fedora OS Monitoring ]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for Fedora operating systems (system information, CPU, memory, disk, network interface, file system, top resource processes, etc.).
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | None | Number of context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used for cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | None | Total number of disks |
|
||||
| partition_num | None | Total number of partitions |
|
||||
| block_write | None | Total number of blocks written to disk |
|
||||
| block_read | None | Total number of blocks read from disk |
|
||||
| write_rate | iops | Disk block write rate per second |
|
||||
|
||||
#### Metric Set: Network Card Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network card name |
|
||||
| receive_bytes | Byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | Byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | Name of the file system |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Usage rate |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
id: flink
|
||||
title: Monitoring Flink
|
||||
sidebar_label: Flink
|
||||
keywords: [open source monitoring tool, open source flink monitoring tool]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of Flink.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|---------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | The monitored peer IPV4, IPV6, or domain name. Note: Do not include protocol headers (e.g., https://, http://). |
|
||||
| Task Name | Identifier for this monitoring task, name must be unique. |
|
||||
| Port | Monitoring port. |
|
||||
| Query Timeout | Sets the timeout for JVM connection in milliseconds, default is 3000 milliseconds. |
|
||||
| SSL | Whether to enable SSL (default is off). |
|
||||
| Username | Connection username. |
|
||||
| Password | Connection password. |
|
||||
| Collection Interval | Interval for periodic data collection during monitoring, in seconds. The minimum settable interval is 30 seconds. |
|
||||
| Whether to detect | Whether to perform a probe check for monitoring availability before adding a new monitor; operations proceed if successful. |
|
||||
| Description Remarks | Additional identifiers and descriptions for this monitoring, where users can note information. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metrics Set:Overview
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|--------------|-------------|-------------------------|
|
||||
| slots_total | Units | Total number of slots. |
|
||||
| slots_used | Units | Number of slots used. |
|
||||
| task_total | Units | Total number of tasks. |
|
||||
| jobs_running | Units | Number of jobs running. |
|
||||
| jobs_failed | Units | Number of jobs failed. |
|
||||
@@ -0,0 +1,137 @@
|
||||
# Flink On Yarn Monitoring
|
||||
|
||||
> Measurement and monitoring of general metrics for Flink stream engine in Yarn running mode.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | The monitored peer's IPV4, IPV6, or domain name. Note ⚠️ do not include protocol headers (e.g., https://, http://). |
|
||||
| Task Name | The name identifying this monitoring task. The name must be unique. |
|
||||
| Yarn Port | The Yarn port, corresponding to the port in `yarn.resourcemanager.webapp.address`. |
|
||||
| Query Timeout | The timeout for JVM connections, in milliseconds, default is 3000 ms. |
|
||||
| Enable SSL | Whether to enable SSL |
|
||||
| Username | Connection username |
|
||||
| Password | Connection password |
|
||||
| Monitoring Interval | Interval for periodic data collection, in seconds, minimum interval is 30 seconds. |
|
||||
| Tags | Used for categorizing and managing monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring task. Users can add notes here. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metrics Set: JobManager Metrics
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------------------------------------------------|-------------|----------------------------------------------------|
|
||||
| Status.JVM.Memory.NonHeap.Committed | Bytes | Non-heap memory committed |
|
||||
| Status.JVM.Memory.Mapped.TotalCapacity | Bytes | Total capacity of mapped memory |
|
||||
| Status.JVM.Memory.NonHeap.Used | Bytes | Non-heap memory used |
|
||||
| Status.JVM.Memory.Metaspace.Max | Bytes | Maximum capacity of metaspace |
|
||||
| Status.JVM.GarbageCollector.G1_Old_Generation.Count | Count | Count of old generation garbage collections |
|
||||
| Status.JVM.Memory.Direct.MemoryUsed | Bytes | Direct memory used |
|
||||
| Status.JVM.Memory.Mapped.MemoryUsed | Bytes | Mapped memory used |
|
||||
| Status.JVM.GarbageCollector.G1_Young_Generation.Count | Count | Count of young generation garbage collections |
|
||||
| Status.JVM.Memory.Direct.TotalCapacity | Bytes | Total capacity of direct memory |
|
||||
| Status.JVM.GarbageCollector.G1_Old_Generation.Time | ms | Time spent on old generation garbage collections |
|
||||
| Status.JVM.Memory.Heap.Committed | Bytes | Heap memory committed |
|
||||
| Status.JVM.Memory.Mapped.Count | Count | Count of mapped memory |
|
||||
| Status.JVM.Memory.Metaspace.Used | Bytes | Metaspace memory used |
|
||||
| Status.JVM.Memory.Direct.Count | Count | Count of direct memory |
|
||||
| Status.JVM.Memory.Heap.Used | Bytes | Heap memory used |
|
||||
| Status.JVM.Memory.Heap.Max | Bytes | Maximum capacity of heap memory |
|
||||
| Status.JVM.GarbageCollector.G1_Young_Generation.Time | ms | Time spent on young generation garbage collections |
|
||||
| Status.JVM.Memory.NonHeap.Max | Bytes | Maximum capacity of non-heap memory |
|
||||
|
||||
#### Metrics Set: JobManager Config
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|--------------------------------------------|-------------|----------------------------------------------------|
|
||||
| internal.jobgraph-path | - | Internal job graph path |
|
||||
| env.java.home | - | Java environment path |
|
||||
| classloader.check-leaked-classloader | - | Whether to check for leaked class loaders |
|
||||
| env.java.opts | - | Java options |
|
||||
| high-availability.cluster-id | - | High availability cluster ID |
|
||||
| jobmanager.rpc.address | - | JobManager's RPC address |
|
||||
| jobmanager.memory.jvm-overhead.min | Bytes | Minimum JVM overhead for JobManager |
|
||||
| jobmanager.web.port | Port | JobManager's Web port |
|
||||
| webclient.port | Port | Web client port |
|
||||
| execution.savepoint.ignore-unclaimed-state | - | Whether to ignore unclaimed state |
|
||||
| io.tmp.dirs | Path | Temporary file directories |
|
||||
| parallelism.default | - | Default parallelism |
|
||||
| taskmanager.memory.fraction | - | TaskManager memory fraction |
|
||||
| taskmanager.numberOfTaskSlots | - | Number of task slots for TaskManager |
|
||||
| yarn.application.name | - | Yarn application name |
|
||||
| taskmanager.heap.mb | MB | Heap memory size for TaskManager |
|
||||
| taskmanager.memory.process.size | GB | Process memory size for TaskManager |
|
||||
| web.port | Port | Web port |
|
||||
| classloader.resolve-order | - | Class loader resolve order |
|
||||
| jobmanager.heap.mb | MB | Heap memory size for JobManager |
|
||||
| jobmanager.memory.off-heap.size | Bytes | Off-heap memory size for JobManager |
|
||||
| state.backend.incremental | - | Whether the state backend is incremental |
|
||||
| execution.target | - | Execution target |
|
||||
| jobmanager.memory.process.size | GB | Process memory size for JobManager |
|
||||
| web.tmpdir | Path | Web temporary directory |
|
||||
| yarn.ship-files | Path | Yarn shipped files |
|
||||
| jobmanager.rpc.port | Port | JobManager's RPC port |
|
||||
| internal.io.tmpdirs.use-local-default | - | Whether to use local default temporary directories |
|
||||
| execution.checkpointing.interval | ms | Checkpointing interval |
|
||||
| execution.attached | - | Whether to execute attached |
|
||||
| internal.cluster.execution-mode | - | Internal cluster execution mode |
|
||||
| execution.shutdown-on-attached-exit | - | Whether to shutdown on attached exit |
|
||||
| pipeline.jars | Path | Pipeline JAR files |
|
||||
| rest.address | - | REST address |
|
||||
| state.backend | - | State backend type |
|
||||
| jobmanager.memory.jvm-metaspace.size | Bytes | JVM metaspace size for JobManager |
|
||||
| $internal.deployment.config-dir | Path | Internal deployment configuration directory |
|
||||
| $internal.yarn.log-config-file | Path | Internal Yarn log configuration file path |
|
||||
| jobmanager.memory.heap.size | Bytes | Heap memory size for JobManager |
|
||||
| state.checkpoints.dir | Path | State checkpoints directory |
|
||||
| jobmanager.memory.jvm-overhead.max | Bytes | Maximum JVM overhead for JobManager |
|
||||
|
||||
#### TaskManager Metrics
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------------------------------|-------------|---------------------------------------------------|
|
||||
| Container ID | - | Container ID for uniquely identifying a container |
|
||||
| Path | - | Container path |
|
||||
| Data Port | Port | Data transmission port |
|
||||
| JMX Port | Port | JMX (Java Management Extensions) port |
|
||||
| Last Heartbeat | Timestamp | Last heartbeat time |
|
||||
| All Slots | Count | Total number of task slots in the container |
|
||||
| Free Slots | Count | Number of free task slots in the container |
|
||||
| totalResourceCpuCores | Cores | Total number of CPU cores in the container |
|
||||
| totalResourceTaskHeapMemory | MB | Total task heap memory size in the container |
|
||||
| totalResourceManagedMemory | MB | Total managed memory size in the container |
|
||||
| totalResourceNetworkMemory | MB | Total network memory size in the container |
|
||||
| freeResourceCpuCores | Cores | Number of free CPU cores in the container |
|
||||
| freeResourceTaskHeapMemory | MB | Free task heap memory size in the container |
|
||||
| freeResourceTaskOffHeapMemory | MB | Free task off-heap memory size in the container |
|
||||
| freeResourceManagedMemory | MB | Free managed memory size in the container |
|
||||
| freeResourceNetworkMemory | MB | Free network memory size in the container |
|
||||
| CPU Cores | Cores | Number of CPU cores |
|
||||
| Physical MEM | MB | Size of physical memory |
|
||||
| JVM Heap Size | MB | Size of JVM heap memory |
|
||||
| Flink Managed MEM | MB | Size of Flink managed memory |
|
||||
| Framework Heap | MB | Size of framework heap memory |
|
||||
| Task Heap | MB | Size of task heap memory |
|
||||
| Framework Off-Heap | MB | Size of framework off-heap memory |
|
||||
| memoryConfigurationTaskOffHeap | Bytes | Task off-heap memory configuration |
|
||||
| Network | MB | Network memory configuration |
|
||||
| Managed Memory | MB | Managed memory configuration |
|
||||
| JVM Metaspace | MB | Size of JVM metaspace |
|
||||
| JVM Overhead | MB | JVM overhead |
|
||||
| memoryConfigurationTotalFlinkMemory | Bytes | Total Flink memory configuration |
|
||||
| memoryConfigurationTotalProcessMemory | Bytes | Total process memory configuration |
|
||||
|
||||
#### TaskManager Status Metrics
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-----------------------------------|-------------|------------------------------------|
|
||||
| Status.Shuffle.Netty.TotalMemory | MB | Total memory used by Netty Shuffle |
|
||||
| Status.Flink.Memory.Managed.Used | MB | Managed memory used by Flink |
|
||||
| Status.JVM.Memory.Metaspace.Used | MB | Used JVM metaspace memory |
|
||||
| Status.JVM.Memory.Metaspace.Max | MB | Maximum JVM metaspace memory |
|
||||
| Status.JVM.Memory.Heap.Used | MB | Used JVM heap memory |
|
||||
| Status.JVM.Memory.Heap.Max | MB | Maximum JVM heap memory |
|
||||
| Status.Flink.Memory.Managed.Total | MB | Total managed memory by Flink |
|
||||
| Status.Shuffle.Netty.UsedMemory | MB | Used memory by Netty Shuffle |
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
id: freebsd
|
||||
title: Monitoring FreeBSD Operating System
|
||||
sidebar_label: FreeBSD Operating System
|
||||
keywords: [ Open Source Monitoring System, Open Source Operating System Monitoring, FreeBSD Operating System Monitoring ]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics (system information, CPU, memory, disk, network cards, file systems, top resource processes, etc.) of the FreeBSD operating system.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring, which must be unique. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. |
|
||||
| Use Proxy Connection | Sets Whether connect via proxy, default is false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configures which collector is used to schedule data collection for this monitoring. |
|
||||
| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorized management of monitoring resources. |
|
||||
| Description | Additional notes and descriptions for this monitoring, where users can make notes. |
|
||||
| PrivateKey | The private key required to connect to the server. |
|
||||
| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. |
|
||||
| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. |
|
||||
| Proxy Port | The port number of the proxy service, default is 22. |
|
||||
| Proxy Username | The authentication username required to connect to the proxy server. |
|
||||
| Proxy Username | The authentication password required to connect to the proxy server. |
|
||||
| Proxy PrivateKey | The private key required to authenticate with the proxy server. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metric Set: Basic Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| hostname | None | Host name |
|
||||
| version | None | System version |
|
||||
| uptime | None | System Uptime |
|
||||
|
||||
#### Metric Set: CPU Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|----------------------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | None | Number of CPU cores |
|
||||
| interrupt | None | Number of CPU interrupts |
|
||||
| load | None | Average CPU load for the last 1/5/15 minutes |
|
||||
| context_switch | None | Current context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric Set: Memory Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| physmem | Mb | Physical memory |
|
||||
| usermem | Mb | User program memory |
|
||||
| realmem | Mb | Actual memory |
|
||||
| availmem | Mb | Available memory |
|
||||
|
||||
#### Metric Set: Disk Free
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | None | File system name |
|
||||
| used | Mb | Used disk space |
|
||||
| available | Mb | Available disk space |
|
||||
| usage | % | Usage percentage |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top10 CPU Process
|
||||
|
||||
Statistics of the top 10 processes using CPU. Statistics include: Process ID, CPU usage, memory usage, executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| mem_usage | % | Memory usage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top10 Memory Process
|
||||
|
||||
Statistics of the top 10 processes using memory. Statistics include: Process ID, memory usage, CPU usage, executed command.
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| pid | None | Process ID |
|
||||
| mem_usage | % | Memory usage |
|
||||
| cpu_usage | % | CPU usage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
id: ftp
|
||||
title: Monitoring FTP
|
||||
sidebar_label: FTP Monitor
|
||||
keywords: [ open source monitoring tool, open source ftp server monitoring tool, monitoring ftp metrics ]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of FTP server.
|
||||
|
||||
**Protocol Use:FTP**
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: ftp://). |
|
||||
| Monitoring name | Identify the name of this monitoring, The name needs to be unique. |
|
||||
| Port | Port provided by FTP server ,default is 21. |
|
||||
| Direction | Directory on the FTP server. |
|
||||
| Timeout | Timeout for connecting to FTP server. |
|
||||
| Username | Username for connecting to the FTP server, optional. |
|
||||
| Password | Password for connecting to the FTP server, optional. |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. |
|
||||
| Bind Tags | Used to classify and manage monitoring resources. |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metrics Set:Basic
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|---------------|-------------|----------------------------------------------------------|
|
||||
| Is Active | none | Check if the directory exists and has access permission. |
|
||||
| Response Time | ms | Response Time |
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
id: fullsite
|
||||
title: Monitoring Full site
|
||||
sidebar_label: Full site Monitor
|
||||
keywords: [open source monitoring tool, open source website monitoring tool, monitoring sitemap metrics]
|
||||
---
|
||||
|
||||
> Available or not to monitor all pages of the website.
|
||||
> A website often has multiple pages provided by different services. We monitor the full site by collecting the SiteMap exposed by the website.
|
||||
> Note⚠️ This monitoring requires your website to support SiteMap. We support SiteMap in XML and TXT formats.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) |
|
||||
| Monitoring name | Identify the name of this monitoring. The name needs to be unique |
|
||||
| Port | Ports provided by website, http generally defaults to 80 and https generally defaults to 443 |
|
||||
| SiteMap | Relative path of website SiteMap address, eg:/sitemap.xml |
|
||||
| Enable HTTPS | Whether to access the website through HTTPS. Note⚠️When HTTPS is enabled, the default corresponding port needs to be changed to 443 |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here |
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set:summary
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|--------------|-------------|------------------------------------------------------|
|
||||
| url | none | URL path of web page |
|
||||
| statusCode | none | Response HTTP status code for requesting the website |
|
||||
| responseTime | ms | Website response time |
|
||||
| errorMsg | none | Error message feedback after requesting the website |
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
id: grafana_dashboard
|
||||
title: Grafana Dashboard
|
||||
sidebar_label: Grafana Historical Charts
|
||||
keywords: [Grafana, Historical Dashboard]
|
||||
---
|
||||
|
||||
> `Grafana` is an open source visualization and analytics platform that helps you easily create, share and monitor dashboards. In this article, we will cover how to use `Grafana` to display historical data in `HertzBeat`.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- We recommend using the latest version of Grafana. Earlier versions may not support the exposed API.
|
||||
- The `Grafana` service is started and the account password is configured.
|
||||
- The `HertzBeat` service is started and the `VictoriaMetrics` time-series database is configured (note: the `VictoriaMetrics` data source is required).
|
||||
|
||||
:::caution Caution.
|
||||
`Grafana` can only show historical data for `Prometheus` type of monitoring, currently it does not support monitoring data defined by `yml` in `HertzBeat`.
|
||||
:::
|
||||
|
||||
### Enable Grafana embedded features and configure anonymous authentication with role-based permissions
|
||||
|
||||
ref: [https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/](https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/).
|
||||
In the `Grafana` configuration file `grafana.ini`, set the configuration parameters.
|
||||
Or run `Grafana` via `Docker`.
|
||||
|
||||
Modify the following configuration parameters in the `Grafana` configuration file `grafana.ini`:
|
||||
|
||||
```ini
|
||||
[auth.proxy]
|
||||
enabled = true
|
||||
|
||||
[auth.anonymous]
|
||||
enabled = true
|
||||
org_role = Admin
|
||||
|
||||
[users]
|
||||
viewers_can_edit = true
|
||||
|
||||
[security]
|
||||
allow_embedding = true
|
||||
```
|
||||
|
||||
Or run `Grafana` via `Docker` using the following command:
|
||||
|
||||
```bash
|
||||
docker run -d -p 3000:3000 --name=grafana \
|
||||
-v "$PWD/data:/var/lib/grafana" \
|
||||
-e "GF_AUTH_PROXY_ENABLED=true" \
|
||||
-e "GF_AUTH_ANONYMOUS_ENABLED=true" \
|
||||
-e "GF_AUTH_ANONYMOUS_ORG_ROLE=Admin" \
|
||||
-e "GF_USERS_VIEWERS_CAN_EDIT=true" \
|
||||
-e "GF_SECURITY_ALLOW_EMBEDDING=true" \
|
||||
grafana/grafana:latest
|
||||
```
|
||||
|
||||
### Configuring Grafana in HertzBeat
|
||||
|
||||
In the configuration file `application.yml` in `HertzBeat`, configure the `Grafana` data source.
|
||||
|
||||
```yaml
|
||||
grafana:
|
||||
enabled: true
|
||||
url: http://127.0.0.1:3000
|
||||
username: admin
|
||||
password: admin
|
||||
```
|
||||
|
||||
### Upload Grafana monitor template json file in HertzBeat monitor
|
||||
|
||||
In `HertzBeat`, when creating or editing a `Prometheus` type monitor, click Enable Grafana Templates and select the Grafana template json file to upload.
|
||||
The monitor template json file can be downloaded at [https://grafana.com/grafana/dashboards/](https://grafana.com/grafana/dashboards/).
|
||||
For example, create a new monitor in `HertzBeat` for `VictoriaMetrics` single node, then open [https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/](https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/), click `Download JSON` button on the right side. `Download JSON` button on the right to download the template json file. Upload the template json file in the `HertzBeat` monitor, save it.
|
||||

|
||||
|
||||
### View Grafana historical charts
|
||||
|
||||
On the `HertzBeat` monitoring page, click the `Grafana` button, select `Grafana` Historical Charts, select a monitoring template, and click the `Query` button to view the `Grafana` historical charts.
|
||||

|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
id: greenplum
|
||||
title: Monitoring:GreenPlum database monitoring
|
||||
sidebar_label: GreenPlum database
|
||||
keywords: [open source monitoring tool, open source database monitoring tool, monitoring greenplum database metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of GreenPlum database. Support GreenPlum 6.23.0+.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | Monitored Host address. Note⚠️Without protocol header (eg: https://, http://) |
|
||||
| Monitoring name | Identify the name of this monitoring. The name needs to be unique |
|
||||
| Port | Port provided by the database. The default is 5432 |
|
||||
| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms |
|
||||
| Database name | Database instance name, optional |
|
||||
| Username | Database connection user name, optional |
|
||||
| Password | Database connection password, optional |
|
||||
| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here |
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set:basic
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------|-------------|-------------------------------------------|
|
||||
| server_version | none | Version number of the database server |
|
||||
| port | none | Database server exposure service port |
|
||||
| server_encoding | none | Character set encoding of database server |
|
||||
| data_directory | none | Database storage data disk address |
|
||||
| max_connections | connections | Database maximum connections |
|
||||
|
||||
#### Metric set:state
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|----------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| name | none | Database name, or share-object is a shared object |
|
||||
| conflicts | times | The number of queries canceled in the database due to a conflict with recovery |
|
||||
| deadlocks | number | Number of deadlocks detected in the database |
|
||||
| blks_read | times | The number of disk blocks read in the database |
|
||||
| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the GreenPlum buffer, not in the operating system file system buffer) |
|
||||
| blk_read_time | ms | Time spent by the backend reading data file blocks in the database |
|
||||
| blk_write_time | ms | Time spent by the backend writing data file blocks in the database |
|
||||
| stats_reset | none | The last time these statistics were reset |
|
||||
|
||||
#### Metric set:activity
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| running | connections | Number of current client connections |
|
||||
@@ -0,0 +1,144 @@
|
||||
---
|
||||
id: guide
|
||||
title: Help Center
|
||||
sidebar_label: Help Center
|
||||
---
|
||||
|
||||
> HertzBeat - An open source, real-time monitoring tool with custom-monitor and agentless.
|
||||
> Help documents and auxiliary information during use
|
||||
|
||||
## 🔬 Monitoring services
|
||||
|
||||
> Regularly collect and monitor the performance Metrics exposed by end-to-end services, provide visual interfaces, and process data for alarm and other service scheduling.
|
||||
> Planned monitoring type:application service, database, operating system, cloud native, open source middleware.
|
||||
|
||||
### Application service monitoring
|
||||
|
||||
 👉 [Website monitoring](website) <br />
|
||||
 👉 [HTTP API](api) <br />
|
||||
 👉 [PING Connectivity](ping) <br />
|
||||
 👉 [Port availability](port) <br />
|
||||
 👉 [Full site monitoring](fullsite) <br />
|
||||
 👉 [SSL Cert monitoring](ssl_cert) <br />
|
||||
 👉 [DNS monitoring](dns) <br />
|
||||
 👉 [FTP monitoring](ftp) <br />
|
||||
 👉 [Websocket monitoring](websocket) <br />
|
||||
 👉 [MQTT connection monitoring](mqtt) <br />
|
||||
|
||||
### Program monitoring
|
||||
|
||||
 👉 [Process](process) <br />
|
||||
 👉 [JVM monitoring](jvm) <br />
|
||||
 👉 [SpringBoot2.0](springboot2) <br />
|
||||
 👉 [SpringBoot3.0](springboot3) <br />
|
||||
 👉 [DynamicTp](dynamic_tp) <br />
|
||||
|
||||
### Database monitoring
|
||||
|
||||
 👉 [MYSQL database monitoring](mysql) <br />
|
||||
 👉 [MariaDB database monitoring](mariadb) <br />
|
||||
 👉 [PostgreSQL database monitoring](postgresql) <br />
|
||||
 👉 [SqlServer database monitoring](sqlserver) <br />
|
||||
 👉 [Oracle database monitoring](oracle) <br />
|
||||
 👉 [DM database monitoring](dm) <br />
|
||||
 👉 [OpenGauss database monitoring](opengauss) <br />
|
||||
 👉 [IoTDB database monitoring](iotdb) <br />
|
||||
 👉 [TiDB database monitoring](tidb) <br />
|
||||
 👉 [MongoDB database monitoring](mongodb) <br />
|
||||
 👉 [NebulaGraph cluster monitoring](nebulagraph_cluster) <br />
|
||||
|
||||
### Cache monitoring
|
||||
|
||||
 👉 [Redis monitoring](redis) <br />
|
||||
 👉 [Memcached monitoring](memcached) <br />
|
||||
|
||||
### Operating system monitoring
|
||||
|
||||
 👉 [Linux operating system monitoring](linux) <br />
|
||||
 👉 [Windows operating system monitoring](windows) <br />
|
||||
 👉 [Ubuntu operating system monitoring](ubuntu) <br />
|
||||
 👉 [Centos operating system monitoring](centos) <br />
|
||||
 👉 [FreeBSD operating system monitoring](freebsd) <br />
|
||||
 👉 [RedHat operating system monitoring](redhat) <br />
|
||||
 👉 [Rocky Linux operating system monitoring](rockylinux) <br />
|
||||
 👉 [EulerOS monitoring](euleros) <br />
|
||||
|
||||
### Middleware monitoring
|
||||
|
||||
 👉 [Zookeeper](zookeeper) <br />
|
||||
 👉 [Kafka](kafka) <br />
|
||||
 👉 [Tomcat](tomcat) <br />
|
||||
 👉 [ShenYu](shenyu) <br />
|
||||
 👉 [DynamicTp](dynamic_tp) <br />
|
||||
 👉 [RabbitMQ](rabbitmq) <br />
|
||||
 👉 [ActiveMQ](activemq) <br />
|
||||
 👉 [Jetty](jetty) <br />
|
||||
 👉 [Nacos](nacos) <br />
|
||||
|
||||
### CloudNative monitoring
|
||||
|
||||
 👉 [Docker](docker) <br />
|
||||
 👉 [Kubernetes](kubernetes) <br />
|
||||
|
||||
### Bigdata monitoring
|
||||
|
||||
 👉 [Clickhouse](clickhouse) <br />
|
||||
 👉 [ElasticSearch](elasticsearch) <br />
|
||||
 👉 [Flink](flink) <br />
|
||||
|
||||
### Ai LLM monitoring
|
||||
|
||||
 👉 [openai](openai) <br />
|
||||
|
||||
### Network monitoring
|
||||
|
||||
 👉 [Huawei-switch](huawei_switch) <br />
|
||||
|
||||
### Server monitoring
|
||||
|
||||
***
|
||||
|
||||
## 💡 Alarm service
|
||||
|
||||
> More liberal threshold alarm configuration (calculation expression), supports email, SMS, WebHook, DingDing, WeChat and FeiShu for alarm notification.
|
||||
> The positioning of alarm service is to trigger the threshold accurately and timely, and the alarm notification can be reached in time.
|
||||
|
||||
### Alarm center
|
||||
|
||||
> The triggered alarm information center provides query and filtering of alarm deletion, alarm processing, mark unprocessed, alarm level status, etc.
|
||||
|
||||
More details see 👉 [Alarm center](alarm_center)
|
||||
|
||||
### Alarm configuration
|
||||
|
||||
> The Metric threshold configuration provides the Metric threshold configuration in the form of expression, which can set the alarm level, trigger times, alarm notification template and whether it is enabled, correlation monitoring and other functions.
|
||||
|
||||
More details see 👉 [Threshold alarm](alert_threshold) <br />
|
||||
   👉 [Threshold expression](alert_threshold_expr)
|
||||
|
||||
### Alarm reduce
|
||||
|
||||
> Combine related alarms through alarm grouping, alarm suppression and other functions to reduce the alarm storm caused by one event, reduce alarm noise and improve alarm response efficiency.
|
||||
|
||||
More details see 👉 [Alarm grouping](alarm_group) <br />
|
||||
   👉 [Alarm inhibit](alarm_inhibit)
|
||||
|
||||
### Alarm notification
|
||||
|
||||
> After triggering the alarm information, in addition to being displayed in the alarm center list, it can also be notified to the designated recipient in a specified way (e-mail, wechat and FeiShu etc.)
|
||||
> Alarm notification provides different types of notification methods, such as email recipient, enterprise wechat robot notification, DingDing robot notification, and FeiShu robot notification.
|
||||
> After setting the receiver, you need to set the associated alarm notification strategy to configure which alarm information is sent to which receiver.
|
||||
|
||||
 👉 [Configure Email Notification](alert_email) <br />
|
||||
 👉 [Configure Discord Notification](alert_webhook) <br />
|
||||
 👉 [Configure Slack Notification](alert_webhook) <br />
|
||||
 👉 [Configure Telegram Notification](alert_webhook) <br />
|
||||
 👉 [Configure WebHook Notification](alert_webhook) <br />
|
||||
 👉 [Configure enterprise WeChat Robot Notification](alert_wework) <br />
|
||||
 👉 [Configure DingDing Robot Notification](alert_dingtalk) <br />
|
||||
 👉 [Configure FeiShu Robot Notification](alert_feishu) <br />
|
||||
 👉 [Configure Huawei Cloud SMN Notification](alert_smn) <br />
|
||||
|
||||
### Plugins
|
||||
|
||||
 👉 [Plugin](plugin) <br />
|
||||
@@ -0,0 +1,200 @@
|
||||
---
|
||||
id: h2
|
||||
title: H2 Database - TESTING ONLY, NOT FOR PRODUCTION
|
||||
sidebar_label: H2 Database (Testing Only)
|
||||
keywords: [open source monitoring tool, H2 database, testing, not for production, security warning]
|
||||
---
|
||||
|
||||
> ⚠️ **CRITICAL SECURITY WARNING**: H2 Database is **NOT suitable for production environments**. It is provided for local testing and development purposes only. Using H2 in production exposes your server to serious security vulnerabilities. Please read this page carefully before using H2 with HertzBeat.
|
||||
|
||||
## 🔴 Security Risks - READ BEFORE USING
|
||||
|
||||
### What is H2 Database?
|
||||
|
||||
H2 is an open-source Java SQL database. HertzBeat ships with H2 as its **default embedded database** to enable quick testing and evaluation without requiring a separate database installation.
|
||||
|
||||
### Why H2 Is Dangerous in Production
|
||||
|
||||
H2 has a built-in feature called `CREATE ALIAS` that allows arbitrary Java code execution within database queries. This means:
|
||||
|
||||
```sql
|
||||
-- Example of EXTREMELY dangerous H2 capability:
|
||||
CREATE ALIAS EXEC AS $$
|
||||
String exec(String cmd) throws Exception {
|
||||
Runtime.getRuntime().exec(cmd);
|
||||
return null;
|
||||
}
|
||||
$$;
|
||||
|
||||
-- This can execute shell commands on the server:
|
||||
CALL EXEC('rm -rf /important-data');
|
||||
```
|
||||
|
||||
If your HertzBeat H2 database is accessible to malicious actors (or even unauthorized internal users), they can:
|
||||
|
||||
- **Execute arbitrary shell commands** on the HertzBeat server
|
||||
- **Read any file** accessible to the HertzBeat process
|
||||
- **Compromise the entire server** running HertzBeat
|
||||
- **Access all monitoring data** including sensitive credentials
|
||||
|
||||
📖 For complete details, read the official [H2 Security Documentation](https://h2database.com/html/security.html).
|
||||
|
||||
### Network Exposure Risk
|
||||
|
||||
H2 can run in server mode, potentially exposing a database management interface on the network. By default, H2 uses ports **8082** (web console) and **9092** (TCP server). If these are accessible externally, any user can connect directly to your database.
|
||||
|
||||
---
|
||||
|
||||
## ✅ H2 is Appropriate For
|
||||
|
||||
- **Local Development**: Quick setup for evaluating HertzBeat features
|
||||
- **Automated Testing**: CI/CD pipelines in isolated environments
|
||||
- **Demos**: Showcasing HertzBeat to stakeholders
|
||||
- **Learning**: Understanding HertzBeat before production deployment
|
||||
|
||||
---
|
||||
|
||||
## 🚫 H2 is NOT Appropriate For
|
||||
|
||||
- Production deployments
|
||||
- Multi-user environments
|
||||
- Systems with sensitive monitoring data
|
||||
- Internet-accessible HertzBeat instances
|
||||
- Environments requiring data persistence across restarts
|
||||
- High-availability setups
|
||||
|
||||
---
|
||||
|
||||
## 🔒 Migrating to a Production Database
|
||||
|
||||
For production use, migrate to one of these supported databases:
|
||||
|
||||
### MySQL / MariaDB (Recommended for most deployments)
|
||||
|
||||
1. Install MySQL 5.7+ or MariaDB 10.5+
|
||||
2. Create a dedicated database and user:
|
||||
|
||||
```sql
|
||||
CREATE DATABASE hertzbeat;
|
||||
CREATE USER 'hertzbeat'@'localhost' IDENTIFIED BY 'strong_password_here';
|
||||
GRANT ALL PRIVILEGES ON hertzbeat.* TO 'hertzbeat'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
3. Update `application.yml`:
|
||||
|
||||
```yaml
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8
|
||||
username: hertzbeat
|
||||
password: strong_password_here
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
```
|
||||
|
||||
4. Download MySQL JDBC driver and place in `ext-lib/`
|
||||
5. Restart HertzBeat
|
||||
|
||||
📖 See the full [MySQL monitoring guide](./mysql.md) for setup details.
|
||||
|
||||
### PostgreSQL (Recommended for enterprise deployments)
|
||||
|
||||
1. Install PostgreSQL 12+
|
||||
2. Create database and user:
|
||||
|
||||
```sql
|
||||
CREATE USER hertzbeat WITH PASSWORD 'strong_password_here';
|
||||
CREATE DATABASE hertzbeat OWNER hertzbeat;
|
||||
GRANT ALL PRIVILEGES ON DATABASE hertzbeat TO hertzbeat;
|
||||
```
|
||||
|
||||
3. Update `application.yml`:
|
||||
|
||||
```yaml
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://localhost:5432/hertzbeat
|
||||
username: hertzbeat
|
||||
password: strong_password_here
|
||||
driver-class-name: org.postgresql.Driver
|
||||
```
|
||||
|
||||
4. Download PostgreSQL JDBC driver and place in `ext-lib/`
|
||||
5. Restart HertzBeat
|
||||
|
||||
📖 See the full [PostgreSQL monitoring guide](./postgresql.md) for setup details.
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ H2 Configuration (Testing Only)
|
||||
|
||||
If you are using H2 for **testing purposes** in a **sandboxed environment**, the default HertzBeat configuration uses H2 with these settings:
|
||||
|
||||
| Configuration | Default Value | Description |
|
||||
|--------------|---------------|-------------|
|
||||
| Database type | H2 | Embedded Java database |
|
||||
| Database file | `./data/hertzbeat` | Local file storage |
|
||||
| Web console | Port 8082 | H2 web management UI |
|
||||
| Auto-create | Enabled | Creates schema automatically |
|
||||
|
||||
### Checking Your Current Configuration
|
||||
|
||||
View your current database configuration in `application.yml`:
|
||||
|
||||
```yaml
|
||||
spring:
|
||||
datasource:
|
||||
# H2 configuration (testing only)
|
||||
url: jdbc:h2:./data/hertzbeat
|
||||
driver-class-name: org.h2.Driver
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ If You Must Use H2 Temporarily
|
||||
|
||||
If you absolutely must use H2 while transitioning to a production database, take these precautions:
|
||||
|
||||
1. **Restrict Network Access**: Ensure HertzBeat is not accessible from the internet
|
||||
2. **Disable H2 Console**: Comment out or remove H2 console configuration
|
||||
3. **Firewall Rules**: Block ports 8082 and 9092 externally
|
||||
4. **Limit User Access**: Only trusted administrators should access HertzBeat
|
||||
5. **Monitor Access Logs**: Watch for unusual SQL queries
|
||||
6. **Plan Migration**: Set a deadline to migrate to MySQL or PostgreSQL
|
||||
|
||||
```yaml
|
||||
# Disable H2 web console in application.yml:
|
||||
spring:
|
||||
h2:
|
||||
console:
|
||||
enabled: false # IMPORTANT: Disable in any non-local environment
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📋 Security Checklist Before Going to Production
|
||||
|
||||
Before deploying HertzBeat in any non-testing environment, verify:
|
||||
|
||||
- [ ] H2 database has been replaced with MySQL or PostgreSQL
|
||||
- [ ] H2 web console is disabled
|
||||
- [ ] Database credentials are strong and unique
|
||||
- [ ] Database is not directly accessible from the internet
|
||||
- [ ] HertzBeat is running behind a reverse proxy with SSL
|
||||
- [ ] Monitoring credentials are encrypted and access-controlled
|
||||
- [ ] Regular database backups are configured
|
||||
|
||||
---
|
||||
|
||||
## 🆘 Help and Support
|
||||
|
||||
If you need help migrating from H2 to a production database:
|
||||
|
||||
- 📖 [HertzBeat Documentation](https://hertzbeat.apache.org/docs/)
|
||||
- 💬 [Apache HertzBeat Mailing List](https://lists.apache.org/list.html?dev@hertzbeat.apache.org)
|
||||
- 🐛 [GitHub Issues](https://github.com/apache/hertzbeat/issues)
|
||||
- 💡 [GitHub Discussions](https://github.com/apache/hertzbeat/discussions)
|
||||
|
||||
---
|
||||
|
||||
> **Remember**: The convenience of H2 for testing comes at the cost of security. Always plan to migrate to a production-grade database before deploying HertzBeat in any real environment.
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
id: hadoop
|
||||
title: Monitoring Hadoop
|
||||
sidebar_label: Apache Hadoop
|
||||
keywords: [Open Source Monitoring System, Open Source Java Monitoring, Hadoop JVM Monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics for the JVM virtual machine in Hadoop.
|
||||
|
||||
**Protocol used: JMX**
|
||||
|
||||
## Pre-monitoring steps
|
||||
>
|
||||
> You need to enable JMX service in the Hadoop application before monitoring. HertzBeat uses the JMX protocol to collect performance metrics from Hadoop's JVM.
|
||||
|
||||
### Steps to enable JMX protocol in the Hadoop application
|
||||
|
||||
Add JVM parameters when the application starts. ⚠️Note that you can customize the exposed port and external IP.
|
||||
|
||||
- 1.Enter the hadoop-env.sh configuration file and enter the following command in the terminal:
|
||||
|
||||
```shell
|
||||
vi $HADOOP_HOME/etc/hadoop/hadoop-env.sh
|
||||
```
|
||||
|
||||
- 2.Add the following parameters, where `port` is the number of the custom-exposed port
|
||||
|
||||
```shell
|
||||
export HADOOP_OPTS= "$HADOOP_OPTS
|
||||
-Djava.rmi.server.hostname=external-ip-address
|
||||
-Dcom.sun.management.jmxremote.port=9999
|
||||
-Dcom.sun.management.jmxremote.ssl=false
|
||||
-Dcom.sun.management.jmxremote.authenticate=false "
|
||||
```
|
||||
|
||||
- 3.Save and exit, and then execute "start-all.sh" in the "$HADOOP_HOME/sbin" directory to restart the service.
|
||||
|
||||
### Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) |
|
||||
| Monitoring name | Identify the name of this monitoring. The name needs to be unique |
|
||||
| Port | Port provided by JMX |
|
||||
| Username | JMX connection user name, optional |
|
||||
| Password | JMX connection password, optional |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metrics Set:memory_pool
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| name | | metrics name |
|
||||
| committed | kb | total size |
|
||||
| init | kb | init size |
|
||||
| max | kb | max size |
|
||||
| used | kb | used size |
|
||||
|
||||
#### Metrics Set:code_cache (Only Support JDK8)
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| committed | kb | total size |
|
||||
| init | kb | init size |
|
||||
| max | kb | max size |
|
||||
| used | kb | used size |
|
||||
|
||||
#### Metrics Set:class_loading
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------------|-------------|--------------------------|
|
||||
| LoadedClassCount | | Loaded Class Count |
|
||||
| TotalLoadedClassCount | | Total Loaded Class Count |
|
||||
| UnloadedClassCount | | Unloaded Class Count |
|
||||
|
||||
#### Metrics Set:thread
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------------------|-------------|----------------------------|
|
||||
| TotalStartedThreadCount | | Total Started Thread Count |
|
||||
| ThreadCount | | Thread Count |
|
||||
| PeakThreadCount | | Peak Thread Count |
|
||||
| DaemonThreadCount | | Daemon Thread Count |
|
||||
| CurrentThreadUserTime | ms | Current Thread User Time |
|
||||
| CurrentThreadCpuTime | ms | Current Thread Cpu Time |
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
id: hbase_master
|
||||
title: Monitoring Hbase Master
|
||||
sidebar_label: HbaseMaster Monitoring
|
||||
keywords: [Open Source Monitoring System, Open Source Database Monitoring, HbaseMaster Monitoring]
|
||||
---
|
||||
|
||||
> Collect monitoring data for general performance metrics of Hbase Master.
|
||||
|
||||
**Protocol: HTTP**
|
||||
|
||||
## Pre-monitoring steps
|
||||
|
||||
Check the `hbase-site.xml` file to obtain the value of the `hbase.master.info.port` configuration item, which is used for monitoring.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The IPv4, IPv6, or domain name of the monitored peer. Note: without protocol header (e.g., https://, http://). |
|
||||
| Port | The port number of the Hbase master, default is 16010. That is, the value of the`hbase.master.info.port` parameter. |
|
||||
| Task Name | The name identifying this monitoring, which needs to be unique. |
|
||||
| Query Timeout | Set the connection timeout in ms, the default is 3000 milliseconds. |
|
||||
| Collection Interval | The periodic collection interval for monitoring data, in seconds, with the minimum allowable interval being 30 seconds. |
|
||||
| Probe | Whether to probe and check the availability of monitoring before adding new monitoring, and proceed with the addition or modification operation only if the probe is successful. |
|
||||
| Description | Additional notes and descriptions for this monitoring, users can add notes here. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: server
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|----------------------|------|-----------------------------------------|
|
||||
| numRegionServers | none | Number of currently alive RegionServers |
|
||||
| numDeadRegionServers | none | Number of currently dead RegionServers |
|
||||
| averageLoad | none | Cluster average load |
|
||||
| clusterRequests | none | Total number of cluster requests |
|
||||
|
||||
#### Metric Set: Rit
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|----------------------|------|----------------------------------|
|
||||
| ritnone | none | Current number of RIT |
|
||||
| ritnoneOverThreshold | none | Number of RIT over the threshold |
|
||||
| ritOldestAge | ms | Duration of the oldest RIT |
|
||||
|
||||
#### Metric Set: basic
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|-------------------------|------|---------------------------------------------|
|
||||
| liveRegionServers | none | List of currently active RegionServers |
|
||||
| deadRegionServers | none | List of currently offline RegionServers |
|
||||
| zookeeperQuorum | none | Zookeeper list |
|
||||
| masterHostName | none | Master node |
|
||||
| BalancerCluster_num_ops | none | Number of cluster load balancing operations |
|
||||
| numActiveHandler | none | Number of RPC handlers |
|
||||
| receivedBytes | MB | Cluster received data volume |
|
||||
| sentBytes | MB | Cluster sent data volume (MB) |
|
||||
| clusterRequests | none | Total number of cluster requests |
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
id: hbase_regionserver
|
||||
title: Monitoring HBase RegionServer
|
||||
sidebar_label: HBase RegionServer Monitoring
|
||||
keywords: [Open-source monitoring system, Open-source database monitoring, RegionServer monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor common performance metrics for HBase RegionServer.
|
||||
|
||||
**Protocol:** HTTP
|
||||
|
||||
## Pre-Monitoring Operations
|
||||
|
||||
Review the `hbase-site.xml` file to obtain the value of the `hbase.regionserver.info.port` configuration item, which is used for monitoring.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The IPV4, IPV6, or domain name of the monitored entity. Note ⚠️ Do not include the protocol header (e.g., https://, http://). |
|
||||
| Port | The port number of the HBase regionserver, default is 16030, i.e., the value of the`hbase.regionserver.info.port` parameter |
|
||||
| Task Name | A unique name to identify this monitoring task. |
|
||||
| Query Timeout | Set the connection timeout in ms, the default is 3000 milliseconds. |
|
||||
| Collection Interval | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. |
|
||||
| Probe Before Adding | Whether to probe and check the availability of monitoring before adding new monitoring, only proceed with the addition if the probe is successful. |
|
||||
| Description Note | Additional notes to identify and describe this monitoring, users can add notes here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
> All metric names are directly referenced from the official fields, hence there may be non-standard naming.
|
||||
|
||||
#### Metric Set: server
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|-----------------------------------|-------|---------------------------------------------------------------------------|
|
||||
| regionCount | None | Number of Regions |
|
||||
| readRequestCount | None | Number of read requests since cluster restart |
|
||||
| writeRequestCount | None | Number of write requests since cluster restart |
|
||||
| averageRegionSize | MB | Average size of a Region |
|
||||
| totalRequestCount | None | Total number of requests |
|
||||
| ScanTime_num_ops | None | Total number of Scan requests |
|
||||
| Append_num_ops | None | Total number of Append requests |
|
||||
| Increment_num_ops | None | Total number of Increment requests |
|
||||
| Get_num_ops | None | Total number of Get requests |
|
||||
| Delete_num_ops | None | Total number of Delete requests |
|
||||
| Put_num_ops | None | Total number of Put requests |
|
||||
| ScanTime_mean | None | Average time of a Scan request |
|
||||
| ScanTime_min | None | Minimum time of a Scan request |
|
||||
| ScanTime_max | None | Maximum time of a Scan request |
|
||||
| ScanSize_mean | bytes | Average size of a Scan request |
|
||||
| ScanSize_min | None | Minimum size of a Scan request |
|
||||
| ScanSize_max | None | Maximum size of a Scan request |
|
||||
| slowPutCount | None | Number of slow Put operations |
|
||||
| slowGetCount | None | Number of slow Get operations |
|
||||
| slowAppendCount | None | Number of slow Append operations |
|
||||
| slowIncrementCount | None | Number of slow Increment operations |
|
||||
| slowDeleteCount | None | Number of slow Delete operations |
|
||||
| blockCacheSize | None | Size of memory used by block cache |
|
||||
| blockCacheCount | None | Number of blocks in Block Cache |
|
||||
| blockCacheExpressHitPercent | None | Block cache hit ratio |
|
||||
| memStoreSize | None | Size of Memstore |
|
||||
| FlushTime_num_ops | None | Number of RS writes to disk/Memstore flushes |
|
||||
| flushQueueLength | None | Length of Region Flush queue |
|
||||
| flushedCellsSize | None | Size flushed to disk |
|
||||
| storeFileCount | None | Number of Storefiles |
|
||||
| storeCount | None | Number of Stores |
|
||||
| storeFileSize | None | Size of Storefiles |
|
||||
| compactionQueueLength | None | Length of Compaction queue |
|
||||
| percentFilesLocal | None | Percentage of HFile in local HDFS Data Node |
|
||||
| percentFilesLocalSecondaryRegions | None | Percentage of HFile for secondary region replicas in local HDFS Data Node |
|
||||
| hlogFileCount | None | Number of WAL files |
|
||||
| hlogFileSize | None | Size of WAL files |
|
||||
|
||||
#### Metric Set: IPC
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|---------------------------|------|----------------------------------------|
|
||||
| numActiveHandler | None | Current number of RITs |
|
||||
| NotServingRegionException | None | Number of RITs exceeding the threshold |
|
||||
| RegionMovedException | ms | Duration of the oldest RIT |
|
||||
| RegionTooBusyException | ms | Duration of the oldest RIT |
|
||||
|
||||
#### Metric Set: JVM
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|----------------------|------|-----------------------------------|
|
||||
| MemNonHeapUsedM | None | Current active RegionServer list |
|
||||
| MemNonHeapCommittedM | None | Current offline RegionServer list |
|
||||
| MemHeapUsedM | None | Zookeeper list |
|
||||
| MemHeapCommittedM | None | Master node |
|
||||
| MemHeapMaxM | None | Cluster balance load times |
|
||||
| MemMaxM | None | RPC handle count |
|
||||
| GcCount | MB | Cluster data reception volume |
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
id: hdfs_datanode
|
||||
title: Monitoring Apache HDFS DataNode
|
||||
sidebar_label: Apache HDFS DataNode
|
||||
keywords: [big data monitoring system, distributed file system monitoring, Apache HDFS DataNode monitoring]
|
||||
---
|
||||
|
||||
> HertzBeat monitors metrics for Apache HDFS DataNode nodes.
|
||||
|
||||
**Protocol Used: HTTP**
|
||||
|
||||
## Pre-monitoring Operations
|
||||
|
||||
Retrieve the HTTP monitoring port for the Apache HDFS DataNode. Value: `dfs.datanode.http.address`
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|-----------------------------|-------------------------------------------------------------------------------------------|
|
||||
| Target Host | IP(v4 or v6) or domain name of the target to be monitored. Exclude protocol. |
|
||||
| Port | Monitoring port number for Apache HDFS DataNode, default is 50075. |
|
||||
| Query Timeout | Timeout for querying Apache HDFS DataNode, in milliseconds, default is 6000 milliseconds. |
|
||||
| Metrics Collection Interval | Time interval for monitoring data collection, in seconds, minimum interval is 30 seconds. |
|
||||
| Probe Before Monitoring | Whether to probe and check monitoring availability before adding. |
|
||||
| Description/Remarks | Additional description and remarks for this monitoring. |
|
||||
|
||||
### Metrics Collected
|
||||
|
||||
#### Metric Set: FSDatasetState
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|----------------------------------|
|
||||
| DfsUsed | GB | DataNode HDFS usage |
|
||||
| Remaining | GB | Remaining space on DataNode HDFS |
|
||||
| Capacity | GB | Total capacity of DataNode HDFS |
|
||||
|
||||
#### Metric Set: JvmMetrics
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|----------------------|-------------|---------------------------------------------------|
|
||||
| MemNonHeapUsedM | MB | Current usage of NonHeapMemory by JVM |
|
||||
| MemNonHeapCommittedM | MB | Committed size of NonHeapMemory configured in JVM |
|
||||
| MemHeapUsedM | MB | Current usage of HeapMemory by JVM |
|
||||
| MemHeapCommittedM | MB | Committed size of HeapMemory by JVM |
|
||||
| MemHeapMaxM | MB | Maximum size of HeapMemory configured in JVM |
|
||||
| MemMaxM | MB | Maximum memory available for JVM at runtime |
|
||||
| ThreadsRunnable | Count | Number of threads in RUNNABLE state |
|
||||
| ThreadsBlocked | Count | Number of threads in BLOCKED state |
|
||||
| ThreadsWaiting | Count | Number of threads in WAITING state |
|
||||
| ThreadsTimedWaiting | Count | Number of threads in TIMED WAITING state |
|
||||
|
||||
#### Metric Set: runtime
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|--------------------|
|
||||
| StartTime | | Startup time |
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
id: hdfs_namenode
|
||||
title: Monitoring HDFS NameNode
|
||||
sidebar_label: Apache HDFS NameNode
|
||||
keywords: [big data monitoring system, distributed file system monitoring, HDFS NameNode monitoring]
|
||||
---
|
||||
|
||||
> HertzBeat monitors metrics for HDFS NameNode nodes.
|
||||
|
||||
**Protocol Used: HTTP**
|
||||
|
||||
## Pre-Monitoring Actions
|
||||
|
||||
Ensure that you have obtained the JMX monitoring port for the HDFS NameNode.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|-----------------------------|-------------------------------------------------------------------------------------------|
|
||||
| Target Host | The IPv4, IPv6, or domain name of the target being monitored. Exclude protocol headers. |
|
||||
| Port | The monitoring port number of the HDFS NameNode, default is 50070. |
|
||||
| Query Timeout | Timeout for querying the HDFS NameNode, in milliseconds, default is 6000 milliseconds. |
|
||||
| Metrics Collection Interval | Time interval for collecting monitoring data, in seconds, minimum interval is 30 seconds. |
|
||||
| Probe Before Monitoring | Whether to probe and check the availability of monitoring before adding it. |
|
||||
| Description/Remarks | Additional description and remarks for this monitoring. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: FSNamesystem
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|---------------------------------|-------------|------------------------------------------------------------|
|
||||
| CapacityTotal | | Total cluster storage capacity |
|
||||
| CapacityTotalGB | GB | Total cluster storage capacity |
|
||||
| CapacityUsed | | Used cluster storage capacity |
|
||||
| CapacityUsedGB | GB | Used cluster storage capacity |
|
||||
| CapacityRemaining | | Remaining cluster storage capacity |
|
||||
| CapacityRemainingGB | GB | Remaining cluster storage capacity |
|
||||
| CapacityUsedNonDFS | | Non-HDFS usage of cluster capacity |
|
||||
| TotalLoad | | Total client connections in the cluster |
|
||||
| FilesTotal | | Total number of files in the cluster |
|
||||
| BlocksTotal | | Total number of BLOCKs |
|
||||
| PendingReplicationBlocks | | Number of blocks awaiting replication |
|
||||
| UnderReplicatedBlocks | | Number of blocks with insufficient replicas |
|
||||
| CorruptBlocks | | Number of corrupt blocks |
|
||||
| ScheduledReplicationBlocks | | Number of blocks scheduled for replication |
|
||||
| PendingDeletionBlocks | | Number of blocks awaiting deletion |
|
||||
| ExcessBlocks | | Number of excess blocks |
|
||||
| PostponedMisreplicatedBlocks | | Number of misreplicated blocks postponed for processing |
|
||||
| NumLiveDataNodes | | Number of live data nodes in the cluster |
|
||||
| NumDeadDataNodes | | Number of data nodes marked as dead |
|
||||
| NumDecomLiveDataNodes | | Number of decommissioned live nodes |
|
||||
| NumDecomDeadDataNodes | | Number of decommissioned dead nodes |
|
||||
| NumDecommissioningDataNodes | | Number of nodes currently being decommissioned |
|
||||
| TransactionsSinceLastCheckpoint | | Number of transactions since the last checkpoint |
|
||||
| LastCheckpointTime | | Time of the last checkpoint |
|
||||
| PendingDataNodeMessageCount | | Number of DATANODE requests queued in the standby namenode |
|
||||
|
||||
#### Metric Set: RPC
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|--------------------|-------------|---------------------|
|
||||
| ReceivedBytes | | Data receiving rate |
|
||||
| SentBytes | | Data sending rate |
|
||||
| RpcQueueTimeNumOps | | RPC call rate |
|
||||
|
||||
#### Metric Set: runtime
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|--------------------|
|
||||
| StartTime | | Start time |
|
||||
|
||||
#### Metric Set: JvmMetrics
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|---------------------------------|--------------|------------------------------------------|
|
||||
| MemNonHeapUsedM | MB | Current usage of NonHeapMemory by JVM |
|
||||
| MemNonHeapCommittedM | MB | Committed NonHeapMemory by JVM |
|
||||
| MemHeapUsedM | MB | Current usage of HeapMemory by JVM |
|
||||
| MemHeapCommittedM | MB | Committed HeapMemory by JVM |
|
||||
| MemHeapMaxM | MB | Maximum HeapMemory configured for JVM |
|
||||
| MemMaxM | MB | Maximum memory that can be used by JVM |
|
||||
| GcCountParNew | Count | Number of ParNew GC events |
|
||||
| GcTimeMillisParNew | Milliseconds | Time spent in ParNew GC |
|
||||
| GcCountConcurrentMarkSweep | Count | Number of ConcurrentMarkSweep GC events |
|
||||
| GcTimeMillisConcurrentMarkSweep | Milliseconds | Time spent in ConcurrentMarkSweep GC |
|
||||
| GcCount | Count | Total number of GC events |
|
||||
| GcTimeMillis | Milliseconds | Total time spent in GC events |
|
||||
| ThreadsRunnable | Count | Number of threads in RUNNABLE state |
|
||||
| ThreadsBlocked | Count | Number of threads in BLOCKED state |
|
||||
| ThreadsWaiting | Count | Number of threads in WAITING state |
|
||||
| ThreadsTimedWaiting | Count | Number of threads in TIMED WAITING state |
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
id: hikvision_isapi
|
||||
title: Monitor Hikvision ISAPI
|
||||
sidebar_label: Hikvision ISAPI
|
||||
keywords: [ monitor, hikvision_isapi ]
|
||||
---
|
||||
|
||||
> Monitor Hikvision devices through ISAPI interface to collect health data.
|
||||
|
||||
## Monitor Configuration
|
||||
|
||||
| Parameter | Description |
|
||||
| ----------- | ----------- |
|
||||
| Host | The IP or domain name of the monitored device. Note⚠️ Do not include protocol prefix (eg: https://, http://). |
|
||||
| Name | The unique name that identifies this monitor. |
|
||||
| Port | Network request port, default is 80. |
|
||||
| Timeout | Timeout period, in milliseconds, default is 5000ms. |
|
||||
| Username | Login username for Hikvision device. |
|
||||
| Password | Login password for Hikvision device. |
|
||||
| SSL | Whether to enable HTTPS, disabled by default. |
|
||||
| Collection Interval | The interval time for periodic data collection, in seconds. The minimum interval is 30 seconds. |
|
||||
|
||||
## Metrics
|
||||
|
||||
### System Info
|
||||
|
||||
- Device Name
|
||||
- Device ID
|
||||
- Firmware Version
|
||||
- Device Model
|
||||
- Mac Address
|
||||
|
||||
### Status
|
||||
|
||||
- CPU Utilization (%)
|
||||
- Memory Usage (MB)
|
||||
- Memory Available (MB)
|
||||
- Cache Size (MB)
|
||||
- Net Port 1 Speed (Mbps)
|
||||
- Net Port 2 Speed (Mbps)
|
||||
- Boot Time
|
||||
- Device Uptime
|
||||
- Last Calibration Time
|
||||
- Last Calibration Time Diff (s)
|
||||
- Avg Upload Time (ms)
|
||||
- Max Upload Time (ms)
|
||||
- Min Upload Time (ms)
|
||||
- Last Calibration Mode
|
||||
- Last Calibration Address
|
||||
- Response Time (ms)
|
||||
|
||||
## Implementation Principle
|
||||
|
||||
The monitoring is implemented by accessing the Hikvision device's ISAPI interface:
|
||||
|
||||
1. Collect system information through: `/ISAPI/System/deviceInfo`
|
||||
|
||||
2. Collect device status through: `/ISAPI/System/status`
|
||||
|
||||
It uses HTTP protocol with Digest Authentication to access the interfaces and parses XML response data to extract monitoring metrics.
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
id: hive
|
||||
title: Monitoring Apache Hive
|
||||
sidebar_label: Apache Hive
|
||||
keywords: [open source monitoring tool, open source apache hive monitoring tool, monitoring apache hive metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance metrics exposed by the Apache Hive.
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
If you want to monitor information in `Apache Hive` with this monitoring type, you need to open your `Hive Server2` in remoting mode.
|
||||
|
||||
**1、Enable metastore:**
|
||||
|
||||
```shell
|
||||
hive --service metastore &
|
||||
```
|
||||
|
||||
**2. Enable hive server2:**
|
||||
|
||||
```shell
|
||||
hive --service hiveserver2 &
|
||||
```
|
||||
|
||||
### Configure parameters
|
||||
|
||||
| Parameter name | Parameter Help describes the |
|
||||
|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). |
|
||||
| Monitoring Name | A name that identifies this monitoring that needs to be unique. |
|
||||
| Port | The default port provided by the database is 10002. |
|
||||
| Enable HTTPS | Whether to access the website through HTTPS, please note that ⚠️ when HTTPS is enabled, the default port needs to be changed to 443 |
|
||||
| Collection interval | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to probe | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation |
|
||||
| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here |
|
||||
|
||||
### Collect metrics
|
||||
|
||||
#### metric Collection: basic
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|-------------|-------------|-----------------------------------------------------------|
|
||||
| vm_name | None | The name of the virtual machine (VM) running HiveServer2. |
|
||||
| vm_vendor | None | The vendor or provider of the virtual machine. |
|
||||
| vm_version | None | The version of the virtual machine. |
|
||||
| up_time | None | The duration for which HiveServer2 has been running. |
|
||||
|
||||
#### metric Collection: environment
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|----------------------|-------------|-------------------------------------------------------------------|
|
||||
| https_proxyPort | None | The port number used for HTTPS proxy communication. |
|
||||
| os_name | None | The name of the operating system on which HiveServer2 is running. |
|
||||
| os_version | None | The version of the operating system. |
|
||||
| os_arch | None | The architecture of the operating system. |
|
||||
| java_runtime_name | None | The name of the Java runtime environment used by HiveServer2. |
|
||||
| java_runtime_version | None | The version of the Java runtime environment. |
|
||||
|
||||
#### metric Collection: thread
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|----------------------|-------------|----------------------------------------------------------------------|
|
||||
| thread_count | None | The current number of threads being used by HiveServer2. |
|
||||
| total_started_thread | None | The total count of threads started by HiveServer2 since its launch. |
|
||||
| peak_thread_count | None | The highest number of threads used by HiveServer2 at any given time. |
|
||||
| daemon_thread_count | None | The number of daemon threads currently active in HiveServer2. |
|
||||
|
||||
#### metric Collection: code_cache
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|-------------|-------------|-------------------------------------------------------------------------|
|
||||
| committed | MB | The amount of memory currently allocated for the memory pool. |
|
||||
| init | MB | The initial amount of memory requested for the memory pool. |
|
||||
| max | MB | The maximum amount of memory that can be allocated for the memory pool. |
|
||||
| used | MB | The amount of memory currently being used by the memory pool. |
|
||||
@@ -0,0 +1,234 @@
|
||||
---
|
||||
id: http_sd
|
||||
title: Monitoring HTTP Service Discovery
|
||||
sidebar_label: HTTP Service Discovery
|
||||
keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring HTTP service discovery]
|
||||
---
|
||||
|
||||
> HertzBeat integrates with custom HTTP APIs to automatically discover service instances and create monitoring tasks for them.
|
||||
|
||||
## Overview
|
||||
|
||||
HTTP Service Discovery allows HertzBeat to discover service instances by calling your custom HTTP API. This is the most flexible service discovery method, suitable for any system that can expose service instance information via HTTP API. You only need to provide an HTTP endpoint that returns a list of target addresses in the specified format.
|
||||
|
||||
### PreRequisites
|
||||
|
||||
#### Prepare HTTP API
|
||||
|
||||
You need to provide or develop an HTTP API that meets the following requirements:
|
||||
|
||||
1. **HTTP Method**: Support GET requests
|
||||
2. **Response Format**: Return JSON array format
|
||||
3. **Response Structure**: Must be an array format, each element contains a `target` field (note: singular), which is a string array. Each string is a service instance address in the format `host:port`
|
||||
4. **Accessibility**: The API must be accessible from HertzBeat
|
||||
|
||||
#### API Response Example
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"target": [
|
||||
"192.168.1.101:8080",
|
||||
"192.168.1.102:8080",
|
||||
"192.168.1.103:8080",
|
||||
"api.example.com:443"
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Name | Identify the name of this monitoring. The name needs to be unique. |
|
||||
| Service Discovery Url | HTTP API address for service discovery. Must start with http:// or https://. Example: `http://api.example.com/services` |
|
||||
| Auth Type | Authentication method, optional values: `Bearer Token`, `Basic Auth`, `Digest Auth`. Default: None |
|
||||
| Access Token | Token for authentication when Auth Type is Bearer Token. |
|
||||
| Username | Username for authentication when Auth Type is Basic Auth or Digest Auth. |
|
||||
| Password | Password for authentication when Auth Type is Basic Auth or Digest Auth. |
|
||||
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. |
|
||||
| Description remarks | For more information about identifying and describing this monitoring, users can note information here. |
|
||||
|
||||
### Usage Steps
|
||||
|
||||
1. **Prepare HTTP API**
|
||||
- Develop or configure an API endpoint that returns service instance list
|
||||
- Ensure the API returns JSON data in the correct format
|
||||
- Test the API accessibility and response format
|
||||
|
||||
2. **Create Service Discovery Monitoring**
|
||||
- In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring**
|
||||
- Select monitoring type: **HTTP Service Discovery**
|
||||
- Fill in the basic configuration parameters
|
||||
- Configure authentication information if needed
|
||||
|
||||
3. **Configure Monitoring Template**
|
||||
- After creating the service discovery monitoring, you need to specify a monitoring template
|
||||
- The template defines what type of monitoring to create for discovered service instances
|
||||
- Common template types: Port, HTTP, HTTPS, Ping, etc.
|
||||
|
||||
4. **Automatic Discovery**
|
||||
- HertzBeat will periodically call your HTTP API based on the collection interval
|
||||
- Automatically create monitoring tasks for newly discovered service instances
|
||||
- Automatically delete monitoring tasks for disappeared service instances
|
||||
|
||||
### Example of usage
|
||||
|
||||
#### Example 1: API Without Authentication
|
||||
|
||||
Suppose you have a service management API:
|
||||
|
||||
- **API URL**: `http://service-manager.example.com/api/v1/services`
|
||||
- **Response**:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"target": [
|
||||
"10.0.1.10:8080",
|
||||
"10.0.1.11:8080",
|
||||
"10.0.1.12:8080"
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **Target Name**: `HTTP-Service-Discovery`
|
||||
- **Service Discovery Url**: `http://service-manager.example.com/api/v1/services`
|
||||
- **Auth Type**: Leave empty (no authentication)
|
||||
- **Collection interval**: `60` seconds
|
||||
- **Monitoring Template**: Select `Port` monitoring
|
||||
|
||||
#### Example 2: API With Bearer Token Authentication
|
||||
|
||||
If your API requires Bearer Token authentication:
|
||||
|
||||
- **API URL**: `https://api.example.com/services`
|
||||
- **Auth Type**: `Bearer Token`
|
||||
- **Access Token**: `your-bearer-token-here`
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **Target Name**: `Secure-API-Discovery`
|
||||
- **Service Discovery Url**: `https://api.example.com/services`
|
||||
- **Auth Type**: Select `Bearer Token`
|
||||
- **Access Token**: Enter your token
|
||||
- **Monitoring Template**: Select `HTTP` monitoring
|
||||
|
||||
#### Example 3: API With Basic Authentication
|
||||
|
||||
If your API requires Basic authentication:
|
||||
|
||||
- **API URL**: `http://api.internal.com/discover`
|
||||
- **Auth Type**: `Basic Auth`
|
||||
- **Username**: `admin`
|
||||
- **Password**: `password123`
|
||||
|
||||
Configuration example:
|
||||
|
||||
- **Target Name**: `Basic-Auth-Discovery`
|
||||
- **Service Discovery Url**: `http://api.internal.com/discover`
|
||||
- **Auth Type**: Select `Basic Auth`
|
||||
- **Username**: `admin`
|
||||
- **Password**: `password123`
|
||||
- **Monitoring Template**: Select appropriate template
|
||||
|
||||
### Notes
|
||||
|
||||
- **Response Format**: The API response must be in JSON array format, each element contains a `target` field (note: singular, string array)
|
||||
- **Address Format**: Each target address should be in the format `host:port`, for example:
|
||||
- `192.168.1.100:8080`
|
||||
- `api.example.com:443`
|
||||
- `localhost:3000`
|
||||
- **Network Connectivity**: Ensure HertzBeat can access the HTTP API address
|
||||
- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances
|
||||
- **Collection Interval**: Set a reasonable collection interval based on API performance and service change frequency
|
||||
- **Authentication**: Choose the appropriate authentication method according to your API security requirements
|
||||
- **HTTPS**: If using HTTPS, ensure SSL certificates are properly configured
|
||||
- **API Performance**: Ensure the API can respond quickly to avoid affecting HertzBeat performance
|
||||
- **Error Handling**: If the API returns an error or invalid format, HertzBeat will keep the current monitoring tasks unchanged
|
||||
|
||||
### Collection Metric
|
||||
|
||||
#### Metric set: Monitor Target
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------|-------------|--------------------------------------------|
|
||||
| target | none | Discovered service instance target |
|
||||
| host | none | Service instance host address |
|
||||
| port | none | Service instance port number |
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Custom Registry**: Integrate with your own service registry system
|
||||
- **Cloud Platform**: Discover services from cloud platforms (AWS, GCP, Azure)
|
||||
- **CMDB**: Integrate with CMDB systems to obtain service information
|
||||
- **Service Gateway**: Discover service instances through API gateway
|
||||
- **Container Platforms**: Obtain service lists from Kubernetes API or container orchestration platforms
|
||||
- **Service Management Systems**: Integrate with existing service management platforms
|
||||
- **Multi-Cloud Environments**: Unify service discovery across different cloud platforms
|
||||
|
||||
### Advanced Usage
|
||||
|
||||
#### Response with Additional Metadata
|
||||
|
||||
While the basic requirement is just the `target` field, your API can include additional metadata for future extensions:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"target": [
|
||||
"192.168.1.10:8080"
|
||||
],
|
||||
"labels": {
|
||||
"env": "production",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Note: Currently, only the `target` field is used for service discovery, but future versions may support using label information.
|
||||
|
||||
### API Implementation Examples
|
||||
|
||||
#### Spring Boot Example
|
||||
|
||||
```java
|
||||
@RestController
|
||||
@RequestMapping("/api/v1")
|
||||
public class ServiceDiscoveryController {
|
||||
|
||||
@GetMapping("/services")
|
||||
public List<Map<String, Object>> getServices() {
|
||||
List<String> targets = Arrays.asList(
|
||||
"192.168.1.10:8080",
|
||||
"192.168.1.11:8080",
|
||||
"192.168.1.12:8080"
|
||||
);
|
||||
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("target", targets);
|
||||
return Collections.singletonList(response);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Node.js Express Example
|
||||
|
||||
```javascript
|
||||
app.get('/api/services', (req, res) => {
|
||||
const targets = [
|
||||
'192.168.1.10:8080',
|
||||
'192.168.1.11:8080',
|
||||
'192.168.1.12:8080'
|
||||
];
|
||||
|
||||
res.json([{
|
||||
target: targets
|
||||
}]);
|
||||
});
|
||||
```
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: huawei_switch
|
||||
title: Monitoring:Huawei switch
|
||||
sidebar_label: Huawei switch
|
||||
keywords: [ open source monitoring tool, network monitoring, Huawei switch ]
|
||||
---
|
||||
|
||||
> Collect and monitor the general indicators (availability, system information, port traffic, etc.) of Huawei switches.
|
||||
|
||||
**Protocol Use: SNMP**
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) |
|
||||
| Task Name | Identify the name of this monitoring. The name needs to be unique |
|
||||
| Port | Port of SNMP. The default is 161 |
|
||||
| SNMP Version | SNMP version to use |
|
||||
| SNMP Community | Used in SNMP v1 and SNMP v2c, used to complete authentication in SNMP Agent, in string form. Group name includes "read" and "write", when performing SNMP query operation, "read" group name is used for authentication; when performing SNMP setting operation, "write" group name is used for authentication. When performing SNMP query operation, "read" group name is used for authentication; when performing SNMP setting operation, "write" group name is used for authentication. |
|
||||
| SNMP username | For SNMP v3, MSG username |
|
||||
| SNMP contextName | For SNMP v3, used to determine the MIB view of the Context EngineID to the managed device |
|
||||
| SNMP authPassword | For SNMP v3, SNMP authentication passwords |
|
||||
| authPassword Encryption | For SNMP v3, SNMP authentication algorithm |
|
||||
| SNMP privPassphrase | For SNMP v3, SNMP encrypted passwords |
|
||||
| privPassword Encryption | For SNMP v3, SNMP encrypted algorithm |
|
||||
| Timeout | Set the timeout time when querying unresponsive data, in milliseconds, the default is 6000 milliseconds |
|
||||
| Intervals | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
|
||||
| Description | For more information about identifying and describing this monitoring, users can note information here |
|
||||
|
||||
### Collection Metric
|
||||
|
||||
Since there are too many metrics that can be queried on Huawei switches, detailed metrics can be queried
|
||||
on [Huawei MIB Query Platform](https://info.support.huawei.com/info-finder/tool/en/enterprise/mib).
|
||||
|
||||
This document only introduces the monitoring indicators queried in the monitor template.
|
||||
|
||||
#### Metric set: huawei_core
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ifIndex | none | Interface index. This value is greater than zero and globally unique. |
|
||||
| ifDescr | none | A textual string containing information about the interface. This string should include the name of the manufacturer, the product name and the version of the interface hardware/software. |
|
||||
| ifMtu | octets | The size of the largest packet which can be sent/received on the interface. For interfaces that are used for transmitting network datagrams, this is the size of the largest network datagram that can be sent on the interface. |
|
||||
| ifSpeed | bit/s | An estimate of the interface's current bandwidth. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. If the bandwidth of the interface is greater than the maximum value reportable by this object then this object should report its maximum value (4,294,967,295) and ifHighSpeed must be used to report the interace's speed. For a sub-layer which has no concept of bandwidth, this object should be zero. |
|
||||
| ifInOctets | octets | The total number of octets received on the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
|
||||
| ifInDiscards | none | The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
|
||||
| ifInErrors | none | For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
|
||||
| ifOutOctets | octets | The total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
|
||||
| ifOutDiscards | none | The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
|
||||
| ifOutErrors | none | For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
|
||||
| ifAdminStatus | none | The desired state of the interface. The testing(3) state indicates that no operational packets can be passed. When a managed system initializes, all interfaces start with ifAdminStatus in the down(2) state. As a result of either explicit management action or per configuration information retained by the managed system, ifAdminStatus is then changed to either the up(1) or testing(3) states (or remains in the down(2) state). |
|
||||
| ifOperStatus | none | The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. If ifAdminStatus is down(2) then ifOperStatus should be down(2). If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic; it should change to dormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection); it should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state; it should remain in the notPresent(6) state if the interface has missing (typically, hardware) components. |
|
||||
@@ -0,0 +1,140 @@
|
||||
---
|
||||
id: hugegraph
|
||||
title: Monitoring HugeGraph
|
||||
sidebar_label: Apache HugeGraph
|
||||
keywords: [Open Source Monitoring System, Open Source Database Monitoring, HugeGraph Monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance metrics of HugeGraph
|
||||
|
||||
**Protocol used: HTTP**
|
||||
|
||||
## Pre-monitoring Operations
|
||||
|
||||
Check the `rest-server.properties` file to obtain the value of the `restserver_port` configuration item, which is used for monitoring.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The IPv4, IPv6, or domain name of the monitored endpoint. Note ⚠️ Do not include protocol headers (eg: https://, http://). |
|
||||
| Port | Port number of the HugeGraph restserver, default is 8080. i.e., the value of the `restserver_port` parameter |
|
||||
| Enable SSL | Enable SSL usage |
|
||||
| Base Path | Base path, default is: /metrics, usually does not need to be modified |
|
||||
| Task Name | Identifies the name of this monitoring, ensuring uniqueness. |
|
||||
| Collection Interval | Interval for periodically collecting data for monitoring, in seconds, with a minimum interval of 30 seconds |
|
||||
| Probe Enabled | Whether to probe before adding new monitoring, only continue with add/modify operations if the probe is successful |
|
||||
| Description | Additional identification and description of this monitoring, users can add information here |
|
||||
|
||||
### Metrics Collection
|
||||
|
||||
#### Metric Set: gauges
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|--------------------------------|-------------|----------------------------------------------------------------|
|
||||
| edge-hugegraph-capacity | NONE | Indicates the capacity limit of edges in the current graph |
|
||||
| edge-hugegraph-expire | NONE | Indicates the expiration time of edge data |
|
||||
| edge-hugegraph-hits | NONE | Indicates the number of hits in the edge data cache |
|
||||
| edge-hugegraph-miss | NONE | Indicates the number of misses in the edge data cache |
|
||||
| edge-hugegraph-size | NONE | Indicates the number of edges in the current graph |
|
||||
| instances | NONE | Indicates the number of currently running HugeGraph instances |
|
||||
| schema-id-hugegraph-capacity | NONE | Indicates the capacity limit of schema IDs in the graph |
|
||||
| schema-id-hugegraph-expire | NONE | Indicates the expiration time of schema ID data |
|
||||
| schema-id-hugegraph-hits | NONE | Indicates the number of hits in the schema ID data cache |
|
||||
| schema-id-hugegraph-miss | NONE | Indicates the number of misses in the schema ID data cache |
|
||||
| schema-id-hugegraph-size | NONE | Indicates the number of schema IDs in the current graph |
|
||||
| schema-name-hugegraph-capacity | NONE | Indicates the capacity limit of schema names in the graph |
|
||||
| schema-name-hugegraph-expire | NONE | Indicates the expiration time of schema name data |
|
||||
| schema-name-hugegraph-hits | NONE | Indicates the number of hits in the schema name data cache |
|
||||
| schema-name-hugegraph-miss | NONE | Indicates the number of misses in the schema name data cache |
|
||||
| schema-name-hugegraph-size | NONE | Indicates the number of schema names in the current graph |
|
||||
| token-hugegraph-capacity | NONE | Indicates the capacity limit of tokens in the graph |
|
||||
| token-hugegraph-expire | NONE | Indicates the expiration time of token data |
|
||||
| token-hugegraph-hits | NONE | Indicates the number of hits in the token data cache |
|
||||
| token-hugegraph-miss | NONE | Indicates the number of misses in the token data cache |
|
||||
| token-hugegraph-size | NONE | Indicates the number of tokens in the current graph |
|
||||
| users-hugegraph-capacity | NONE | Indicates the capacity limit of users in the graph |
|
||||
| users-hugegraph-expire | NONE | Indicates the expiration time of user data |
|
||||
| users-hugegraph-hits | NONE | Indicates the number of hits in the user data cache |
|
||||
| users-hugegraph-miss | NONE | Indicates the number of misses in the user data cache |
|
||||
| users-hugegraph-size | NONE | Indicates the number of users in the current graph |
|
||||
| users_pwd-hugegraph-capacity | NONE | Indicates the capacity limit of user passwords |
|
||||
| users_pwd-hugegraph-expire | NONE | Indicates the expiration time of user password data |
|
||||
| users_pwd-hugegraph-hits | NONE | Indicates the number of hits in the user password data cache |
|
||||
| users_pwd-hugegraph-miss | NONE | Indicates the number of misses in the user password data cache |
|
||||
| users_pwd-hugegraph-size | NONE | Indicates the number of user passwords in the current graph |
|
||||
| vertex-hugegraph-capacity | NONE | Indicates the capacity limit of vertices in the graph |
|
||||
| vertex-hugegraph-expire | NONE | Indicates the expiration time of vertex data |
|
||||
| vertex-hugegraph-hits | NONE | Indicates the number of hits in the vertex data cache |
|
||||
| vertex-hugegraph-miss | NONE | Indicates the number of misses in the vertex data cache |
|
||||
| vertex-hugegraph-size | NONE | Indicates the number of vertices in the current graph |
|
||||
| batch-write-threads | NONE | Indicates the number of threads for batch write operations |
|
||||
| max-write-threads | NONE | Indicates the maximum number of threads for write operations |
|
||||
| pending-tasks | NONE | Indicates the number of pending tasks |
|
||||
| workers | NONE | Indicates the current number of worker threads |
|
||||
| average-load-penalty | NONE | Indicates the average load penalty |
|
||||
| estimated-size | NONE | Indicates the estimated data size |
|
||||
| eviction-count | NONE | Indicates the number of evicted data entries |
|
||||
| eviction-weight | NONE | Indicates the weight of evicted data |
|
||||
| hit-count | NONE | Indicates the total cache hits |
|
||||
| hit-rate | NONE | Indicates the cache hit rate |
|
||||
| load-count | NONE | Indicates the number of data loads |
|
||||
| load-failure-count | NONE | Indicates the number of data load failures |
|
||||
| load-failure-rate | NONE | Indicates the data load failure rate |
|
||||
| load-success-count | NONE | Indicates the number of successful data loads |
|
||||
| long-run-compilation-count | NONE | Indicates the number of long-running compilations |
|
||||
| miss-count | NONE | Indicates the total cache misses |
|
||||
| miss-rate | NONE | Indicates the cache miss rate |
|
||||
| request-count | NONE | Indicates the total request count |
|
||||
| total-load-time | NONE | Indicates the total data load time |
|
||||
| sessions | NONE | Indicates the current number of active sessions |
|
||||
|
||||
#### Metric Set: counters
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-----------------------------------------------------|-------------|--------------------------------------------------------------------------------|
|
||||
| GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests |
|
||||
| GET-TOTAL_COUNTER | NONE | Records the total number of GET requests |
|
||||
| favicon-ico-GET-FAILED_COUNTER | NONE | Records the number of failed GET requests to retrieve favicon.ico |
|
||||
| favicon-ico-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve favicon.ico |
|
||||
| graphs-HEAD-FAILED_COUNTER | NONE | Records the number of failed HEAD requests for graphs resources |
|
||||
| graphs-HEAD-SUCCESS_COUNTER | NONE | Records the number of successful HEAD requests for graphs resources |
|
||||
| graphs-HEAD-TOTAL_COUNTER | NONE | Records the total number of HEAD requests for graphs resources |
|
||||
| graphs-hugegraph-graph-vertices-GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests for vertices in HugeGraph graphs |
|
||||
| graphs-hugegraph-graph-vertices-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests for vertices in HugeGraph graphs |
|
||||
| metrics-GET-FAILED_COUNTER | NONE | Records the number of failed GET requests to retrieve metrics |
|
||||
| metrics-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve metrics |
|
||||
| metrics-GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests to retrieve metrics |
|
||||
| metrics-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve metrics |
|
||||
| metrics-gauges-GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests to retrieve metrics gauges |
|
||||
| metrics-gauges-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve metrics gauges |
|
||||
|
||||
#### Metric Set: system
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|---------------------------------------------|-------------|---------------------------------------------------------------------------------------------------------|
|
||||
| mem | NONE | Indicates the total memory of the system |
|
||||
| mem_total | NONE | Indicates the total memory of the system (same as mem) |
|
||||
| mem_used | NONE | Indicates the currently used memory of the system |
|
||||
| mem_free | NONE | Indicates the free memory of the system |
|
||||
| mem_unit | NONE | Indicates the unit of memory (such as bytes, kilobytes, megabytes, etc.) |
|
||||
| processors | NONE | Indicates the number of processors in the system |
|
||||
| uptime | NONE | Indicates the system uptime, i.e., the time since booting |
|
||||
| systemload_average | NONE | Indicates the average system load, reflecting the system's busyness |
|
||||
| heap_committed | NONE | Indicates the committed size of JVM heap memory, i.e., the guaranteed heap memory size available to JVM |
|
||||
| heap_init | NONE | Indicates the initial size of JVM heap memory |
|
||||
| heap_used | NONE | Indicates the currently used JVM heap memory size |
|
||||
| heap_max | NONE | Indicates the maximum available size of JVM heap memory |
|
||||
| nonheap_committed | NONE | Indicates the committed size of JVM non-heap memory |
|
||||
| nonheap_init | NONE | Indicates the initial size of JVM non-heap memory |
|
||||
| nonheap_used | NONE | Indicates the currently used JVM non-heap memory size |
|
||||
| nonheap_max | NONE | Indicates the maximum available size of JVM non-heap memory |
|
||||
| thread_peak | NONE | Indicates the peak number of threads since JVM startup |
|
||||
| thread_daemon | NONE | Indicates the current number of active daemon threads |
|
||||
| thread_total_started | NONE | Indicates the total number of threads started since JVM startup |
|
||||
| thread_count | NONE | Indicates the current number of active threads |
|
||||
| garbage_collector_g1_young_generation_count | NONE | Indicates the number of young generation garbage collections by G1 garbage collector |
|
||||
| garbage_collector_g1_young_generation_time | NONE | Indicates the total time spent in young generation garbage collections by G1 garbage collector |
|
||||
| garbage_collector_g1_old_generation_count | NONE | Indicates the number of old generation garbage collections by G1 garbage collector |
|
||||
| garbage_collector_g1_old_generation_time | NONE | Indicates the total time spent in old generation garbage collections by G1 garbage collector |
|
||||
| garbage_collector_time_unit | NONE | Indicates the unit of garbage collection time (such as milliseconds, seconds, etc.) |
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
id: iceberg
|
||||
title: Monitoring Apache Iceberg
|
||||
sidebar_label: Apache Iceberg
|
||||
keywords: [open source monitoring tool, open source apache hive monitoring tool, monitoring apache iceberg metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance metrics exposed by the Apache Iceberg.
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
If you want to monitor information in `Apache Iceberg` with this monitoring type, you need to open your `Hive Server2` in remoting mode.
|
||||
|
||||
**1、Enable metastore:**
|
||||
|
||||
```shell
|
||||
hive --service metastore &
|
||||
```
|
||||
|
||||
**2. Enable hive server2:**
|
||||
|
||||
```shell
|
||||
hive --service hiveserver2 &
|
||||
```
|
||||
|
||||
### Configure parameters
|
||||
|
||||
| Parameter name | Parameter Help describes the |
|
||||
|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). |
|
||||
| Monitoring Name | A name that identifies this monitoring that needs to be unique. |
|
||||
| Port | The default port provided by the database is 10002. |
|
||||
| Enable HTTPS | Whether to access the website through HTTPS, please note that ⚠️ when HTTPS is enabled, the default port needs to be changed to 443 |
|
||||
| Collection interval | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to probe | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation |
|
||||
| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here |
|
||||
|
||||
### Collect metrics
|
||||
|
||||
#### metric Collection: basic
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|-------------|-------------|-----------------------------------------------------------|
|
||||
| vm_name | None | The name of the virtual machine (VM) running HiveServer2. |
|
||||
| vm_vendor | None | The vendor or provider of the virtual machine. |
|
||||
| vm_version | None | The version of the virtual machine. |
|
||||
| up_time | None | The duration for which HiveServer2 has been running. |
|
||||
|
||||
#### metric Collection: environment
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|----------------------|-------------|-------------------------------------------------------------------|
|
||||
| https_proxyPort | None | The port number used for HTTPS proxy communication. |
|
||||
| os_name | None | The name of the operating system on which HiveServer2 is running. |
|
||||
| os_version | None | The version of the operating system. |
|
||||
| os_arch | None | The architecture of the operating system. |
|
||||
| java_runtime_name | None | The name of the Java runtime environment used by HiveServer2. |
|
||||
| java_runtime_version | None | The version of the Java runtime environment. |
|
||||
|
||||
#### metric Collection: thread
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|----------------------|-------------|----------------------------------------------------------------------|
|
||||
| thread_count | None | The current number of threads being used by HiveServer2. |
|
||||
| total_started_thread | None | The total count of threads started by HiveServer2 since its launch. |
|
||||
| peak_thread_count | None | The highest number of threads used by HiveServer2 at any given time. |
|
||||
| daemon_thread_count | None | The number of daemon threads currently active in HiveServer2. |
|
||||
|
||||
#### metric Collection: code_cache
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|-------------|-------------|-------------------------------------------------------------------------|
|
||||
| committed | MB | The amount of memory currently allocated for the memory pool. |
|
||||
| init | MB | The initial amount of memory requested for the memory pool. |
|
||||
| max | MB | The maximum amount of memory that can be allocated for the memory pool. |
|
||||
| used | MB | The amount of memory currently being used by the memory pool. |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user