我试图通过Jolokia从Cassandra群集中理解JMX指标,但在此方面没有成功,
我已经使用了此JMX API获得写潜伏期
/read/org.apache.cassandra.metrics:type=Table,keyspace=dummy,scope=dummydata,name=WriteLatency
请帮助我了解指标,无法从文档中获得明确的解释。
以与使用Nodetool's Tablatats
相同的方式,我可以从哪里获得延迟的价值{'status': 200, 'value': {'RateUnit': 'events/second', 'FiveMinuteRate': 1087.2892929429897, 'Max': 25109.16, '99thPercentile': 88.148, 'Count': 857256, '95thPercentile': 61.214, '98thPercentile': 73.45700000000001, 'MeanRate': 800.769491978301, '999thPercentile': 219.342, 'FifteenMinuteRate': 675.9521666587659, 'Mean': 35.578490977930414, 'StdDev': 133.86544518871287, 'DurationUnit': 'microseconds', 'Min': 11.865, 'OneMinuteRate': 774.2469977163188, '50thPercentile': 29.521, '75thPercentile': 35.425000000000004}, 'timestamp': 1552375557, 'request': {'type': 'read', 'mbean': 'org.apache.cassandra.metrics:keyspace=dummy,name=WriteLatency,scope=dummytable,type=Table'}}
您通过通过JMX阅读指标获得了更多细节。这是Nodetool tablestats输出与JMX输出匹配的方式:
nodetool tablestats dummykeyspace.dummytable | grep "Local write count" = org.apache.cassandra.metrics:keyspace=dummykeyspace,name=WriteLatency,scope=dummytable,type=Table Count
nodetool tablestats dummykeyspace.dummytable | grep "Local write latency" = org.apache.cassandra.metrics:keyspace=dummykeyspace,name=WriteLatency,scope=dummytable,type=Table Mean
这是Cassandra指标的概述,显示了收集的指标的类型,以及哪些指标可用于每个表:https://cassandra.apache.org/doc/latest/operating/metrics.html
如该页面上所述,指标由此处记录的代码管理:https://metrics.dropwizard.io/4.0.0.0/manual/core.html,对于回答有关多长度的问题最有用计算时间指标。