遅延監視
1557 ワード
TotalTimeMs=queue+local+remote(オンライン環境では99%以上)+response send time
produce: kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce consumer: kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer follower:kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchFollower
consumerの例:FetchFollowerを要求するのにかかるすべての時間
ObjectName:kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer ClassName:com.yammer.metrics.reporting.JmxReporter$Histogram説明:Information on the management interface of the MBean
属性値:
名前
値
50thPercentile
1.0
75thPercentile
1.0
95thPercentile
3.0
98thPercentile
6.0
999thPercentile
83.826
99thPercentile
10.0
Count
4820
Max
441.0
Mean-平均
1.7898340248962656
Min
0.0
StdDev-標準偏差
8.634806791760138
Demo:
produce: kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce consumer: kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer follower:kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchFollower
consumerの例:FetchFollowerを要求するのにかかるすべての時間
ObjectName:kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer ClassName:com.yammer.metrics.reporting.JmxReporter$Histogram説明:Information on the management interface of the MBean
属性値:
名前
値
50thPercentile
1.0
75thPercentile
1.0
95thPercentile
3.0
98thPercentile
6.0
999thPercentile
83.826
99thPercentile
10.0
Count
4820
Max
441.0
Mean-平均
1.7898340248962656
Min
0.0
StdDev-標準偏差
8.634806791760138
Demo:
JMXConnector conn = null;
MBeanServerConnection mbsc = null;
ObjectName objectName = null;
double mean = 0;
try {
conn = KafkaJmxUtil.getJmxConnection("localhost", 9999);
mbsc = conn.getMBeanServerConnection();
objectName = new ObjectName("kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer");
mean = (Double) mbsc.getAttribute(objectName, "Mean");
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("Mean:" + mean);
Mean:1.7898340248962656