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,useage` 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,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 reponse 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 indicaotr 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 reponse 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,85 @@
|
||||
---
|
||||
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 PPMC 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 either by contributing to the codebase
|
||||
of the main website or HertzBeat's GitHub repositories.
|
||||
|
||||
- +3 months with light activity and engagement.
|
||||
- +2 months of medium activity and engagement.
|
||||
- +1 month with solid 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,85 @@
|
||||
---
|
||||
id: 'become_pmc_member'
|
||||
title: 'Become A PPMC 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 PPMC member of Apache HertzBeat
|
||||
|
||||
Anyone being supportive of the community and working in any of the
|
||||
CoPDoC areas can become an Apache HertzBeat PPMC 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 PPMC membership and at last voted in as a HertzBeat
|
||||
PMC member. Being an Apache HertzBeat PPMC 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.
|
||||
|
||||
## PPMC member requirements
|
||||
|
||||
There are no strict rules for becoming a committer or PPMC member.
|
||||
Candidates for new PPMC 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 either by contributing to the codebase
|
||||
of the main website or HertzBeat's GitHub repositories.
|
||||
|
||||
- +5 months with light activity and engagement.
|
||||
- +4 months of medium activity and engagement.
|
||||
- +3 month with solid 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 `npm 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 "home/**/*.md"` in the project to automatically detect the Markdown file format.
|
||||
3. Run `markdownlint --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,171 @@
|
||||
---
|
||||
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/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+`, `java17` 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 Yarn` Environment, Make sure `Node.js >= 18`
|
||||
|
||||
2. Cd to the `web-app` directory: `cd web-app`
|
||||
|
||||
3. Install yarn if not existed `npm install -g yarn`
|
||||
|
||||
4. Install Dependencies: `yarn install` or `yarn 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: `yarn 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 coed 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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
[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.
|
||||
|
||||
Add WeChat account `ahertzbeat` to pull you into the WeChat group.
|
||||
|
||||
## 🥐 Architecture
|
||||
|
||||
- **[manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager)** Provide monitoring management, system management basic services.
|
||||
|
||||
> Provides monitoring management, monitoring configuration management, system user management, etc.
|
||||
>
|
||||
> - **[collector](https://github.com/apache/hertzbeat/tree/master/hertzbeat-collector)** Provide metrics data collection services.
|
||||
> Use common protocols to remotely collect and obtain peer-to-peer metrics data.
|
||||
> - **[warehouse](https://github.com/apache/hertzbeat/tree/master/hertzbeat-warehouse)** Provide monitoring data warehousing services.
|
||||
> Metrics data management, data query, calculation and statistics.
|
||||
> - **[alerter](https://github.com/apache/hertzbeat/tree/master/hertzbeat-alerter)** Provide alert service.
|
||||
> Alarm calculation trigger, monitoring status linkage, alarm configuration, and alarm notification.
|
||||
> - **[web-app](https://github.com/apache/hertzbeat/tree/master/web-app)** Provide web ui.
|
||||
> Angular Web UI.
|
||||
|
||||

|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
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+`, `java17` 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 Yarn` Environment, Make sure `Node.js >= 18`
|
||||
|
||||
2. Cd to the `web-app` directory: `cd web-app`
|
||||
|
||||
3. Install yarn if not existed `npm install -g yarn`
|
||||
|
||||
4. Install Dependencies: `yarn install` or `yarn 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: `yarn start`
|
||||
|
||||
6. Browser access to localhost:4200 to start, default account/password is *admin/hertzbeat*
|
||||
|
||||
## Build HertzBeat binary package
|
||||
|
||||
> Requires `maven3+`, `java17`, `node` and `yarn` environments.
|
||||
|
||||
### Frontend build
|
||||
|
||||
1. Need `Node Yarn` Environment, Make sure `Node.js >= 18`
|
||||
|
||||
2. Cd to the `web-app` directory: `cd web-app`
|
||||
|
||||
3. Install yarn if not existed `npm install -g yarn`
|
||||
|
||||
4. Install Dependencies: `yarn install` or `yarn install --registry=https://registry.npmmirror.com` in `web-app`
|
||||
|
||||
5. Build web-app: `yarn package`
|
||||
|
||||
### Backend build
|
||||
|
||||
1. Requires `maven3+`, `java17` environments
|
||||
|
||||
2. Execute under the project root directory: `mvn clean package -Prelease`
|
||||
|
||||
The HertzBeat install package will at `dist/hertzbeat-{version}.tar.gz`
|
||||
|
||||
### Collector build
|
||||
|
||||
1. Requires `maven3+`, `java17` environments
|
||||
|
||||
2. Execute under the project root directory: `mvn clean install`
|
||||
|
||||
3. Cd to the `hertzbeat-collector` directory: `cd hertzbeat-collector`
|
||||
|
||||
4. Execute under `hertzbeat-collector` directory: `mvn clean package -Pcluster`
|
||||
|
||||
The HertzBeat collector package will at `dist/hertzbeat-collector-{version}.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 `npm install` to install the required dependent libraries.
|
||||
4. In `home` directory run `npm run start`, you can visit [http://localhost:3000](http://localhost:3000) to view the English mode preview of the site
|
||||
5. In `home` directory run `npm run 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 `npm run 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 && yarn
|
||||
|
||||
yarn md-lint
|
||||
|
||||
# If the documentation is wrong, you can use yarn md-lint-fix to fix it.
|
||||
yarn 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,622 @@
|
||||
---
|
||||
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.6.0 as an example.
|
||||
|
||||
## 1. Environmental requirements
|
||||
|
||||
This release process is operated in the UbuntuOS(Windows,Mac), and the following tools are required:
|
||||
|
||||
- JDK 17
|
||||
- Node18 Yarn
|
||||
- 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/incubator/hertzbeat](https://dist.apache.org/repos/dist/release/incubator/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/incubator/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.6.0-rc1, And create a tag named v1.6.0-rc1 based on the release-1.6.0-rc1 branch, and set this tag as pre-release
|
||||
|
||||
```shell
|
||||
git checkout master
|
||||
git checkout -b release-1.6.0-rc1
|
||||
```
|
||||
|
||||
#### 3.2 checkout release branch to local
|
||||
|
||||
```shell
|
||||
git checkout release-1.6.0-rc1
|
||||
```
|
||||
|
||||
#### 3.3 Compile the binary package
|
||||
|
||||
> Build HertzBeat server binary, run script in `web-app`
|
||||
|
||||
```shell
|
||||
yarn install
|
||||
|
||||
yarn 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
|
||||
```
|
||||
|
||||
The release package are here:
|
||||
|
||||
- `dist/apache-hertzbeat-{version}-incubating-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-collector-{version}-incubating-bin.tar.gz`
|
||||
- `dist/apache-hertzbeat-{version}-incubating-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.6.0-incubating-src.tar.gz" \
|
||||
--prefix=apache-hertzbeat-1.6.0-incubating-src/ \
|
||||
release-1.6.0-rc1
|
||||
```
|
||||
|
||||
The archive package is here `dist/apache-hertzbeat-1.6.0-incubating-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.6.0-incubating-src.tar.gz
|
||||
apache-hertzbeat-1.6.0-incubating-src.tar.gz.asc
|
||||
apache-hertzbeat-1.6.0-incubating-src.tar.gz.sha512
|
||||
apache-hertzbeat-1.6.0-incubating-bin.tar.gz
|
||||
apache-hertzbeat-1.6.0-incubating-bin.tar.gz.asc
|
||||
apache-hertzbeat-1.6.0-incubating-bin.tar.gz.sha512
|
||||
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz
|
||||
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz.asc
|
||||
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz.sha512
|
||||
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz
|
||||
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz.asc
|
||||
apache-hertzbeat-collector-1.6.0-incubating-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.6.0-incubating-src.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_2.11-1.6.0-incubating-bin.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_2.12-1.6.0-incubating-bin.tar.gz
|
||||
gpg: Signature made Tue May 2 12:16:37 2023 CST
|
||||
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
|
||||
gpg: BAD 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.6.0-incubating-src.tar.gz
|
||||
apache-hertzbeat-1.6.0-incubating-src.tar.gz: OK
|
||||
apache-hertzbeat-1.6.0-incubating-bin.tar.gz
|
||||
apache-hertzbeat-1.6.0-incubating-bin.tar.gz: OK
|
||||
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz
|
||||
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz: OK
|
||||
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz
|
||||
apache-hertzbeat-collector-1.6.0-incubating-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.6.0-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.6.0- RC2.
|
||||
|
||||
```shell
|
||||
mkdir -p svn/dev/1.6.0-RC1
|
||||
cp -f dist/* svn/dev/1.6.0-RC1
|
||||
```
|
||||
|
||||
- Commit to SVN
|
||||
|
||||
```shell
|
||||
cd svn/dev
|
||||
|
||||
# 1.check svn status
|
||||
svn status
|
||||
|
||||
# 2. add to svn
|
||||
svn add 1.6.0-RC1
|
||||
|
||||
svn status
|
||||
|
||||
# 3. Submit to svn remote server
|
||||
svn commit -m "release for HertzBeat 1.6.0"
|
||||
```
|
||||
|
||||
- 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.6.0 rc1 <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Hello HertzBeat Community:
|
||||
|
||||
This is a call for vote to release Apache HertzBeat version release-1.6.0-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.6.0-rc1
|
||||
|
||||
The release candidates:
|
||||
https://dist.apache.org/repos/dist/dev/hertzbeat/1.6.0-RC1/
|
||||
|
||||
Git tag for the release:
|
||||
https://github.com/apache/hertzbeat/releases/tag/v1.6.0-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.
|
||||
|
||||
More detail checklist please refer:
|
||||
https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist
|
||||
|
||||
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.6.0-rc1 <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Dear HertzBeat community,
|
||||
|
||||
Thanks for your review and vote for "Release Apache HertzBeat 1.6.0-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)
|
||||
|
||||
#### 3.2 Send Incubator Community voting mail
|
||||
|
||||
Send a voting email in the incubator community requires at least three `+1` and no `-1`.
|
||||
|
||||
> `Send to`: [general@incubator.apache.org](mailto:general@incubator.apache.org) <br />
|
||||
> `cc`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)、[private@hertzbeat.apache.org](mailto:private@hertzbeat.apache.org) <br />
|
||||
> `Title`: [VOTE] Release Apache HertzBeat 1.6.0-rc1 <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Hello Incubator Community:
|
||||
|
||||
This is a call for a vote to release Apache HertzBeat version 1.6.0-RC1.
|
||||
The Apache HertzBeat community has voted on and approved a proposal to release Apache HertzBeat version 1.6.0-RC1.
|
||||
We now kindly request the Incubator PPMC members review and vote on this incubator release.
|
||||
Apache HertzBeat, a real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
|
||||
HertzBeat community vote thread:
|
||||
https://lists.apache.org/thread/t01b2lbtqzyt7j4dsbdp5qjc3gngjsdq
|
||||
|
||||
Vote result thread:
|
||||
https://lists.apache.org/thread/t5z58mvrs1drgzfyc48c9lhmd8skswn7
|
||||
|
||||
The release candidate:
|
||||
https://dist.apache.org/repos/dist/dev/hertzbeat/1.6.0-RC1/
|
||||
|
||||
Git tag for the release:
|
||||
https://github.com/apache/hertzbeat/releases/tag/v1.6.0-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
|
||||
|
||||
More detailed checklist please refer:
|
||||
• https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist
|
||||
|
||||
Steps to validate the release, Please refer to:
|
||||
• https://www.apache.org/info/verification.html
|
||||
• 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,
|
||||
|
||||
On behalf of Apache HertzBeat community
|
||||
---
|
||||
Best,
|
||||
ChunJin Mu
|
||||
```
|
||||
|
||||
If there is no -1 after 72 hours, reply to the email as follows
|
||||
|
||||
> `Send to`: [general@incubator.apache.org](mailto:general@incubator.apache.org) <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Thanks everyone for review and vote, 72H passed. I'll announce the vote result soon.
|
||||
|
||||
Best,
|
||||
Chunjin Mu
|
||||
```
|
||||
|
||||
Then the voting results will be counted, and the voting result email will be sent, as follows.
|
||||
|
||||
> `Send to`: [general@incubator.apache.org](mailto:general@incubator.apache.org) <br />
|
||||
> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat 1.6.0-rc1 <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Hi Incubator Community,
|
||||
|
||||
The vote to release Apache HertzBeat 1.6.0-rc4 has passed with 3 +1 binding and no +0 or -1 votes.
|
||||
|
||||
3 binding votes, no +0 or -1 votes.
|
||||
|
||||
+3 (binding) +1, from:
|
||||
- xxx
|
||||
|
||||
no 0 or -1 votes.
|
||||
|
||||
Vote thread:
|
||||
|
||||
https://lists.apache.org/thread/m1kyn4l30y55p6q39m0ys5djvdd73h0f
|
||||
|
||||
Thanks everyone for your feedback and help with HertzBeat apache release. The HertzBeat team will take the steps to complete this release and will announce it soon.
|
||||
|
||||
Best,
|
||||
ChunJin Mu
|
||||
```
|
||||
|
||||
One item of the email content is `Vote thread`, and the link is obtained here: [https://lists.apache.org/list.html?general@incubator.apache.org](https://lists.apache.org/list.html?general@incubator.apache.org)
|
||||
|
||||
Wait a day to see if the tutor has any other comments, if not, send the following announcement email
|
||||
|
||||
## 5. Complete the final publishing steps
|
||||
|
||||
### 5.1 Migrating source and binary packages
|
||||
|
||||
```shell
|
||||
svn mv https://dist.apache.org/repos/dist/dev/hertzbeat/1.6.0-RC1 https://dist.apache.org/repos/dist/release/incubator/hertzbeat/1.6.0 -m "transfer packages for 1.6.0-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.6.0 based on the release-1.6.0-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.6.0
|
||||
```
|
||||
|
||||
- Describe:
|
||||
|
||||
```text
|
||||
xxx
|
||||
release note: xxx
|
||||
```
|
||||
|
||||
Then click the `Publish release` button.
|
||||
|
||||
The rename the release-1.6.0-rc1 branch to release-1.6.0.
|
||||
|
||||
#### 4.5 Send new version announcement email
|
||||
|
||||
> `Send to`: [general@incubator.apache.org](mailto:general@incubator.apache.org) <br />
|
||||
> `cc`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) <br />
|
||||
> `Title`: [ANNOUNCE] Apache HertzBeat 1.6.0 released <br />
|
||||
> `Body`:
|
||||
|
||||
```text
|
||||
Hi Community,
|
||||
|
||||
We are glad to announce the release of Apache HertzBeat 1.6.0.
|
||||
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.6.0
|
||||
|
||||
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,198 @@
|
||||
---
|
||||
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-xxx-incubating-src.tar.gz
|
||||
gpg: Signature made XXXX
|
||||
gpg: using RSA key XXXXX
|
||||
gpg: Good signature from "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}-incubating-bin.tar.gz`
|
||||
|
||||
```shell
|
||||
tar -xzvf apache-hertzbeat-${release.version}-incubating-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`-incubating-src.tar.gz`
|
||||
|
||||
```shell
|
||||
cd apache-hertzbeat-`release_version`-incubating-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
|
||||
<font color="red">
|
||||
When replying to the email, you must bring the information that you have checked by yourself. Simply replying to `+1 approve` is invalid.
|
||||
|
||||
When PPMC 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.
|
||||
|
||||
When IPMC votes in the [general@incubator.apache.org](mailto:general@incubator.apache.org) incubator community. Please bring the binding suffix to indicate that the voting in the incubator community has a binding vote, which is convenient for counting the voting results.
|
||||
</font>
|
||||
|
||||
:::caution
|
||||
If you have already voted on [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), you can take it directly to the incubator community when you reply to the vote, such as:
|
||||
|
||||
```html
|
||||
//Incubator community voting, only IPMC members have binding binding,PPMC needs to be aware of binding changes
|
||||
Forward my +1 from dev@listhertzbeatnkis (non-binding)
|
||||
Copy my +1 from hertzbeat DEV ML (non-binding)
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
Non-PPMC/Non-IPMC 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.
|
||||
```
|
||||
|
||||
PPMC/IPMC member:
|
||||
|
||||
```text
|
||||
//Incubator community voting, only IPMC members have binding binding
|
||||
+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,285 @@
|
||||
---
|
||||
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 PPMC,
|
||||
|
||||
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 PPMC,
|
||||
|
||||
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: `NEW_COMMITTER_EMAIL`
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Invitation to become HertzBeat committer: `NEW_COMMITTER_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hello `NEW_COMMITTER_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.
|
||||
|
||||
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 [Project] 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 PPMC
|
||||
```
|
||||
|
||||
### 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 (PPMC) 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,284 @@
|
||||
---
|
||||
id: 'new_pmc_ember_process'
|
||||
title: 'New PPMC 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 PPMC 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 PPMC member
|
||||
|
||||
see **Board Approval of new PPMC member**
|
||||
|
||||
- If the result is positive, invite the new PPMC member
|
||||
|
||||
see **PMC member Invite Template**
|
||||
|
||||
- If accept, then: Accept the PPMC member
|
||||
|
||||
see **PMC Member Accept Template**
|
||||
|
||||
- Notify the PPMC member of completion
|
||||
|
||||
see **PMC Member Done Template**
|
||||
|
||||
- Announce the new PPMC 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
|
||||
|
||||
### PPMC Member Vote Template
|
||||
|
||||
```text
|
||||
To: private@hertzbeat.apache.org
|
||||
Subject: [VOTE] New PPMC member candidate: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat PPMC,
|
||||
|
||||
This is a formal vote about inviting `NEW_PMC_NAME` as our new PPMC 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 PPMC member: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat PPMC,
|
||||
|
||||
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 PPMC member Template
|
||||
|
||||
```text
|
||||
To: board@apache.org
|
||||
Cc: private@`<project>`.apache.org
|
||||
Subject: [NOTICE] `NEW_PMC_NAME` for HertzBeat PPMC 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)
|
||||
|
||||
### PPMC Member Invite Template
|
||||
|
||||
```text
|
||||
To: `NEW_PMC_EMAIL`
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Invitation to become HertzBeat PPMC member: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hello `NEW_PMC_NAME`,
|
||||
|
||||
The HertzBeat Project Management Committee (PMC)
|
||||
hereby offers you committer privileges to the project
|
||||
as well as membership in the PMC.
|
||||
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 PPMC member enables you to guide the direction of the project.
|
||||
|
||||
Being a PPMC member 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.
|
||||
|
||||
A. This personal invitation is a chance for you to
|
||||
accept or decline in private. Either way, please
|
||||
let us know in reply to the private@hertzbeat.apache.org
|
||||
address only.
|
||||
|
||||
B. If you accept, the next step is to register 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/#submitting
|
||||
|
||||
3. When you transmit the completed iCLA, request
|
||||
to notify the Apache HertzBeat 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 PPMC
|
||||
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 PPMC member.
|
||||
```
|
||||
|
||||
### PPMC Member Accept Template
|
||||
|
||||
```text
|
||||
To: `NEW_PMC_EMAIL`
|
||||
Cc: private@hertzbeat.apache.org
|
||||
Subject: Re: invitation to become HertzBeat PPMC 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 PPMC 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 PPMC
|
||||
```
|
||||
|
||||
### PPMC 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 PPMC member will announce your election to the dev list soon.
|
||||
```
|
||||
|
||||
### PPMC Member Announce Template
|
||||
|
||||
```text
|
||||
To: dev@hertzbeat.apache.org
|
||||
[ANNONCE] New PPMC member: `NEW_PMC_NAME`
|
||||
```
|
||||
|
||||
```text
|
||||
Hi HertzBeat Community,
|
||||
|
||||
The Podling Project Management Committee (PPMC) for Apache HertzBeat
|
||||
has invited `NEW_PMC_NAME` to become our PPMC 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 PPMC member helps manage and guide the direction of the project.
|
||||
|
||||
Thanks,
|
||||
On behalf of the Apache HertzBeat PPMC
|
||||
```
|
||||
@@ -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,38 @@
|
||||
---
|
||||
id: download
|
||||
title: Download Apache HertzBeat
|
||||
sidebar_label: Download
|
||||
---
|
||||
|
||||
> **Here is the Apache HertzBeat™ official download page.**
|
||||
> **Please choose version to download from the following tables. It is recommended use the latest.**
|
||||
|
||||
:::tip
|
||||
|
||||
- Please verify the release with corresponding hashes(sha512), signatures and [project release KEYS](https://downloads.apache.org/hertzbeat/KEYS).
|
||||
- Refer to [How to Verify](https://www.apache.org/dyn/closer.cgi#verify) for how to check the hashes and signatures.
|
||||
|
||||
:::
|
||||
|
||||
## The Latest Release
|
||||
|
||||
:::tip
|
||||
Previous releases of HertzBeat may be affected by security issues, please use the latest one.
|
||||
:::
|
||||
|
||||
| Version | Date | Download | Release Notes |
|
||||
| ------- | ---------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| v1.7.0 | 2025.04.02 | [apache-hertzbeat-1.7.0-incubating-bin.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-bin.tar.gz) (HertzBeat) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-bin.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-collector-1.7.0-incubating-bin.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-collector-1.7.0-incubating-bin.tar.gz) (HertzBeat Collector) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-collector-1.7.0-incubating-bin.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-collector-1.7.0-incubating-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.7.0-incubating-src.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-src.tar.gz) (HertzBeat Source) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-src.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-src.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.7.0-incubating-docker-compose.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-docker-compose.tar.gz) (docker-compose) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-docker-compose.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.7.0/apache-hertzbeat-1.7.0-incubating-docker-compose.tar.gz.sha512) ) | [release note](https://github.com/apache/hertzbeat/releases/tag/v1.7.0) |
|
||||
| v1.6.1 | 2024.10.29 | [apache-hertzbeat-1.6.1-incubating-bin.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-bin.tar.gz) (HertzBeat) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-bin.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-collector-1.6.1-incubating-bin.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-collector-1.6.1-incubating-bin.tar.gz) (HertzBeat Collector) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-collector-1.6.1-incubating-bin.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-collector-1.6.1-incubating-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.6.1-incubating-src.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-src.tar.gz) (HertzBeat Source) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-src.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-src.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.6.1-incubating-docker-compose.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-docker-compose.tar.gz) (docker-compose) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-docker-compose.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.1/apache-hertzbeat-1.6.1-incubating-docker-compose.tar.gz.sha512) ) | [release note](https://github.com/apache/hertzbeat/releases/tag/v1.6.1) |
|
||||
| v1.6.0 | 2024.06.10 | [apache-hertzbeat-1.6.0-incubating-bin.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-1.6.0-incubating-bin.tar.gz) (HertzBeat) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-1.6.0-incubating-bin.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-1.6.0-incubating-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz) (HertzBeat Collector) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz.sha512) ) <br/> [apache-hertzbeat-1.6.0-incubating-src.tar.gz](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-1.6.0-incubating-src.tar.gz) (HertzBeat Source) ( [signature](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-1.6.0-incubating-src.tar.gz.asc) , [sha512](https://archive.apache.org/dist/incubator/hertzbeat/1.6.0/apache-hertzbeat-1.6.0-incubating-src.tar.gz.sha512) ) | [release note](https://github.com/apache/hertzbeat/releases/tag/v1.6.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/).
|
||||
@@ -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,61 @@
|
||||
---
|
||||
id: aiConfig
|
||||
title: AI QuickStart
|
||||
sidebar_label: AI QuickStartr
|
||||
keywords: [AI]
|
||||
---
|
||||
|
||||
> The dialogue with artificial intelligence is achieved by configuring aiConfig in the application.yml file
|
||||
|
||||
## Configuration parameter description
|
||||
|
||||
| Name of the parameter | Parameter help description |
|
||||
|-----------------------|-----------------------------------------------------------------------|
|
||||
| type | Choose a large AI model (such as Zhipu, Tongyi thousand questions...) |
|
||||
| model | Select the model, which defaults to GLM-4 |
|
||||
| api-key | Gets the api_key, without which you cannot talk to the large model |
|
||||
|
||||
### Large model options and configuration details
|
||||
|
||||
#### ZhiPu AI
|
||||
|
||||
| Name of the parameter | Example | Link |
|
||||
|-----------------------|-----------------------------------------------------|-----------------------------------------------------------------|
|
||||
| type | zhiPu (must be exactly the same as example) | |
|
||||
| model | glm-4-0520、glm-4 、glm-4-air、glm-4-airx、 glm-4-flash | |
|
||||
| api-key | xxxxx.xxxxxx | [https://open.bigmodel.cn/login?redirect=%2Fusercenter%2Fapikeys](https://open.bigmodel.cn/login?redirect=%2Fusercenter%2Fapikeys) |
|
||||
|
||||
#### Alibaba AI
|
||||
|
||||
| Name of the parameter | Example | Link |
|
||||
|-----------------------|----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | alibabaAi (must be exactly the same as example) | |
|
||||
| model | qwen-turbo、qwen-plus、qwen-max、qwen-max-0428、qwen-max-0403、qwen-max-0107、qwen-max-longcontext | [https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction?spm=a2c4g.11186623.0.0.4e0246c1RQFKMH](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction?spm=a2c4g.11186623.0.0.4e0246c1RQFKMH) |
|
||||
| api-key | xxxxxxxxxxx | [https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key?spm=a2c4g.11186623.0.i10](https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key?spm=a2c4g.11186623.0.i10) |
|
||||
|
||||
#### Kimi AI
|
||||
|
||||
| Name of the parameter | Example | Link |
|
||||
|-----------------------|-------------------------------------------------|-----------------------------------------------|
|
||||
| type | kimiAi (must be exactly the same as example) | |
|
||||
| model | moonshot-v1-8k、moonshot-v1-32k、moonshot-v1-128k | |
|
||||
| api-key | xxxxxxxxxxx | [https://platform.moonshot.cn/console/api-keys](https://platform.moonshot.cn/console/api-keys) |
|
||||
|
||||
#### sparkDesk AI
|
||||
|
||||
QuickStart: [https://www.xfyun.cn/doc/platform/quickguide.html](https://www.xfyun.cn/doc/platform/quickguide.html)
|
||||
|
||||
| Name of the parameter | Example | Link |
|
||||
|-----------------------|--------------------------------------------------|---------------------------------------|
|
||||
| type | sparkDesk (must be exactly the same as example) | |
|
||||
| model | general、generalv2、generalv3、generalv3.5、4.0Ultra | |
|
||||
| api-key | xxxxxxxxxxx | [https://console.xfyun.cn/services/cbm](https://console.xfyun.cn/services/cbm) |
|
||||
| api-secret | xxxxxxxxxxx | [https://console.xfyun.cn/services/cbm](https://console.xfyun.cn/services/cbm) |
|
||||
|
||||
| sparkDesk version | model |
|
||||
|-------------------|-------------|
|
||||
| Spark4.0 Ultra | 4.0Ultra |
|
||||
| Spark Max | generalv3.5 |
|
||||
| Spark Pro | generalv3 |
|
||||
| Spark V2.0 | generalv2 |
|
||||
| Spark Lite(free) | general |
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
id: airflow
|
||||
title: Monitoring Apache Airflow Monitoring
|
||||
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,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,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,43 @@
|
||||
---
|
||||
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.
|
||||
Support real-time threshold and scheduled threshold, real-time threshold can directly trigger the alarm when monitoring data is collected, scheduled threshold supports PromQL and other expressions to calculate the trigger alarm 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.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|
||||
### Creating Threshold Rules
|
||||
|
||||
> 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:
|
||||
|
||||
- **Rule Name**:Unique name defining this threshold rule
|
||||
- **Metric Object**: Select the monitoring metric object for which we need to configure the threshold. For example: Under website monitoring type -> under the summary metric set -> responseTime 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. For example: ``app`.`metrics`.`metric` metric value is `responseTime`, which is greater than 50 triggering the alert`.
|
||||
- **Bind Label**: Select the label we need to apply. If no label is selected, it will apply to all services corresponding to the set metric object.
|
||||
- **Bing Annotation**: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
|
||||
@@ -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,109 @@
|
||||
---
|
||||
id: almalinux
|
||||
title: Monitoring AlmaLinux Operating System Monitoring
|
||||
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 |
|
||||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | The monitored peer's IPv4, IPv6, or domain name. Note ⚠️ No protocol header (e.g., https://, http://). |
|
||||
| Task Name | A unique name to identify this monitoring task. |
|
||||
| Port | The port provided by Linux SSH, default is 22. |
|
||||
| Timeout | Set the connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Connection Reuse | Set whether to reuse SSH connections, default is false. If false, a new connection will be created for each retrieval of information. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configure which collector to use for scheduling 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 classifying and managing monitoring resources. |
|
||||
| Description Note | Additional notes to identify and describe this monitoring, where users can make notes. |
|
||||
| Key | The key required to connect to the server. |
|
||||
|
||||
### Data Collection Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|--------------------------|
|
||||
| Host Name | None | Host name |
|
||||
| System Version | None | Operating system version |
|
||||
| Uptime | None | Uptime |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------|-------------|-----------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | Cores | Number of CPU cores |
|
||||
| interrupt | Count | Number of CPU interrupts |
|
||||
| load | None | Average CPU load (1/5/15 minutes) |
|
||||
| context_switch | Count | 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 | Count | Total number of disks |
|
||||
| partition_num | Count | Total number of partitions |
|
||||
| block_write | Blocks | Total number of blocks written to disk |
|
||||
| block_read | Blocks | 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,28 @@
|
||||
---
|
||||
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 `Add New Bulletin Item`, enter the `Bulletin Name`, scroll down to select the `Monitoring Type`, select the associated `Monitoring Task Name`, You can filter `Monitor Task Name` by `Label`, and then select the `Monitoring Metrics` you want to show in the shuttle box.
|
||||
|
||||
2. Click `OK` button to finish creating the customized bulletin.
|
||||
|
||||

|
||||
|
||||
### Viewing Multiple Bulletins
|
||||
|
||||
1. Click the name of the bulletin in the tab to view the details of that bulletin.
|
||||
|
||||
### Deleting Bulletins
|
||||
|
||||
1. Click the `Delete Bulletin Item` button to delete the current bulletin. 2.
|
||||
|
||||
2. Click the `Batch delete Bulletin Items` button to delete selected bulletins in a batch.
|
||||
|
||||

|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
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 |
|
||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 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 Linux SSH. The default is 22 |
|
||||
| Username | SSH connection user name, optional |
|
||||
| Password | SSH 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 Metric
|
||||
|
||||
#### Metric set:basic
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|--------------------------|
|
||||
| hostname | none | Host name |
|
||||
| version | none | Operating system version |
|
||||
| uptime | none | System running time |
|
||||
|
||||
#### Metric set:cpu
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|----------------|-------------|------------------------------------------------|
|
||||
| info | none | CPU model |
|
||||
| cores | cores | Number of CPU cores |
|
||||
| interrupt | number | Number of CPU interrupts |
|
||||
| load | none | Average load of CPU in the last 1/5/15 minutes |
|
||||
| context_switch | number | Number of current context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric set:memory
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | User program memory |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory occupied by cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage |
|
||||
|
||||
#### Metric set:disk
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | blocks | Total number of disks |
|
||||
| partition_num | partitions | Total number of partitions |
|
||||
| block_write | blocks | Total number of blocks written to disk |
|
||||
| block_read | blocks | Number of blocks read from disk |
|
||||
| write_rate | iops | Rate of writing disk blocks per second |
|
||||
|
||||
#### Metric set:interface
|
||||
|
||||
| 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:disk_free
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | none | File system name |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | usage |
|
||||
| mounted | none | Mount point directory |
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
id: clickhouse
|
||||
title: Monitoring ClickHouse Database Monitoring
|
||||
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,97 @@
|
||||
---
|
||||
id: debian
|
||||
title: Monitoring Debian System Monitoring
|
||||
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 | Metric help description |
|
||||
|-------------------------|-------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The monitored destination IPV4, IPV6, or domain name. Note: no protocol header (e.g., https://, http://). |
|
||||
| Task Name | A unique name to identify this monitoring task. |
|
||||
| Port | SSH port of the Debian system, default: 22 |
|
||||
| Timeout | Timeout for the connection, in milliseconds, default: 6000 milliseconds. |
|
||||
| Connection Reuse | Whether to reuse the SSH connection, default: false. False means a new connection will be created for each query. |
|
||||
| Username | Server username |
|
||||
| Password | Server password |
|
||||
| Collector | Configure which collector to use for scheduling this monitoring. |
|
||||
| Monitoring Period | The interval for periodically collecting data, in seconds, with a minimum interval of 30 seconds. |
|
||||
| Binding Tags | Used for categorizing and managing monitoring resources. |
|
||||
| Metric help description | Additional notes and Metric help descriptions for this monitoring, users can add notes here. |
|
||||
| Key | Key required to connect to the server. |
|
||||
|
||||
### Monitoring Metrics
|
||||
|
||||
#### Metric Set: Basic System Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|--------------------------|
|
||||
| Host Name | N/A | Host name |
|
||||
| System Version | N/A | Operating system version |
|
||||
| Uptime | N/A | Boot time |
|
||||
|
||||
#### Metric Set: CPU Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|-------------------------|
|
||||
| Info | N/A | Model |
|
||||
| Cores | N/A | Number of cores |
|
||||
| Interrupt | N/A | Number of interrupts |
|
||||
| Load | N/A | Load |
|
||||
| Context Switch | N/A | Context switches |
|
||||
| Usage | % | Usage rate |
|
||||
|
||||
#### Metric Set: Memory Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|---------------------|-------------|------------------------------|
|
||||
| Total Memory | Mb | Total memory capacity |
|
||||
| User Program Memory | Mb | Memory used by user programs |
|
||||
| Free Memory | Mb | Free memory capacity |
|
||||
| Buff Cache Memory | Mb | Memory used by cache |
|
||||
| Available Memory | Mb | Available memory |
|
||||
| Memory Usage | % | Memory usage rate |
|
||||
|
||||
#### Metric Set: Disk Information
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|---------------|-------------|-------------------------------|
|
||||
| Disk Num | N/A | Total number of disks |
|
||||
| Partition Num | N/A | Total number of partitions |
|
||||
| Block Write | N/A | Number of disk blocks written |
|
||||
| Block Read | N/A | Number of disk blocks read |
|
||||
| Write Rate | iops | Disk write rate |
|
||||
|
||||
#### Metric Set: Network Interface Information
|
||||
|
||||
Statistics for all network interface cards, including interface name, incoming data traffic, and outgoing data traffic.
|
||||
Metric Unit: Mb
|
||||
|
||||
#### Metric Set: File System
|
||||
|
||||
Statistics for all mounted file systems. Statistics include: file system, usage, available space, usage rate, mount point.
|
||||
Metric Unit:
|
||||
|
||||
- Usage: Mb
|
||||
- Available Space: Mb
|
||||
- Usage Rate: %
|
||||
|
||||
#### Metric Set: Top 10 CPU Processes
|
||||
|
||||
Statistics for the top 10 processes by CPU usage. Statistics include: process ID, CPU usage rate, memory usage rate, command being executed.
|
||||
Metric Unit:
|
||||
|
||||
- CPU Usage Rate: %
|
||||
- Memory Usage Rate: %
|
||||
|
||||
#### Metric Set: Top 10 Memory Processes
|
||||
|
||||
Statistics for the top 10 processes by memory usage. Statistics include: process ID, memory usage rate, CPU usage rate, command being executed.
|
||||
Metric Unit:
|
||||
|
||||
- Memory Usage Rate: %
|
||||
- CPU Usage Rate: %
|
||||
@@ -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,70 @@
|
||||
---
|
||||
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. |
|
||||
| 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,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,170 @@
|
||||
---
|
||||
id: doris_be
|
||||
title: Monitoring DORIS Database BE Monitoring
|
||||
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 Monitoring
|
||||
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,107 @@
|
||||
---
|
||||
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 |
|
||||
|---------------------|----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | The IP, IPV6, or domain name of the monitored endpoint. Note ⚠️: Do not include protocol headers (eg: https://, http://). |
|
||||
| Task Name | Identifies the name of this monitoring, ensuring uniqueness. |
|
||||
| Port | Port provided by Linux SSH externally, defaults to 22. |
|
||||
| Timeout | Sets the timeout for connection in milliseconds (ms), defaults to 6000 ms. |
|
||||
| Connection Reuse | Sets whether the SSH connection is reused, defaults to: false. Creates a new connection for each information retrieval if false. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Specifies which collector schedules the collection for this monitoring. |
|
||||
| Monitoring Interval | Interval for periodically collecting data, in seconds. Minimum interval is 30 seconds. |
|
||||
| Binding Tags | Used for categorizing and managing monitored resources. |
|
||||
| Description | Additional remarks and descriptions for this monitoring, for users' reference. |
|
||||
| PrivateKey | Key required for connecting to the server. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: Basic Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|---------------------------|
|
||||
| Host Name | None | Host name. |
|
||||
| System Version | None | Operating 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 load for the last 1/5/15 minutes. |
|
||||
| context_switch | None | Current context switches. |
|
||||
| usage | % | CPU usage percentage. |
|
||||
|
||||
#### Metric Set: Memory Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|------------------------------------|
|
||||
| total | Mb | Total memory capacity. |
|
||||
| used | Mb | Used memory by user programs. |
|
||||
| free | Mb | Free memory capacity. |
|
||||
| buff_cache | Mb | Memory used for buffers and cache. |
|
||||
| available | Mb | Available memory capacity. |
|
||||
| usage | % | Memory usage percentage. |
|
||||
|
||||
#### Metric Set: Disk Info
|
||||
|
||||
| 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 blocks written to disk. |
|
||||
| block_read | None | Total blocks read from disk. |
|
||||
| write_rate | iops | Rate of blocks written per second. |
|
||||
|
||||
#### Metric Set: Interface Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|--------------------------------|
|
||||
| interface_name | None | Name of the network interface. |
|
||||
| receive_bytes | Mb | Inbound data traffic. |
|
||||
| transmit_bytes | Mb | Outbound data traffic. |
|
||||
|
||||
#### Metric Set: Disk Free
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------|
|
||||
| filesystem | None | Name of the file system. |
|
||||
| used | Mb | Used disk space. |
|
||||
| available | Mb | Available disk space. |
|
||||
| usage | % | Disk usage percentage. |
|
||||
| mounted | None | Mount point directory. |
|
||||
|
||||
#### Metric Set: Top10 CPU Process
|
||||
|
||||
Top 10 processes consuming CPU. Metrics include: Process ID, CPU usage, Memory usage, 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
|
||||
|
||||
Top 10 processes consuming memory. Metrics include: Process ID, Memory usage, CPU usage, 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,87 @@
|
||||
---
|
||||
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 |
|
||||
|---------------------|------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | The IPv4, IPv6, or domain name of the monitored peer. Note ⚠️ without the protocol header (eg: https://, http://). |
|
||||
| Task Name | Identifies the name of this monitor, ensuring uniqueness of the name. |
|
||||
| Port | The port where SSH for Linux is exposed, default is 22. |
|
||||
| Timeout | Set the connection timeout, in milliseconds, default is 6000 milliseconds. |
|
||||
| Reuse Connection | Set whether SSH connections are reused, default is: false. If false, a connection is created for each information retrieval. |
|
||||
| Username | SSH connection username, optional. |
|
||||
| Password | SSH connection password, optional. |
|
||||
| Collector | Configure which collector to use for scheduling collection for this monitor. |
|
||||
| Monitoring Interval | Interval for periodically collecting data, in seconds. The minimum interval that can be set is 30 seconds. |
|
||||
| Bind Labels | Used to categorize and manage monitored resources. |
|
||||
| Description | Additional information for identifying and describing this monitor. Users can add remarks here. |
|
||||
| PrivateKey | Private key required to connect to the server. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metric Set: Basic Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|--------------------------|
|
||||
| Host Name | None | Host name |
|
||||
| System Version | None | Operating system version |
|
||||
| Uptime | None | System uptime |
|
||||
|
||||
#### Metric Set: CPU Info
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|----------------|-------------|----------------------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | Number | Number of CPU cores |
|
||||
| interrupt | Number | Number of CPU interrupts |
|
||||
| load | None | Average CPU load for the last 1/5/15 minutes |
|
||||
| context_switch | Number | 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,55 @@
|
||||
---
|
||||
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
|
||||
|
||||
- The `Grafana` version 8.1.0 or later is installed and running.
|
||||
- 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 url
|
||||
|
||||
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 `allow_embedding = true`.
|
||||
In the `Grafana` configuration file `grafana.ini`, set the `[auth.anonymous]` option to `true`.
|
||||
|
||||
```ini
|
||||
allow_embedding = true
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
enabled = true
|
||||
```
|
||||
|
||||
### 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,137 @@
|
||||
---
|
||||
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 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,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=对外ip地址
|
||||
-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 Monitoring
|
||||
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 Monitoring
|
||||
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 Monitoring
|
||||
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,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 |
|
||||
| The acquisition interval is | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to probe the | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | will continue only if the probe is successful |
|
||||
| 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,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 Monitoring
|
||||
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 |
|
||||
| The acquisition interval is | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to probe the | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | will continue only if the probe is successful |
|
||||
| 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,47 @@
|
||||
---
|
||||
id: imap
|
||||
title: Monitoring detailed mailbox info
|
||||
sidebar_label: mailbox Monitor
|
||||
keywords: [Open Source Monitoring System, Open Source Network Monitoring, mailbox Monitor]
|
||||
---
|
||||
|
||||
> IMAP, or Internet Message Access Protocol, allows you to retrieve detailed information from your email server.
|
||||
> You can click on `Create New QQ Email Monitoring` or `Create New Netease Email Monitoring` to configure, or select `More Actions` to import existing configurations.
|
||||
|
||||
## Enable IMAP Service
|
||||
|
||||
If you want to use this monitoring type to monitor your email information, please first enable the IMAP service in your email:
|
||||
|
||||
For example, in QQ Mail (other emails are similar):
|
||||
|
||||
1. Go to `Mail Settings`
|
||||
2. Find and enable the `IMAP/SMTP option` in `General`
|
||||
3. Obtain the IMAP server domain, port number, whether to use SSL, and authorization code from the help section
|
||||
4. Use the above information to configure in HertzBeat and collect monitoring metrics
|
||||
|
||||
### Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|:--------------------|------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | IMAP mail server domain. Note ⚠️ do not include protocol headers (e.g., https://, http://). |
|
||||
| Task Name | The name that identifies this monitoring task, which needs to be unique. |
|
||||
| Enable SSL | Whether to enable SSL. |
|
||||
| Port | The port provided by the website. |
|
||||
| Connection Timeout | The wait timeout for the port connection, in milliseconds, default is 6000 ms. |
|
||||
| IMAP Email Address | The email address to be monitored. |
|
||||
| Authorization Code | The authorization code provided by the email server. |
|
||||
| Monitoring Interval | The interval time for periodic data collection, in seconds, the minimum interval can be set to 30 seconds. |
|
||||
| Binding Tags | Classification management tags for monitoring resources. |
|
||||
| Description Notes | Additional identification and description notes for this monitoring task, users can leave notes here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
Collect information on each folder in the email (custom folders can be configured), as the metrics collected for each folder are the same, only a common set of metrics is listed below
|
||||
|
||||
#### Metrics Collection: (Folder Name in Email)
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------------|-------------|-------------------------------------------------------|
|
||||
| Total message count | None | The total number of emails in this folder |
|
||||
| Recent message count | None | The number of recently received emails in this folder |
|
||||
| Unseen message count | None | The number of unread emails in this folder |
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
id: influxdb
|
||||
title: Monitoring InfluxDB Database
|
||||
sidebar_label: InfluxDB Database
|
||||
keywords: [open source monitoring system, open source database monitoring, InfluxDB database monitoring]
|
||||
---
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitor Host | The IPv4, IPv6, or domain name of the target being monitored. Note⚠️: Do not include the protocol header (e.g., https://, http://). |
|
||||
| Task Name | A unique identifier for this monitoring task. |
|
||||
| Port | The port on which the database is exposed. Default is 8086. |
|
||||
| URL | The database connection URL, usually constructed from the host. No need to add it separately. |
|
||||
| Collection Interval | The interval at which data is collected during monitoring, in seconds. The minimum interval that can be set is 30 seconds. |
|
||||
| Probe Enabled | Whether to perform a probe check for monitoring availability before adding or modifying the monitoring task. |
|
||||
| Description | Additional notes and remarks about this monitoring task. Users can provide information and descriptions here. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: influxdb_info
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|--------------------|
|
||||
| build_date | N/A | Creation date |
|
||||
| os | N/A | Operating system |
|
||||
| cpus | N/A | CPUs |
|
||||
| version | N/A | Version number |
|
||||
|
||||
#### Metric Set: http_api_request_duration_seconds
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|---------------|-------------|--------------------|
|
||||
| handler | N/A | Handler |
|
||||
| path | N/A | Path |
|
||||
| response_code | N/A | Response code |
|
||||
| method | N/A | Request method |
|
||||
| user_agent | N/A | User agent |
|
||||
| status | N/A | Status |
|
||||
|
||||
#### Metric Set: storage_compactions_queued
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|--------------------|
|
||||
| bucket | N/A | Storage bucket |
|
||||
| engine | N/A | Engine type |
|
||||
| id | N/A | Identifier |
|
||||
| level | N/A | Level |
|
||||
| path | N/A | Data file path |
|
||||
|
||||
#### Metric Set: http_write_request_bytes
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| endpoint | N/A | Endpoint |
|
||||
| org_id | N/A | Organization identifier |
|
||||
| status | N/A | Status |
|
||||
|
||||
#### Metric Set: qc_requests_total
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| result | N/A | Result |
|
||||
| org | N/A | Organization identifier |
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
id: influxdb_promql
|
||||
title: Monitoring InfluxDB-PromQL
|
||||
sidebar_label: InfluxDB-PromQL
|
||||
keywords: [ Open Source Monitoring System, InfluxDB Monitoring, InfluxDB-PromQL Monitoring ]
|
||||
---
|
||||
|
||||
> Monitor InfluxDB by querying generic metrics data from Prometheus server using Prometheus PromQL. This approach is suitable when Prometheus is already monitoring InfluxDB and you need to fetch InfluxDB's monitoring data from Prometheus server.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter help description |
|
||||
|---------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | IP, IPv6, or domain name of the target being monitored. Note ⚠️: Do not include protocol header (e.g., https://, http://). |
|
||||
| Monitoring name | Name to identify this monitoring, ensuring uniqueness of names. |
|
||||
| Port | Prometheus API port, default: 9090. |
|
||||
| Relative path | Relative path of Prometheus to query PromQL, default: /api/v1/query |
|
||||
| Request mode | Set the request method for API calls: GET, POST, PUT, DELETE, default: GET |
|
||||
| Enable HTTPS | Whether to access the website via HTTPS, note ⚠️: enabling HTTPS generally requires changing the corresponding port to 443 |
|
||||
| Username | Username for Basic or Digest authentication when accessing the API. |
|
||||
| Password | Password for Basic or Digest authentication when accessing the API. |
|
||||
| Content-Type | Resource type when carrying BODY request data. |
|
||||
| Request BODY | Set the BODY request data, effective for PUT and POST request methods. |
|
||||
| Collection interval | Interval for periodic data collection in seconds, the minimum interval that can be set is 30 seconds |
|
||||
| Description remarks | Additional remarks and descriptions for this monitoring. Users can add notes here. |
|
||||
|
||||
### Metrics Collection
|
||||
|
||||
#### Metric Set: basic_influxdb_memstats_alloc
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
|
||||
#### Metric Set: influxdb_database_numMeasurements
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| job | None | Metric name |
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| database | None | Name of the database |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
|
||||
#### Metric Set: influxdb_query_rate_seconds
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
|
||||
#### Metric Set: influxdb_queryExecutor_queriesFinished_10s
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
@@ -0,0 +1,120 @@
|
||||
---
|
||||
id: iotdb
|
||||
title: Monitoring Apache IoTDB Database
|
||||
sidebar_label: IoTDB Database
|
||||
keywords: [open source monitoring tool, open source database monitoring tool, monitoring IotDB database metrics]
|
||||
---
|
||||
|
||||
> Monitor the running status of the Apache IoTDB Internet of Things time series database (JVM-related), memory task clusters and other related Metrics.
|
||||
|
||||
## Operation before monitoring
|
||||
|
||||
You need to enable the `metrics` function in IoTDB, which will provide interface data in the form of prometheus metrics.
|
||||
|
||||
To enable the `metrics` function, refer to [Official Documentation](https://iotdb.apache.org/UserGuide/V0.13.x/Maintenance-Tools/Metric-Tool.html)
|
||||
|
||||
The main steps are as follows:
|
||||
|
||||
1. The metric collection is disabled by default, you need to modify the parameters in `conf/iotdb-metric.yml` first, then restart the server
|
||||
|
||||
```yaml
|
||||
# Whether to start the monitoring module, the default is false
|
||||
enableMetric: true
|
||||
|
||||
# Whether to enable operation delay statistics
|
||||
enablePerformanceStat: false
|
||||
|
||||
# Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default.
|
||||
metricReporterList:
|
||||
- JMX
|
||||
- PROMETHEUS
|
||||
|
||||
# The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD]
|
||||
monitorType: MICROMETER
|
||||
|
||||
# Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL]
|
||||
metricLevel: IMPORTANT
|
||||
|
||||
# Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM]
|
||||
predefinedMetrics:
|
||||
- JVM
|
||||
- FILE
|
||||
```
|
||||
|
||||
2. Restart IoTDB, open a browser or use curl to access http://servier_ip:9091/metrics, and you can see the metric data.
|
||||
|
||||
3. Add the corresponding IoTDB monitoring in HertzBeat.
|
||||
|
||||
### 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 IoTDB Metric interface, which is 9091 by default. |
|
||||
| Timeout | HTTP request query timeout |
|
||||
| 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: cluster_node_status
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|---------------------------------|
|
||||
| name | None | Node name IP |
|
||||
| status | None | Node status, 1=online 2=offline |
|
||||
|
||||
#### Metric collection: jvm_memory_committed_bytes
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|------------------------------------------------|
|
||||
| area | none | heap memory or nonheap memory |
|
||||
| id | none | memory block |
|
||||
| value | MB | The memory size currently requested by the JVM |
|
||||
|
||||
#### Metric collection: jvm_memory_used_bytes
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|-------------------------------|
|
||||
| area | none | heap memory or nonheap memory |
|
||||
| id | none | memory block |
|
||||
| value | MB | JVM used memory size |
|
||||
|
||||
#### Metric collection: jvm_threads_states_threads
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|---------------------------------------------------------|
|
||||
| state | none | thread state |
|
||||
| count | None | The number of threads corresponding to the thread state |
|
||||
|
||||
#### Index collection: quantity business data
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|--|------|----------------|
|
||||
| name | None | Business name timeSeries/storageGroup/device/deviceUsingTemplate |
|
||||
| type | none | type total/normal/template/template |
|
||||
| value | None | The current timeSeries/storageGroup/device/The number of devices that have activated the template |
|
||||
|
||||
#### Metric collection: cache_hit cache
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- |------|------------------------------ ----------------------|
|
||||
| name | None | Cache name chunk/timeSeriesMeta/bloomFilter |
|
||||
| value | % | chunk/timeSeriesMeta cache hit rate, bloomFilter interception rate |
|
||||
|
||||
#### Metric collection: queue task queue
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
| ----------- |------|------------------------------ ---------------------|
|
||||
| name | None | Queue name compaction_inner/compaction_cross/flush |
|
||||
| status | none | status running/waiting |
|
||||
| value | None | Number of tasks at current time |
|
||||
|
||||
#### Metric collection: thrift_connections
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|-------------|-------------|----------------------------------|
|
||||
| name | None | name |
|
||||
| connection | none | thrift current connection number |
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: ipmi
|
||||
title: IPMI2 Monitoring
|
||||
sidebar_label: Server Monitor
|
||||
keywords: [open source monitoring tool, open source server Monitoring, IPMI Monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of Server using IPMI2.
|
||||
|
||||
**Protocol: IPMI**
|
||||
|
||||
## Pre-monitoring steps
|
||||
|
||||
1. The target server supports the **IPMI2 protocol**.
|
||||
2. The **BMC** (Baseboard Management Controller) has been configured with a network interface, allowing access to the **IPMI port**.
|
||||
3. **User accounts** have been configured, and appropriate **permissions** have been assigned to the accounts.
|
||||
|
||||
These are basic checks you can follow, and for further details on enabling and configuring IPMI over LAN, you can consult the specific user manual of the server manufacturer.
|
||||
|
||||
## 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 server IPMI over LAN, default is 623. |
|
||||
| Username | IPMI user name |
|
||||
| Password | IPMI password |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: Chassis
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
| -------------------- | ---- | ------------------------------------------------------------ |
|
||||
| System Power | none | Current Power State. Power is on. |
|
||||
| Power Overload | none | Power overload. System shutdown because of power overload condition. |
|
||||
| Power Interlock | none | Power Interlock. |
|
||||
| Main Power Fault | none | Power fault. Fault detected in main power subsystem. |
|
||||
| Power Control Fault | none | Power control fault. Controller attempted to turn system power on or off, but systemdid not enter desired state. |
|
||||
| Power Restore Policy | none | Power restore policy. |
|
||||
| Last Power Event | none | Last Power Event. |
|
||||
| Cooling/Fan Fault | none | Cooling/fan fault detected. |
|
||||
| Drive Fault | none | Drive Fault. |
|
||||
| Front-Panel Lockout | none | Front Panel Lockout active (power off and reset via chassispush-buttons disabled.) |
|
||||
|
||||
#### Metric Set: Sensor
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
| -------------- | ---- | ------------------------------------------------------------ |
|
||||
| Sensor ID | none | Sensor ID. |
|
||||
| Entity ID | none | Indicates the physical entity that the sensor is monitoring or is otherwiseassociated with the sensor. |
|
||||
| Sensor Type | none | Sensor Type. |
|
||||
| Sensor Reading | none | Current Sensor Reading. |
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
id: issue
|
||||
title: Common issues
|
||||
sidebar_label: Common issues
|
||||
---
|
||||
|
||||
## Monitoring common issues
|
||||
|
||||
1. **Page feedback:monitor.host: Monitoring Host must be ipv4, ipv6 or domain name**
|
||||
|
||||
> As shown in the information, the entered monitoring Host must be ipv4, ipv6 or domain name, and cannot carry a protocol header, such as http
|
||||
|
||||
2. **The website API and other monitoring feedback statusCode:403 or 401, but the opposite end service itself does not need authentication, and the direct access of the browser is OK**
|
||||
|
||||
> Please check whether it is blocked by the firewall. For example, BaoTa/aaPanel have set the blocking of `User-Agent=Apache-HttpClient` in the request header by default. If it is blocked, please delete this blocking rule. (user-agent has been simulated as a browser in the v1.0.beat5 version. This problem does not exist)
|
||||
|
||||
3. Ping connectivity monitoring exception when installing hertzbeat for package deployment.
|
||||
The hertzbeat installed and deployed by the installation package is not available for ping connectivity monitoring, but local direct ping is available 。
|
||||
|
||||
> The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened.
|
||||
> When you install HertzBeat via DockerDocker root is enabled by default. No such problem.
|
||||
> See [https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address](https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address)
|
||||
|
||||
### Docker Deployment common issues
|
||||
|
||||
1. **MYSQL, TDENGINE and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail**
|
||||
The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost.
|
||||
|
||||
> Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine.
|
||||
> Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....`
|
||||
|
||||
2. **According to the process deploy,visit [http://ip:1157/](http://ip:1157/) no interface**
|
||||
Please refer to the following points to troubleshoot issues:
|
||||
|
||||
> one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed.
|
||||
> two:Check whether dependent service, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`.
|
||||
> three:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community.
|
||||
|
||||
3. **Log an error TDengine connection or insert SQL failed**
|
||||
|
||||
> one:Check whether database account and password configured is correct, the database is created.
|
||||
> two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server.
|
||||
|
||||
### Package Deployment common issues
|
||||
|
||||
1. **According to the process deploy,visit [http://ip:1157/](http://ip:1157/) no interface**
|
||||
Please refer to the following points to troubleshoot issues:
|
||||
|
||||
> one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed.
|
||||
> two:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`.
|
||||
> three: Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community.
|
||||
|
||||
2. **Log an error TDengine connection or insert SQL failed**
|
||||
|
||||
> one:Check whether database account and password configured is correct, the database is created.
|
||||
> two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server.
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
id: jetty
|
||||
title: Monitoring Jetty Web Server
|
||||
sidebar_label: Jetty Web Server
|
||||
keywords: [open source monitoring tool, open source jetty web server monitoring tool, monitoring jetty metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics of Jetty application server
|
||||
|
||||
**Usage protocol: JMX**
|
||||
|
||||
## Pre-monitoring Operations
|
||||
>
|
||||
> You need to enable the `JMX` service in the JVM application. HertzBeat uses the JMX protocol to collect metrics for the JVM.
|
||||
|
||||
### Jetty application server opens JMX protocol steps
|
||||
|
||||
[Refer to official documentation](https://www.eclipse.org/jetty/documentation/jetty-10/operations-guide/index.html#og-jmx-remote)
|
||||
|
||||
1. Start the JMX JMX-REMOTE module in Jetty
|
||||
|
||||
```shell
|
||||
java -jar $JETTY_HOME/start.jar --add-module=jmx
|
||||
java -jar $JETTY_HOME/start.jar --add-module=jmx-remote
|
||||
```
|
||||
|
||||
Successful command execution will create ``JETTY_BASE`/start.d/jmx-remote.ini` configuration file
|
||||
|
||||
2. Edit the ``JETTY_BASE`/start.d/jmx-remote.ini` configuration file to modify the JMX IP port and other parameters.
|
||||
|
||||
**`localhost` needs to be modified to expose the IP**
|
||||
|
||||
```text
|
||||
## The host/address to bind the RMI server to.
|
||||
# jetty.jmxremote.rmiserverhost=localhost
|
||||
|
||||
## The port the RMI server listens to (0 means a random port is chosen).
|
||||
# jetty.jmxremote.rmiserverport=1099
|
||||
|
||||
## The host/address to bind the RMI registry to.
|
||||
# jetty.jmxremote.rmiregistryhost=localhost
|
||||
|
||||
## The port the RMI registry listens to.
|
||||
# jetty.jmxremote.rmiregistryport=1099
|
||||
|
||||
## The host name exported in the RMI stub.
|
||||
-Djava.rmi.server.hostname=localhost
|
||||
```
|
||||
|
||||
3. Restart Jetty Server.
|
||||
|
||||
### 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: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,76 @@
|
||||
---
|
||||
id: jvm
|
||||
title: Monitoring JVM
|
||||
sidebar_label: JVM Monitor
|
||||
keywords: [open source monitoring tool, open source java jvm monitoring tool, monitoring jvm metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of JVM.
|
||||
|
||||
**Protocol Use:JMX**
|
||||
|
||||
## JVM App Enable JMX Protocol
|
||||
|
||||
1. Add JVM `VM options` When Start Server ⚠️ customIP
|
||||
|
||||
Refer: [https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote](https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote)
|
||||
|
||||
```shell
|
||||
-Djava.rmi.server.hostname=customIP
|
||||
-Dcom.sun.management.jmxremote.port=9999
|
||||
-Dcom.sun.management.jmxremote.ssl=false
|
||||
-Dcom.sun.management.jmxremote.authenticate=false
|
||||
```
|
||||
|
||||
### 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,89 @@
|
||||
---
|
||||
id: kafka
|
||||
title: Monitor:Apache Kafka
|
||||
sidebar_label: Apache Kafka
|
||||
keywords: [open source monitoring tool, open source apache kafka monitoring tool, monitoring apache kafka metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of Apache Kafka.
|
||||
|
||||
**Protocol Use:JMX**
|
||||
|
||||
## Kafka Enable JMX Protocol
|
||||
|
||||
1. Install Kafka
|
||||
|
||||
2. Modify `kafka-server-start.sh`
|
||||
|
||||
Append content in kafka-server-start.sh, Attention Replace Port And IP.
|
||||
|
||||
```shell
|
||||
export JMX_PORT=9999;
|
||||
export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false";
|
||||
|
||||
# Already Has
|
||||
exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@"
|
||||
```
|
||||
|
||||
### 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:server_info
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| Version | | Kafka Version |
|
||||
| StartTimeMs | ms | Start Time |
|
||||
| CommitId | | Version Commit ID |
|
||||
|
||||
#### 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:active_controller_count
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------|
|
||||
| Value | | server active controller count |
|
||||
|
||||
#### Metrics Set:broker_partition_count
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| Value | | broker partition count |
|
||||
|
||||
#### Metrics Set:broker_leader_count
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| Value | | broker leader count |
|
||||
|
||||
#### Metrics Set:broker_handler_avg_percent
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------------|-------------|-------------------------|
|
||||
| EventType | | event type |
|
||||
| RateUnit | | rate unit |
|
||||
| Count | | percent count |
|
||||
| OneMinuteRate | % | One Minute Rate |
|
||||
| FiveMinuteRate | % | Five Minute Rate |
|
||||
| MeanRate | % | Mean Rate |
|
||||
| FifteenMinuteRate | % | Fifteen Minute Rate |
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
id: kafka_client
|
||||
title: Monitoring: Kafka Monitoring (Client-based)
|
||||
sidebar_label: Kafka Monitoring (Client-based)
|
||||
keywords: [open-source monitoring system, open-source message middleware monitoring, Kafka monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general metrics for Kafka.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Help Description |
|
||||
|------------------|---------------------------------------------------------------|
|
||||
| Monitoring Host | The monitored peer's IPv4, IPv6, or domain name. Note: ⚠️ Do not include protocol headers (e.g., https://, http://). |
|
||||
| Monitoring Port | The monitored service port. |
|
||||
| Task Name | The identifier for this monitoring task, which must be unique. |
|
||||
| Collection Interval | The interval for periodic data collection, in seconds. The minimum allowable interval is 30 seconds. |
|
||||
| Description/Remarks | Additional information to describe and identify this monitoring task. Users can add remarks here. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: topic_list
|
||||
|
||||
| Metric Name | Unit | Help Description |
|
||||
|--------------|------|------------------|
|
||||
| TopicName | None | Topic Name |
|
||||
|
||||
#### Metric Set: topic_detail
|
||||
|
||||
| Metric Name | Unit | Help Description |
|
||||
|----------------------|------|------------------|
|
||||
| TopicName | None | Topic Name |
|
||||
| PartitionNum | None | Number of Partitions |
|
||||
| PartitionLeader | None | Partition Leader |
|
||||
| BrokerHost | None | Broker Host |
|
||||
| BrokerPort | None | Broker Port |
|
||||
| ReplicationFactorSize| None | Replication Factor Size |
|
||||
| ReplicationFactor | None | Replication Factor |
|
||||
|
||||
#### Metric Set: topic_offset
|
||||
|
||||
| Metric Name | Unit | Help Description |
|
||||
|---------------|------|------------------|
|
||||
| TopicName | None | Topic Name |
|
||||
| PartitionNum | None | Number of Partitions |
|
||||
| earliest | None | Earliest Offset |
|
||||
| latest | None | Latest Offset |
|
||||
|
||||
#### Metric Set:consumer_detail
|
||||
|
||||
| Metric Name | Unit | Help Description |
|
||||
|-----------|--|------------------------------------|
|
||||
| GroupId | None | Consumer Group Id |
|
||||
| group_member_num | None | Number of Consumer Instances |
|
||||
| Subscribed Topic Name | None | Topic Name Subscribed by the Group |
|
||||
| offset_of_each_partition | None | Offsets for Each Partition |
|
||||
| Lag | None | Lag of Consumer |
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
id: kafka_promql
|
||||
title: Monitoring Kafka-PromQL
|
||||
sidebar_label: Kafka-PromQL
|
||||
keywords: [ Open Source Monitoring System, Open Source Middleware Monitoring, Kafka Monitoring, Kafka-PromQL Monitoring ]
|
||||
---
|
||||
|
||||
> Monitor Kafka by querying generic metrics data from Prometheus server using Prometheus PromQL. This approach is suitable when Prometheus is already monitoring Kafka and you need to fetch Kafka's
|
||||
> monitoring data from Prometheus server.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Deploy Kafka.
|
||||
2. Deploy kafka_exporter.
|
||||
3. Collect monitoring metrics exposed by kafka_exporter through Prometheus.
|
||||
|
||||
### Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|---------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| Monitoring Host | IP, IPv6, or domain name of the target being monitored. Note ⚠️: Do not include protocol header (e.g., https://, http://). |
|
||||
| Monitoring name | Name to identify this monitoring, ensuring uniqueness of names. |
|
||||
| Port | Prometheus API port, default: 9090. |
|
||||
| Relative path | Relative path of Prometheus to query PromQL, default: /api/v1/query |
|
||||
| Request mode | Set the request method for API calls: GET, POST, PUT, DELETE, default: GET |
|
||||
| Enable HTTPS | Whether to access the website via HTTPS, note ⚠️: enabling HTTPS generally requires changing the corresponding port to 443 |
|
||||
| Username | Username for Basic or Digest authentication when accessing the API. |
|
||||
| Password | Password for Basic or Digest authentication when accessing the API. |
|
||||
| Content-Type | Resource type when carrying BODY request data. |
|
||||
| Request BODY | Set the BODY request data, effective for PUT and POST request methods. |
|
||||
| Collection interval | Interval for periodic data collection in seconds, the minimum interval that can be set is 30 seconds |
|
||||
| Description remarks | Additional remarks and descriptions for this monitoring. Users can add notes here. |
|
||||
|
||||
### Metrics Collection
|
||||
|
||||
#### Metric Set: kafka_brokers
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| __name__ | None | Metric name |
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
|
||||
#### Metric Set: kafka_topic_partitions
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| __name__ | None | Metric name |
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
|
||||
#### Metric Set: kafka_server_brokertopicmetrics_bytesinpersec
|
||||
|
||||
| Metric Name | Metric Unit | Metric help description |
|
||||
|-------------|-------------|--------------------------------------|
|
||||
| __name__ | None | Metric name |
|
||||
| instance | None | Instance to which the metric belongs |
|
||||
| timestamp | None | Timestamp of metric collection |
|
||||
| value | None | Metric value |
|
||||
|
||||
### Other Kafka Monitoring Methods Supported by HertzBeat
|
||||
|
||||
1. If Kafka is enabled with JMX monitoring, you can use [Kafka](kafka) Monitoring.
|
||||
2. If Kafka cluster deploys kafka_exporter to expose monitoring metrics, you can refer to [Prometheus task](prometheus) to configure the Prometheus collection task to monitor kafka.
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
id: kingbase
|
||||
title: Monitoring:Kingbase database monitoring
|
||||
sidebar_label: Kingbase database
|
||||
keywords: [open source monitoring tool, open source database monitoring tool, monitoring kingbase database metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of Kingbase database. Support Kingbase V8R6+.
|
||||
|
||||
## 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 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 Kingbase 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,95 @@
|
||||
---
|
||||
id: kubernetes
|
||||
Title: Monitoring Kubernetes
|
||||
sidebar_label: Kubernetes Monitor
|
||||
keywords: [open source monitoring tool, open source kubernetes monitoring tool, monitoring kubernetes metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance metrics of Kubernetes.
|
||||
|
||||
## Pre-monitoring operations
|
||||
|
||||
If you want to monitor the information in 'Kubernetes', you need to obtain an authorization token that can access the API Server, so that the collection request can obtain the corresponding information.
|
||||
|
||||
Refer to the steps to obtain token
|
||||
|
||||
### method one
|
||||
|
||||
1. Create a service account and bind the default cluster-admin administrator cluster role
|
||||
|
||||
```kubectl create serviceaccount dashboard-admin -n kube-system```
|
||||
|
||||
2. User Authorization
|
||||
|
||||
```shell
|
||||
kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin
|
||||
kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}'
|
||||
kubectl describe secret {secret} -n kube-system
|
||||
```
|
||||
|
||||
### method two
|
||||
|
||||
```shell
|
||||
kubectl create serviceaccount cluster-admin
|
||||
kubectl create clusterrolebinding cluster-admin-manual --clusterrole=cluster-admin --serviceaccount=default:cluster-admin
|
||||
kubectl create token --duration=1000h cluster-admin
|
||||
```
|
||||
|
||||
### 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. |
|
||||
| APiServer port | K8s APiServer port, default 6443 |
|
||||
| token | Authorize the Access Token |
|
||||
| URL | The database connection URL is optional, if configured, the database name, user name and password parameters in the URL will override the parameter | configured above |
|
||||
| The acquisition interval is | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds |
|
||||
| Whether to probe the | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | will continue only if the probe is successful |
|
||||
| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here |
|
||||
|
||||
### Collect metrics
|
||||
|
||||
#### metric collection: nodes
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|--------------------|-------------|-----------------------|-----------|
|
||||
| node_name | None | Node name |
|
||||
| is_ready | None | Node Status |
|
||||
| capacity_cpu | None | CPU capacity |
|
||||
| allocatable_cpu | None | CPU | allotted |
|
||||
| capacity_memory | None | Memory capacity |
|
||||
| allocatable_memory | None | Memory | allocated |
|
||||
| creation_time | None | Node creation time |
|
||||
|
||||
#### metric Collection: namespaces
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|---------------|-------------|-----------------------|
|
||||
| namespace | None | namespace name |
|
||||
| status | None | Status |
|
||||
| creation_time | None | Created |
|
||||
|
||||
#### metric collection: pods
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|---------------|-------------|-------------------------------|--------------------------|
|
||||
| pod | None | Pod name |
|
||||
| namespace | None | The namespace | to which the pod belongs |
|
||||
| status | None | Pod status |
|
||||
| restart | None | Number of restarts |
|
||||
| host_ip | None | The IP address of the host is |
|
||||
| pod_ip | None | pod ip |
|
||||
| creation_time | None | Pod creation time |
|
||||
| start_time | None | Pod startup time |
|
||||
|
||||
#### metric Collection: services
|
||||
|
||||
| Metric Name | metric unit | Metrics help describe |
|
||||
|---------------|-------------|-----------------------------------------------------------|------------------------------|
|
||||
| service | None | Service Name |
|
||||
| namespace | None | The namespace | to which the service belongs |
|
||||
| type | None | Service Type ClusterIP NodePort LoadBalancer ExternalName |
|
||||
| cluster_ip | None | cluster ip |
|
||||
| selector | None | tag selector matches |
|
||||
| creation_time | None | Created |
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
id: linux
|
||||
title: Monitoring:Linux operating system monitoring
|
||||
sidebar_label: Linux operating system
|
||||
keywords: [open source monitoring tool, open source linux monitoring tool, monitoring linux metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of Linux operating system.
|
||||
|
||||
## 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 Linux SSH. The default is 22 |
|
||||
| Username | SSH connection user name, optional |
|
||||
| Password | SSH 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 Metric
|
||||
|
||||
#### Metric set:basic
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|--------------------------|
|
||||
| hostname | none | Host name |
|
||||
| version | none | Operating system version |
|
||||
| uptime | none | System running time |
|
||||
|
||||
#### Metric set:cpu
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|----------------|-------------|------------------------------------------------|
|
||||
| info | none | CPU model |
|
||||
| cores | cores | Number of CPU cores |
|
||||
| interrupt | number | Number of CPU interrupts |
|
||||
| load | none | Average load of CPU in the last 1/5/15 minutes |
|
||||
| context_switch | number | Number of current context switches |
|
||||
| usage | % | CPU usage |
|
||||
|
||||
#### Metric set:memory
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | User program memory |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory occupied by cache |
|
||||
| available | Mb | Remaining available memory capacity |
|
||||
| usage | % | Memory usage |
|
||||
|
||||
#### Metric set:disk
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|---------------|-------------|----------------------------------------|
|
||||
| disk_num | blocks | Total number of disks |
|
||||
| partition_num | partitions | Total number of partitions |
|
||||
| block_write | blocks | Total number of blocks written to disk |
|
||||
| block_read | blocks | Number of blocks read from disk |
|
||||
| write_rate | iops | Rate of writing disk blocks per second |
|
||||
|
||||
#### Metric set:interface
|
||||
|
||||
| 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:disk_free
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| filesystem | none | File system name |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | usage |
|
||||
| mounted | none | Mount point directory |
|
||||
@@ -0,0 +1,101 @@
|
||||
---
|
||||
id: linux_script
|
||||
title: Monitoring:Using Scripts to Monitor Linux Operating System
|
||||
sidebar_label: Using Scripts to Monitor Linux OS
|
||||
keywords: [open source monitoring system, open source network monitoring, using scripts to monitor Linux OS]
|
||||
---
|
||||
|
||||
## Preparation
|
||||
>
|
||||
> To monitor the local machine, simply deploy HertzBeat. To monitor other hosts, you need to deploy a collector on the target host. Refer to [this link](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package) for step 5 of the installation process.
|
||||
If the collector is installed using Docker, it will cause the collector to be unable to monitor the process information on the host machine, because Docker containers run in an isolated environment, with each container having its own process space.
|
||||
> When creating a monitoring task and selecting a collector, choose the corresponding collector deployed on the target host.
|
||||
|
||||
### Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|:---------------|-----------------------------------------------------|---|
|
||||
| Monitor Host | The IPv4, IPv6, or domain of the monitored endpoint. Note ⚠️ Do not include protocol headers (e.g., https://, http://). |
|
||||
| Task Name | The name identifying this monitoring task, which needs to be unique. |
|
||||
| Collector | Specifies which collector will be used for data collection in this monitoring task. |
|
||||
| Monitoring Interval | The time interval for periodic data collection, in seconds. |
|
||||
| Binding Tag | Classification management tags for monitoring resources. |
|
||||
| Description Notes | Additional notes to describe this monitoring task. Users can add remarks here. |
|
||||
|
||||
### Metrics Collection
|
||||
|
||||
#### Metric Set: basic
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|--------------------------|
|
||||
| hostname | None | Name of the host |
|
||||
| version | None | Operating system version |
|
||||
| uptime | None | System uptime |
|
||||
|
||||
#### Metric Set: cpu
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|----------------|-------------|-----------------------------------------------|
|
||||
| info | None | CPU model |
|
||||
| cores | Number | Number of CPU cores |
|
||||
| interrupt | Count | Number of CPU interrupts |
|
||||
| load | None | Average CPU load over the last 1/5/15 minutes |
|
||||
| context_switch | Count | Current number of context switches |
|
||||
| usage | % | CPU usage percentage |
|
||||
|
||||
#### Metric Set: memory
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|------------------------------|
|
||||
| total | Mb | Total memory capacity |
|
||||
| used | Mb | Memory used by user programs |
|
||||
| free | Mb | Free memory capacity |
|
||||
| buff_cache | Mb | Memory used by cache |
|
||||
| available | Mb | Available memory capacity |
|
||||
| usage | % | Memory usage percentage |
|
||||
|
||||
#### Metric Set: disk
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|---------------|-------------|-------------------------------------------|
|
||||
| disk_num | Count | Total number of disks |
|
||||
| partition_num | Count | Total number of partitions |
|
||||
| block_write | Count | Total number of blocks written to disk |
|
||||
| block_read | Count | Total number of blocks read from disk |
|
||||
| write_rate | iops | Rate of blocks written to disk per second |
|
||||
|
||||
#### Metric Set: interface
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|----------------|-------------|-------------------------------|
|
||||
| interface_name | None | Network interface name |
|
||||
| receive_bytes | byte | Inbound data traffic (bytes) |
|
||||
| transmit_bytes | byte | Outbound data traffic (bytes) |
|
||||
|
||||
#### Metric Set: disk_free
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|------------------------|
|
||||
| filesystem | None | Name of the filesystem |
|
||||
| used | Mb | Used disk size |
|
||||
| available | Mb | Available disk size |
|
||||
| usage | % | Disk usage percentage |
|
||||
| mounted | None | Mount point directory |
|
||||
|
||||
#### Metric Set: Top 10 Programs by CPU Usage
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| id | None | Process ID |
|
||||
| cpu | % | CPU usage percentage |
|
||||
| ws | % | Memory usage percentage |
|
||||
| command | None | Executed command |
|
||||
|
||||
#### Metric Set: Top 10 Programs by Memory Usage
|
||||
|
||||
| Metric Name | Metric Unit | Metric Description |
|
||||
|-------------|-------------|-------------------------|
|
||||
| id | None | Process ID |
|
||||
| cpu | % | CPU usage percentage |
|
||||
| ws | % | Memory usage percentage |
|
||||
| command | None | Executed command |
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
id: mariadb
|
||||
title: Monitoring:MariaDB database monitoring
|
||||
sidebar_label: MariaDB database
|
||||
keywords: [open source monitoring tool, open source database monitoring tool, monitoring mariadb database metrics]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of MariaDB database. Support MariaDB5+.
|
||||
|
||||
## Attention, Need Add MYSQL jdbc driver jar
|
||||
|
||||
- Download the MYSQL jdbc driver jar package, such as mysql-connector-java-8.1.0.jar. [https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0](https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0)
|
||||
- Copy the jar package to the `hertzbeat/ext-lib` directory.
|
||||
- Restart the HertzBeat 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 the database. The default is 3306 |
|
||||
| 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 |
|
||||
|-----------------|-------------|------------------------------------|
|
||||
| version | none | Database version |
|
||||
| port | none | Database exposure service port |
|
||||
| datadir | none | Database storage data disk address |
|
||||
| max_connections | none | Database maximum connections |
|
||||
|
||||
#### Metric set:status
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------------|-------------|------------------------------------|
|
||||
| threads_created | none | MariaDB created total connections |
|
||||
| threads_connected | none | MariaDB connected connections |
|
||||
| threads_cached | none | MariaDB current cached connections |
|
||||
| threads_running | none | MariaDB current active connections |
|
||||
|
||||
#### Metric set:innodb
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|---------------------|-------------|------------------------------------------------------|
|
||||
| innodb_data_reads | none | innodb average number of reads from files per second |
|
||||
| innodb_data_writes | none | innodb average number of writes from file per second |
|
||||
| innodb_data_read | KB | innodb average amount of data read per second |
|
||||
| innodb_data_written | KB | innodb average amount of data written per second |
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
id: memcached
|
||||
title: Monitoring Memcached
|
||||
sidebar_label: Memcached Monitor
|
||||
keywords: [ open source monitoring tool, open source Memcached monitoring tool, monitoring memcached metrics ]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of Memcached.
|
||||
|
||||
**Protocol Use:Memcached**
|
||||
|
||||
```text
|
||||
The default YML configuration for the memcache version is in compliance with 1.4.15.
|
||||
You need to use the stats command to view the parameters that your memcache can monitor
|
||||
```
|
||||
|
||||
**1、Obtain usable parameter indicators through commands such as stats、stats setting、stats settings.
|
||||
|
||||
```shell
|
||||
# telnet ip port
|
||||
[root@server ~]# telnet localhost 11211
|
||||
Trying ::1...
|
||||
Connected to localhost.
|
||||
Escape character is '^]'.
|
||||
stats
|
||||
STAT pid 15168
|
||||
STAT uptime 11691
|
||||
STAT time 1702569246
|
||||
STAT version 1.4.15
|
||||
...
|
||||
```
|
||||
|
||||
**There is help_doc: [https://www.runoob.com/memcached/memcached-stats.html](https://www.runoob.com/memcached/memcached-stats.html)**
|
||||
|
||||
## 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 Memcached |
|
||||
| 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:server_info
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|------------------|-------------|---------------------------------------------------|
|
||||
| pid | | Memcache server process ID |
|
||||
| uptime | s | The number of seconds the server has been running |
|
||||
| version | | Memcache version |
|
||||
| curr_connections | | Current number of connections |
|
||||
| auth_errors | | Number of authentication failures |
|
||||
| threads | | Current number of threads |
|
||||
| item_size | byte | The size of the item |
|
||||
| item_count | | Number of items |
|
||||
| curr_items | | The total number of data currently stored |
|
||||
| total_items | | The total number of data stored since startup |
|
||||
| bytes | byte | The current number of bytes occupied by storage |
|
||||
| cmd_get | | Get command request count |
|
||||
| cmd_set | | Set command request count |
|
||||
| cmd_flush | | Flush command request count |
|
||||
| get_misses | | Get command misses |
|
||||
| delete_misses | | Delete command misses |
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
id: modbus
|
||||
title: Monitoring Modbus
|
||||
sidebar_label: Modbus Monitor
|
||||
keywords: [ open source monitoring tool, Modbus monitoring ]
|
||||
---
|
||||
|
||||
> The response of Modbus service and other related indicators are monitored.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Help Description |
|
||||
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Host of Modbus Service | The IPv4, IPv6, or domain name of the Modbus device to be monitored. Note ⚠️ do not include the protocol header (e.g., https://, http://). |
|
||||
| Task Name | A name that identifies this monitoring task; the name must be unique. |
|
||||
| Port | The port used for Modbus network communication. |
|
||||
| Slave ID (slaveId) | The ID of the slave device in the Modbus network. |
|
||||
| Holding Register Address | Used for categorizing and managing monitored resources. |
|
||||
| Coil Register Address | Additional notes and descriptions for this monitoring task; users can add remarks here. |
|
||||
| Timeout | The allowed time for collecting a response. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: holding-register
|
||||
|
||||
1. The number of parameters must match the total number of coil register addresses specified in the parameters.
|
||||
2. Alias format for parameters: holding-register:m or holding-register:m-n
|
||||
|
||||
Parameter example:
|
||||
|
||||
Coil register addresses:
|
||||
|
||||
```text
|
||||
1,2[3]
|
||||
```
|
||||
|
||||
Parameter alias names:
|
||||
|
||||
```yaml
|
||||
aliasFields:
|
||||
- responseTime
|
||||
- holding-register:0
|
||||
- holding-register:1-0
|
||||
- holding-register:1-1
|
||||
- holding-register:1-2
|
||||
```
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|----------------------------|--------------|-----------------------------------------------------------------|
|
||||
| Response Time | Milliseconds | The time required by the Modbus server to respond to a request. |
|
||||
| Holding Register Parameter | | Setpoint for analog output |
|
||||
|
||||
#### Metric Set: coil
|
||||
|
||||
1. The number of parameters must match the total number of coil register addresses specified in the parameters.
|
||||
2. Alias format for parameters: coil:m or coil:m-n
|
||||
|
||||
Parameter example:
|
||||
|
||||
Coil register addresses:
|
||||
|
||||
```text
|
||||
1,2[3]
|
||||
```
|
||||
|
||||
Parameter alias names:
|
||||
|
||||
```yaml
|
||||
aliasFields:
|
||||
- responseTime
|
||||
- coil:0
|
||||
- coil:1-0
|
||||
- coil:1-1
|
||||
- coil:1-2
|
||||
```
|
||||
|
||||
| Metric Name | Metric Unit | Metric Help Description |
|
||||
|---------------|--------------|-----------------------------------------------------------------|
|
||||
| Response Time | Milliseconds | The time required by the Modbus server to respond to a request. |
|
||||
| Coil Status | | Coil status (0 or 1) |
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
id: mongodb
|
||||
title: Monitoring:MongoDB
|
||||
sidebar_label: MongoDB database
|
||||
keywords: [ open source monitoring tool, open source database monitoring tool, monitoring MongoDB database metrics ]
|
||||
---
|
||||
|
||||
> Collect and monitor the general performance Metrics of MongoDB database.
|
||||
|
||||
## Configuration parameter
|
||||
|
||||
| Parameter name | Parameter help description |
|
||||
|------------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target 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 the database. The default is 27017. |
|
||||
| Username | Username for MongoDB,Optional. |
|
||||
| Password | Password for MongoDB,Optional. |
|
||||
| database | Database name. |
|
||||
| authenticationDatabase | Credentials Storage Database. |
|
||||
| Connect Timeout(ms) | Set connection timeout for MongoDB, unit: ms, default: 6000ms. |
|
||||
| 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 Metric
|
||||
|
||||
#### Metric set:Build Info
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|------------------|-------------|-----------------------------------------------------------------------------------------|
|
||||
| version | none | The version number of the MongoDB server. |
|
||||
| gitVersion | none | The Git version of the MongoDB codebase. |
|
||||
| sysInfo | none | System information, typically includes details about the operating system and platform. |
|
||||
| loaderFlags | none | Loader flags used to link MongoDB binaries |
|
||||
| compilerFlags | none | Compiler flags used when compiling MongoDB. |
|
||||
| allocator | none | The memory allocator used by MongoDB. |
|
||||
| javascriptEngine | none | The JavaScript engine used by MongoDB. |
|
||||
|
||||
#### Metric set:Server Document
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|-----------------------------------|
|
||||
| deleted | none | The number of documents deleted. |
|
||||
| inserted | none | The number of documents inserted. |
|
||||
| returned | none | The number of documents returned. |
|
||||
| updated | none | The number of documents updated. |
|
||||
|
||||
#### Metric set:Server Operation
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|----------------|-------------|------------------------------------------------------------------|
|
||||
| scanAndOrder | none | The number of times a query required both scanning and ordering. |
|
||||
| writeConflicts | none | The number of write conflicts that occurred. |
|
||||
|
||||
#### Metric set: Max Connections
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|------------------|-------------|--------------------------------------------|
|
||||
| deletedDocuments | none | Number of deleted documents. |
|
||||
| passes | none | Total number of passes for TTL operations. |
|
||||
|
||||
#### Metric set:System Info
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|------------------------------------------------------|
|
||||
| currentTime | none | Current system time. |
|
||||
| hostname | none | Hostname of the server. |
|
||||
| cpuAddrSize | MB | Size of CPU address in bits. |
|
||||
| memSizeMB | MB | Total size of system memory in megabytes. |
|
||||
| memLimitMB | MB | Memory limit for the MongoDB process in megabytes. |
|
||||
| numCores | none | Total number of CPU cores. |
|
||||
| cpuArch | none | CPU architecture. |
|
||||
| numaEnabled | none | Whether NUMA (Non-Uniform Memory Access) is enabled. |
|
||||
|
||||
#### Metric set:OS Info
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-------------|-------------|----------------------------------|
|
||||
| type | none | Type of the operating system. |
|
||||
| name | none | Name of the operating system. |
|
||||
| version | none | Version of the operating system. |
|
||||
|
||||
#### Metric set:Extra Info
|
||||
|
||||
| Metric name | Metric unit | Metric help description |
|
||||
|-----------------|-------------|--------------------------------------------------------|
|
||||
| versionString | none | String describing the version of the operating system. |
|
||||
| libcVersion | none | Version of the C standard library (libc). |
|
||||
| kernelVersion | none | Version of the operating system kernel. |
|
||||
| cpuFrequencyMHz | none | Frequency of the CPU in megahertz. |
|
||||
| cpuFeatures | none | Features supported by the CPU. |
|
||||
| pageSize | none | Size of a memory page in bytes. |
|
||||
| numPages | none | Total number of memory pages. |
|
||||
| maxOpenFiles | none | Maximum number of open files allowed. |
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
id: mongodb_atlas
|
||||
title: Monitoring MongoDB Atlas Database
|
||||
sidebar_label: MongoDB Atlas Database
|
||||
keywords: [open-source monitoring system, open-source database monitoring, MongoDB Atlas database monitoring]
|
||||
---
|
||||
|
||||
> Collect and monitor general performance metrics of MongoDB Atlas databases.
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The IP address, IPv4, IPv6, or domain name of the target to be monitored. Note: ⚠️ Do not include protocol headers (e.g., https://, http://). |
|
||||
| Task Name | The name identifying this monitor, which must be unique. |
|
||||
| Username | MongoDB username, optional. |
|
||||
| Password | MongoDB password, optional. |
|
||||
| Database | Name of the database. |
|
||||
| Authentication Database | The name of the database storing user credentials. |
|
||||
| Connection Timeout | Timeout for MongoDB connection when no response is received, in milliseconds (ms). Default is 6000 ms. |
|
||||
| Cluster Mode | Value for MongoDB Atlas cluster: mongodb-atlas |
|
||||
| Collection Interval | Interval for periodic data collection, in seconds. The minimum interval is 30 seconds. |
|
||||
| Binding Tags | Used for categorizing and managing monitoring resources. |
|
||||
| Description/Remarks | Additional labels and description for this monitor; users can add notes here. |
|
||||
|
||||
### Collection Metrics
|
||||
|
||||
#### Metric Set: Build Information
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|------------------|------|-----------------------------------|
|
||||
| version | None | MongoDB version information |
|
||||
| gitVersion | None | Source code git version |
|
||||
| sysInfo | None | System information |
|
||||
| allocator | None | Memory allocator used by MongoDB |
|
||||
| javascriptEngine | None | JavaScript engine used by MongoDB |
|
||||
|
||||
#### Metric Set: Server Document
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|-------------|------|---------------------------------------------------|
|
||||
| delete | None | Number of deletions |
|
||||
| insert | None | Number of insertions |
|
||||
| update | None | Number of updates |
|
||||
| query | None | Number of queries |
|
||||
| getmore | None | Number of requests for remaining cursor documents |
|
||||
| command | None | Total number of command operations |
|
||||
|
||||
#### Metric Set: Network Operations
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|-------------|------|-----------------------------------------------------|
|
||||
| Bytes In | None | Number of times a query needs to scan and sort data |
|
||||
| Bytes Out | None | Number of write conflicts |
|
||||
| Request Num | None | Number of requests |
|
||||
|
||||
#### Metric Set: Connection Information
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|---------------------------|------|--------------------------------------|
|
||||
| Current Connections | None | Number of current active connections |
|
||||
| Available Connections | None | Number of available connections |
|
||||
| Total Created Connections | None | Total number of connections created |
|
||||
|
||||
#### Metric Set: Database Statistics
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|-------------------|-------|---------------------------|
|
||||
| Database Name | None | Name of the database |
|
||||
| Collections | None | Number of collections |
|
||||
| Views | None | Number of views |
|
||||
| Objects | None | Number of documents |
|
||||
| Document Avg Size | Bytes | Average size of documents |
|
||||
| Document Size | Bytes | Total size of documents |
|
||||
| Storage Size | Bytes | Size of storage used |
|
||||
| Indexes | None | Number of indexes |
|
||||
| Index Size | Bytes | Total size of indexes |
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
id: mqtt
|
||||
title: Monitoring MQTT Connection
|
||||
sidebar_label: MQTT Connection
|
||||
keywords: [ Open Source Monitoring System, MQTT Connection Monitoring ]
|
||||
---
|
||||
|
||||
> Monitor MQTT connection status, supporting MQTT5 and MQTT3.1.1 protocols.
|
||||
|
||||
**Protocol used: mqtt**
|
||||
|
||||
:::tip
|
||||
To check if topics can be subscribed to normally, HertzBeat will subscribe to a topic and then immediately unsubscribe; to verify if messages can be published correctly, HertzBeat will send a test
|
||||
message to a topic (if the test message parameter is empty, this check will not be performed).
|
||||
Please ensure that these operations will not affect your system.
|
||||
:::
|
||||
|
||||
## Configuration Parameters
|
||||
|
||||
| Parameter Name | Parameter Description |
|
||||
|------------------------|------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Target Host | The monitored target's IPv4, IPv6, or domain name. Note ⚠️: Do not include protocol headers (e.g., https://, http://). |
|
||||
| Task Name | The name of this monitoring task, which needs to be unique. |
|
||||
| Port | The port where the MQTT service is open, default is 1883. |
|
||||
| Protocol Version | The MQTT protocol version, supporting MQTT5 and MQTT3.1.1. |
|
||||
| Connection Timeout(ms) | Connection timeout in milliseconds, default is 6000 ms. |
|
||||
| Client Id | MQTT client ID, default is `hertzbeat-mqtt-client`. |
|
||||
| Topic | The topic to be monitored. |
|
||||
| Test Message | Message content used to test whether a topic can be published to normally (optional; if empty, `canPublish` will always be false). |
|
||||
| Username | MQTT authentication username (optional). |
|
||||
| Password | MQTT authentication password (optional). |
|
||||
| Intervals | Interval for periodic data collection, in seconds; the minimum interval that can be set is 30 seconds. |
|
||||
| Binding Tag | Used for classification and management of monitoring resources. |
|
||||
| Description | Additional notes to identify and describe this monitoring task, users can leave notes here. |
|
||||
|
||||
### Collected Metrics
|
||||
|
||||
#### Metric Set: Summary
|
||||
|
||||
| Metric Name | Unit | Metric Description |
|
||||
|--------------|------|---------------------------------------------------------|
|
||||
| responseTime | none | Response time |
|
||||
| canPublish | none | Whether messages can be published to the topic normally |
|
||||
| canSubscribe | none | Whether the topic can be subscribed to normally |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user