Skip to content

Commit 8f32a98

Browse files
author
Cary Huang
committed
updates
1 parent 0c77f34 commit 8f32a98

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

docs/en/monitoring/jmx_monitor.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# JMX MBEAN Monitoring
22

3-
## JMX (Java Management Extensions)
3+
## **JMX (Java Management Extensions)**
4+
45
JMX, or Java Management Extensions, is a Java technology that provides tools for managing and monitoring applications, system objects, devices, and service-oriented networks. It allows developers to expose application information and enables external tools to access and interact with this information for monitoring and management purposes.
56

6-
## JMX MBean for Debezium
7+
## **JMX MBean for Debezium**
8+
79
Debezium connectors expose metrics via the MBean name for the connector with MBean tag equals to the connector name. These metrics, which are specific to each connector instance, provide data about the behavior of the connector’s snapshot, streaming, and schema history processes.
810

9-
## Enable JMX on a Connector with synchdb_add_jmx_conninfo() or disable with synchdb_del_jmx_conninfo()
10-
The synchdb_add_jmx_conninfo() function adds JMX monitoring configuration to an existing connector. This enables runtime monitoring and diagnostics via tools like JConsole or Prometheus JMX Exporter.
11+
## **Enable JMX on a Connector with synchdb_add_jmx_conninfo() or disable with synchdb_del_jmx_conninfo()**
12+
13+
The synchdb_add_jmx_conninfo() function adds JMX monitoring configuration to an existing connector. This enables runtime monitoring and diagnostics via tools like JConsole or Prometheus JMX Exporter.synchdb_del_jmx_conninfo() can be used to disable JMX.
1114

