CMAK icon indicating copy to clipboard operation
CMAK copied to clipboard

How can I get topic metrics instead of html ?

Open wutingting1993 opened this issue 4 years ago • 2 comments

Is there an api to get topic metrics? I tried GET /api/status/:c/topicIdentities , but no metrics.

image

wutingting1993 avatar Jan 19 '21 01:01 wutingting1993

@wutingting1993 The :c here is stands for Cluster name, for example u have a cluster named kafka_local, than:

/* GET /api/status/kafka_local/topicIdentities */

/* Example return*/
{
  "topicIdentities" : [ {
    "topic" : "__consumer_offsets",
    "readVersion" : 0,
    "partitions" : 50,
    "partitionsIdentity" : [ {/*...*/
    }]
   // Other fields
}

Other api route ref: https://github.com/yahoo/CMAK/blob/master/conf/routes#L62

FesonX avatar Jan 30 '21 01:01 FesonX

@wutingting1993 The :c here is stands for Cluster name, for example u have a cluster named kafka_local, than:

/* GET /api/status/kafka_local/topicIdentities */

/* Example return*/
{
  "topicIdentities" : [ {
    "topic" : "__consumer_offsets",
    "readVersion" : 0,
    "partitions" : 50,
    "partitionsIdentity" : [ {/*...*/
    }]
   // Other fields
}

Other api route ref: https://github.com/yahoo/CMAK/blob/master/conf/routes#L62

I tried this api. but , I didn't found producer FIFTEEN_MINUTE_RATE, FIVE_MINUTE_RATE, ONE_MINUTE_RATE, MEAN_RATE in response. so , I changed to connect jmx to get producer rate .

image

wutingting1993 avatar Feb 03 '21 09:02 wutingting1993