You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2021/11/18 09:43:58 UTC

[GitHub] [incubator-inlong-website] luchunliang commented on a change in pull request #187: [INLONG-1808] Optimize document of DataProxy about monitor metric

luchunliang commented on a change in pull request #187:
URL: https://github.com/apache/incubator-inlong-website/pull/187#discussion_r752066604



##########
File path: docs/modules/dataproxy/architecture.md
##########
@@ -150,3 +150,51 @@ Sink configuration example and corresponding notes
     
     agent1.sinks.meta-sink-more1.max-survived-size = 3000000
     Maximum number of caches
+    
+# 4、Monitor metrics configuration instructions
+
+  DataProxy provide monitor indicator based on JMX, user can implement the code that read the metrics and report to user-defined monitor system.
+Source-module and Sink-module can add monitor metric class that is the subclass of org.apache.inlong.commons.config.metrics.MetricItemSet, and register it to MBeanServer. User-defined plugin can get module metric with JMX, and report metric data to different monitor system.
+
+  User can describe the configuration in the file "common.properties ". For example:
+  
+	metricDomains=DataProxy
+	metricDomains.DataProxy.domainListeners=org.apache.inlong.dataproxy.metrics.prometheus.PrometheusMetricListener
+	metricDomains.DataProxy.snapshotInterval=60000
+
+  * The JMX domain name of DataProxy is "DataProxy". 
+  * It is defined by the parameter "metricDomains".
+  * The listeners of JMX domain is defined by the parameter "metricDomains.$domainName.domainListeners".
+  * The class names of the listeners is separated by the space char.
+  * The listener class need to implement the interface "org.apache.inlong.dataproxy.metrics.MetricListener".
+  * The snapshot interval of the listeners is defined by the parameter "metricDomains.$domainName.snapshotInterval", the parameter unit is "millisecond".
+
+  The method proto of org.apache.inlong.dataproxy.metrics.MetricListener is:
+  
+	public void snapshot(String domain, List itemValues);
+
+  The field of MetricItemValue.dimensions has these key(The fields of DataProxyMetricItem defined by the Annotation "@Dimension"):
+
+	public String clusterId:			DataProxy cluster ID.
+	public String sourceId:			DataProxy source component name.
+	public String sourceDataId:		DataProxy source component data id, when source is a TCP source, it will be port number.
+	public String inlongGroupId:		Inlong data group ID.
+	public String inlongStreamId:		Inlong data stream ID.
+	public String sinkId:				DataProxy sink component name.
+	public String sinkDataId:			DataProxy sink component data id, when sink is a pulsar sink, it will be topic name.

Review comment:
       fixed, remove 'public String' and format it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org