1215
**Function Signature**
16+
1317
synchdb_add_jmx_conninfo(
1418
name text,
1519
jmx_listenaddr text,
@@ -47,7 +51,8 @@ synchdb_del_jmx_conninfo(
4751
| **`jmx_ssl_truststore`** | *(text)*<br>Path to the truststore (JKS) that holds trusted CA certificates. Used to verify client identities if mutual TLS is configured. |
4852
| **`jmx_ssl_truststore_pass`** | *(text)*<br>Password for the truststore file. |
4953

50-
### Password and Access Files for JMX Authentication
54+
### **Password and Access Files for JMX Authentication**
55+
5156
When enabling JMX authentication in your JVM configuration (i.e., setting jmx_auth = true), you must provide two files:
5257

5358
Password File – defines usernames and their passwords.
@@ -60,14 +65,14 @@ These files are used by the JVM to control who can connect and what they are all
6065

6166
This file stores valid JMX usernames and their corresponding passwords.
6267

63-
Format:
68+
**Format:**
6469
```
6570
# Format: username password
6671
<username> <password>
6772
6873
```
6974

70-
Example:
75+
**Example:**
7176

7277
```
7378
monitorRole mySecretPassword
@@ -106,7 +111,7 @@ chown youruser:youruser jmxpwd.file jmxacc.file
106111
107112
```
108113

109-
## synchdb_add_jmx_conninfo Examples
114+
## **synchdb_add_jmx_conninfo Examples**
110115

111116
**Enable JMX MBean with no authentication and no SSL:**
112117

@@ -184,19 +189,19 @@ SELECT synchdb_add_jmx_conninfo(
184189
'truststorepass'); -- SSL trust store password
185190
```
186191

187-
## Visualize JMX metrics with jconsole
192+
## **Visualize JMX metrics with jconsole**
193+
188194
When a connector with JMX configuration is started, the JMX service will be running on the designated port number. We can use `jconsole` that comes with Java distribution to connect to JMX server. It is possible to connect locally via the JVM (connector worker) PID or via IP address and port number. If authentication is enabled, username and password are required as well. If no authentication is used, these can be left empty.
189195

190196
![img](/images/jmx.jpg)
191197

192-
193198
Once connected, we can view all the details about JVM's operating metrics such as CPU, memory, class utilization, threads...etc.
194199

195200
![img](/images/jmx2.jpg)
196201
![img](/images/jmx3.jpg)
197202
![img](/images/jmx4.jpg)
198203

199-
## Visualize Debezium JMX MBeans
204+
## **Visualize Debezium JMX MBeans**
200205

201206
The last tab is MBeans, which contains the Debezium specific metrics for schema history, snapshot and streaming stages.
202207

docs/zh/monitoring/jmx_monitor.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# JMX MBEAN 监控
22

3-
## JMX(Java 管理扩展)
3+
## **JMX(Java 管理扩展)**
4+
45
JMX,即 Java 管理扩展,是一种 Java 技术,提供用于管理和监控应用程序、系统对象、设备和面向服务的网络的工具。它允许开发人员公开应用程序信息,并允许外部工具访问和交互这些信息,以进行监控和管理。
56

6-
## Debezium 的 JMX MBean
7+
## **Debezium 的 JMX MBean**
78
Debezium 连接器通过连接器的 MBean 名称(MBean 标签等于连接器名称)公开指标。这些指标特定于每个连接器实例,提供有关连接器快照、流式传输和模式历史记录进程行为的数据。
89

9-
## 使用 synchdb_add_jmx_conninfo() 在连接器上启用 JMX,或使用 synchdb_del_jmx_conninfo() 禁用
10+
## **使用 synchdb_add_jmx_conninfo() 在连接器上启用 JMX,或使用 synchdb_del_jmx_conninfo() 禁用**
1011
synchdb_add_jmx_conninfo() 函数将 JMX 监控配置添加到现有连接器。这可以通过 JConsole 或 Prometheus JMX Exporter 等工具启用运行时监控和诊断。synchdb_del_jmx_conninfo() 可用于禁用 JMX。
1112

1213
**函数签名**
13-
**Function Signature**
14+
1415
synchdb_add_jmx_conninfo(
1516
name text,
1617
jmx_listenaddr text,
@@ -47,7 +48,8 @@ synchdb_del_jmx_conninfo(
4748
| **`jmx_ssl_truststore`** | *(text)*<br>保存受信任 CA 证书的信任库 (JKS) 的路径。如果配置了双向 TLS,则用于验证客户端身份。|
4849
| **`jmx_ssl_truststore_pass`** | *(文本)*<br>信任库文件的密码。
4950

50-
### JMX 身份验证的密码和访问文件
51+
### **JMX 身份验证的密码和访问文件**
52+
5153
在 JVM 配置中启用 JMX 身份验证(即设置 jmx_auth = true)时,您必须提供两个文件:
5254

5355
密码文件 - 定义用户名及其密码。
@@ -60,21 +62,24 @@ JVM 使用这些文件来控制哪些用户可以连接以及他们被允许执
6062

6163
此文件存储有效的 JMX 用户名及其对应的密码。
6264

63-
格式:
65+
**格式:**
66+
6467
```
6568
# Format: username password
6669
<username> <password>
6770
6871
```
6972

70-
例子:
73+
**例子:**
74+
7175
```
7276
monitorRole mySecretPassword
7377
controlRole anotherSecretPassword
7478
7579
```
7680

7781
**文件权限**
82+
7883
确保两个文件均归运行 JVM 的用户所有,且具有受限的权限:
7984

8085
```
@@ -83,7 +88,7 @@ chown youruser:youruser jmxpwd.file jmxacc.file
8388
8489
```
8590

86-
## synchdb_add_jmx_conninfo 示例
91+
## **synchdb_add_jmx_conninfo 示例**
8792

8893
**启用无需身份验证和 SSL 的 JMX MBean:**
8994

@@ -161,7 +166,8 @@ SELECT synchdb_add_jmx_conninfo(
161166
'truststorepass'); -- SSL trust store password
162167
```
163168

164-
## 使用 jconsole 可视化 JMX 指标
169+
## **使用 jconsole 可视化 JMX 指标**
170+
165171
当启动一个配置了 JMX 的连接器时,JMX 服务将在指定的端口号上运行。我们可以使用 Java 发行版自带的 jconsole 连接到 JMX 服务器。可以通过 JVM(连接器工作进程)PID 或 IP 地址和端口号进行本地连接。如果启用了身份验证,则还需要用户名和密码。如果不使用身份验证,则这些可以留空。
166172

167173
![img](/images/jmx.jpg)
@@ -172,7 +178,7 @@ SELECT synchdb_add_jmx_conninfo(
172178
![img](/images/jmx3.jpg)
173179
![img](/images/jmx4.jpg)
174180

175-
## 可视化 Debezium JMX MBean
181+
## **可视化 Debezium JMX MBean**
176182

177183
最后一个选项卡是 MBean,其中包含 Debezium 针对架构历史记录、快照和流式传输阶段的特定指标。
178184

0 commit comments

Comments
 (0)