This is an automated email from the ASF dual-hosted git repository.
gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong-website.git
The following commit(s) were added to refs/heads/master by this push:
new 9b14018 [INLONG-1712][Agent][Docs] Add agent prometheus metrics doc
(#227)
9b14018 is described below
commit 9b140180e221cc009714e3c8afa862ad2b1ec031
Author: Yuanhao Ji <[email protected]>
AuthorDate: Tue Dec 14 20:45:49 2021 +0800
[INLONG-1712][Agent][Docs] Add agent prometheus metrics doc (#227)
---
docs/modules/agent/overview.md | 28 +++++++++++++++++++++-
.../current/modules/agent/overview.md | 26 +++++++++++++++++++-
2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/docs/modules/agent/overview.md b/docs/modules/agent/overview.md
index 7e1ab15..7a090d0 100644
--- a/docs/modules/agent/overview.md
+++ b/docs/modules/agent/overview.md
@@ -38,7 +38,7 @@ The code is based on the old version of dbsync, the main
modification is to chan
## Monitor Metrics configuration
-Agent provides the ability of monitoring indicators in JMX mode, and the
monitoring indicators have been registered to MBeanServer
+Agent provides the ability of monitoring indicators in JMX and Prometheus
mode, and JMX mode is used by default. The monitoring indicators have been
registered to MBeanServer
Users can add similar JMX (port and authentication are adjusted according to
the situation) to the startup parameters of the Agent to realize the collection
of monitoring indicators from the remote end.
```Shell
@@ -75,3 +75,29 @@ The agent indicators are divided into the following items,
and the indicators ar
| readSuccessNum | the number of successful reads |
| sendSuccessNum | the number of successfully sent |
+### SourceMetric
+
+| property | type | description
|
+|----------------------------|---------|--------------------------------------------------------------------|
+| agent_source_count_success | Counter | the success message count in agent
source since agent started |
+| agent_source_count_fail | Counter | the sink success message count in
agent source since agent started |
+
+### SinkMetric
+
+| property | type | description
|
+|--------------------------|---------|--------------------------------------------------------------------|
+| agent_sink_count_success | Counter | the sink success message count in agent
source since agent started |
+| agent_sink_count_fail | Counter | the sink failed message count in agent
source since agent started |
+
+> In addition, Agent also has built-in Prometheus `simpleclient-hotspot`,
which is used to collect JVM-related metrics.
+
+### Configure Prometheus
+
+You can declare whether to enable Prometheus and HTTPServer port in
`agent.properties`.
+
+```properties
+# the default is false
+agent.prometheus.enable=true
+# the default is 8080
+agent.prometheus.exporter.port=8080
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/overview.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/overview.md
index 609a63f..ef161fe 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/overview.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/overview.md
@@ -37,7 +37,7 @@ SQL正则分解,转化成多条SQL语句
代码基于老版本的dbsync,主要的修改是将tdbus-sender的发送改为推送到agent-channel的方式做融合
## 监控指标配置
-Agent提供了JMX方式的监控指标能力,监控指标已经注册到MBeanServer
+Agent提供了JMX和Prometheus方式的监控指标能力,默认使用JMX方式。JMX方式的监控指标已经注册到MBeanServer
用户可以在Agent的启动参数中增加如下类似JMX定义(端口和鉴权根据情况进行调整),实现监控指标从远端采集。
```shell
@@ -73,5 +73,29 @@ Agent指标分为以下几项, 各项的属性分别为:
| readSuccessNum | 读取成功条数 |
| sendSuccessNum | 发送成功条数 |
+### SourceMetric
+| 属性名称 | 类型 | 说明 |
+|----------------------------|---------|-------------------|
+| agent_source_count_success | Counter | source 读取成功次数 |
+| agent_source_count_fail | Counter | source 读取失败次数 |
+### SinkMetric
+
+| 属性名称 | 类型 | 说明 |
+|--------------------------|---------|-----------------|
+| agent_sink_count_success | Counter | sink 写入成功次数 |
+| agent_sink_count_fail | Counter | sink 写入失败次数 |
+
+> 另外,Agent还内置了Prometheus的`simpleclient-hotspot`,用于采集JVM相关的指标信息
+
+### Configure Prometheus
+
+用户可以在`agent.properties`中声明是否启用Prometheus以及HTTPServer端口号
+
+```properties
+# 默认不启用Prometheus
+agent.prometheus.enable=true
+# 默认端口为8080
+agent.prometheus.exporter.port=8080
+```