This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong-website.git


The following commit(s) were added to refs/heads/master by this push:
     new ba53a5f10 [INLONG-503][Agent] The agent module specifies the indicator 
monitoring method (#504)
ba53a5f10 is described below

commit ba53a5f10bc421e764427e3990b87d4fd6b1903e
Author: Greedyu <[email protected]>
AuthorDate: Mon Aug 8 15:20:06 2022 +0800

    [INLONG-503][Agent] The agent module specifies the indicator monitoring 
method (#504)
---
 docs/modules/agent/metrics.md                      | 26 +++++++++-------------
 .../current/modules/agent/metrics.md               | 26 +++++++++-------------
 2 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/docs/modules/agent/metrics.md b/docs/modules/agent/metrics.md
index 73c1f473e..3505ef89d 100644
--- a/docs/modules/agent/metrics.md
+++ b/docs/modules/agent/metrics.md
@@ -4,27 +4,23 @@ sidebar_position: 3
 ---
 
 ## JMX Configuration
-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
--Dcom.sun.management.jmxremote
--Djava.rmi.server.hostname=127.0.0.1
--Dcom.sun.management.jmxremote.port=9999
--Dcom.sun.management.jmxremote.authenticate=false
--Dcom.sun.management.jmxremote.ssl=false
+```properties
+# The listener of JMX is AgentJmxMetricListener
+agent.domainListeners=org.apache.inlong.agent.metrics.AgentJmxMetricListener
 ```
 
 ## Prometheus Configuration 
-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
+# The listener of Prometheus is AgentPrometheusMetricListener
+agent.domainListeners=org.apache.inlong.agent.metrics.AgentPrometheusMetricListener
+# the default is 9080
+agent.prometheus.exporter.port=9080
 ```
 
+## Custom Configuration
+If the user wants to monitor the indicator capabilities in other ways, You can 
inherit the `org.apache.inlong.agent.metrics.AgentMetricBaseListener`  class 
and implement it, 
+and finally configure the `agent.domainListeners` property in the 
`agent.properties` file. 
+
 ## Appendix: Metrics Items
 
 ### AgentTaskMetric
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/metrics.md 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/metrics.md
index f4b1d2186..65d21ce8b 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/metrics.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/modules/agent/metrics.md
@@ -4,27 +4,23 @@ sidebar_position: 3
 ---
 
 ## JMX 配置
-Agent 提供了 JMX 和 Prometheus 方式的监控指标能力,默认使用 JMX 方式。JMX 方式的监控指标已经注册到 MBeanServer
-用户可以在 Agen t的启动参数中增加如下类似 JMX 定义(端口和鉴权根据情况进行调整),实现监控指标从远端采集。
-
-```shell
--Dcom.sun.management.jmxremote
--Djava.rmi.server.hostname=127.0.0.1
--Dcom.sun.management.jmxremote.port=9999
--Dcom.sun.management.jmxremote.authenticate=false
--Dcom.sun.management.jmxremote.ssl=false
+```properties
+# JMX监听类是AgentJmxMetricListener
+agent.domainListeners=org.apache.inlong.agent.metrics.AgentJmxMetricListener
 ```
 
 ## Prometheus 配置 
-用户可以在`agent.properties`中声明是否启用Prometheus以及HTTPServer端口号
-
 ```properties
-# 默认不启用Prometheus
-agent.prometheus.enable=true
-# 默认端口为8080
-agent.prometheus.exporter.port=8080
+# Prometheus监听类是AgentPrometheusMetricListener
+agent.domainListeners=org.apache.inlong.agent.metrics.AgentPrometheusMetricListener
+# 默认端口为9080
+agent.prometheus.exporter.port=9080
 ```
 
+## 自定义配置
+如果用户想通过其他监控指标能力,可以继承`org.apache.inlong.agent.metrics.AgentMetricBaseListener`类并实现,
+最后在 `agent.properties` 文件中配置 `agent.domainListeners` 属性。
+
 ## 附录:指标项
 
 ### AgentTaskMetric

Reply via email to