Skip to content

Commit

Permalink
[improve] add oceanbase help md (apache#2619)
Browse files Browse the repository at this point in the history
Co-authored-by: shown <[email protected]>
Co-authored-by: Jast <[email protected]>
  • Loading branch information
3 people authored Aug 29, 2024
1 parent 9cb50b7 commit 17636ed
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 4 deletions.
59 changes: 59 additions & 0 deletions home/docs/help/oceanbase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
id: oceanbase
title: Monitoring:OceanBase database monitoring
sidebar_label: OceanBase database
keywords: [open source monitoring tool, open source database monitoring tool, monitoring oceanbase database metrics]
---

> Collect and monitor the general performance Metrics of OceanBase database. Support OceanBase 4.0+.
### 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>
- 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 2881 |
| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 6000ms |
| 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 | OceanBase created total connections |
| threads_connected | none | OceanBase connected connections |
| threads_cached | none | OceanBase current cached connections |
| threads_running | none | OceanBase 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 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
id: oceanbase
title: 监控:OceanBase 数据库监控
sidebar_label: OceanBase 数据库
keywords: [开源监控系统, 开源数据库监控, OceanBase 数据库监控]
---

> 对 OceanBase 数据库的通用性能指标进行采集监控。支持 OceanBase 4.0+。
### 注意,必须添加 MYSQL jdbc 驱动 jar

- 下载 MYSQL jdbc driver jar, 例如 mysql-connector-java-8.1.0.jar. <https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0>
- 将此 jar 包拷贝放入 HertzBeat 的安装目录下的 `ext-lib` 目录下.
- 重启 HertzBeat 服务。

### 配置参数

| 参数名称 | 参数帮助描述 |
|--------|------------------------------------------------------|
| 监控Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 |
| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 |
| 端口 | 数据库对外提供的端口,默认为2881。 |
| 查询超时时间 | 设置 SQL 查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 |
| 数据库名称 | 数据库实例名称,可选。 |
| 用户名 | 数据库连接用户名,可选 |
| 密码 | 数据库连接密码,可选 |
| URL | 数据库连接 URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 |
| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 |
| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 |
| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 |

### 采集指标

#### 指标集合:basic

| 指标名称 | 指标单位 | 指标帮助描述 |
|-----------------|------|------------|
| version || 数据库版本 |
| port || 数据库暴露服务端口 |
| datadir || 数据库存储数据盘地址 |
| max_connections || 数据库最大连接数 |

#### 指标集合:status

| 指标名称 | 指标单位 | 指标帮助描述 |
|-------------------|------|----------------|
| threads_created || OceanBase 已经创建的总连接数 |
| threads_connected || OceanBase 已经连接的连接数 |
| threads_cached || OceanBase 当前缓存的连接数 |
| threads_running || OceanBase 当前活跃的连接数 |

#### 指标集合:innodb

| 指标名称 | 指标单位 | 指标帮助描述 |
|---------------------|------|-------------------------|
| innodb_data_reads || innodb 平均每秒从文件中读取的次数 |
| innodb_data_writes || innodb 平均每秒从文件中写入的次数 |
| innodb_data_read | KB | innodb 平均每秒钟读取的数据量,单位为 KB |
| innodb_data_written | KB | innodb 平均每秒钟写入的数据量,单位为 KB |
3 changes: 2 additions & 1 deletion home/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@
"help/nebulagraph_cluster",
"help/tidb",
"help/mongodb",
"help/mongodb_atlas"
"help/mongodb_atlas",
"help/oceanbase"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions manager/src/main/resources/define/app-oceanbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ name:
# The description and help of this monitoring type
help:
zh-CN: HertzBeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBC 协议</a> 通过配置 SQL 对 OceanBase 数据库的通用性能指标(系统信息、性能状态、Innodb、缓存、事物、用户线程、慢SQL等)进行采集监控,支持版本为 OceanBase 4.0+。<br>您可以点击“<i>新建 OceanBase 数据库</i>”并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBC Protocol</a> to configure SQL for collecting general metrics of OceanBase database (system information, performance status, Innodb, cache, things, user threads, slow SQL, etc.). Supported version is OceanBase 4.0+. <br>You can click "<i>New Mysql Database</i>" and configure it, or select "<i>More Operations</i>" to import the existing configuration.
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBC Protocol</a> to configure SQL for collecting general metrics of OceanBase database (system information, performance status, Innodb, cache, things, user threads, slow SQL, etc.). Supported version is OceanBase 4.0+. <br>You can click "<i>New OceanBase Database</i>" and configure it, or select "<i>More Operations</i>" to import the existing configuration.
zh-TW: HertzBeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBC 協議</a> 通過配置 SQL 對 OceanBase 數據庫的通用性能指標(系統信息、性能狀態、Innodb、緩存、事物、用戶線程、慢SQL等)進行采集監控,支持版本爲 OceanBase 4.0+。<br>您可以點擊“<i>新建 OceanBase 數據庫</i>”並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/OceanBase
en-US: https://hertzbeat.apache.org/docs/help/OceanBase
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/oceanbase
en-US: https://hertzbeat.apache.org/docs/help/oceanbase
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
Expand Down

0 comments on commit 17636ed

Please sign in to comment.