-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
0
I've been trying to get kafka broker metrics using go sarama library and I have few concerns.
I initialized a sarama config using sarama.NewConfig() with the version as sarama.V2_0_0_0 and I used this config to obtain metrics as mentioned in your doc
metrics.GetOrRegisterMeter("incoming-byte-rate", config.MetricRegistry).RateMean()
-
Does this provide the total incoming byte rate including all the incoming messages? Because I compared this value with lenses and other tools but it is totally different (same for "outgoing-byte-rate" and "request-rate". I suppose this request rate implies the message rate).
-
Unlike
RateMean()function,Rate1(),Rate5()andRate15()return only 0 though there's plenty of activity in the kafka cluster. Do you know any reason for this? -
I used
metrics.GetOrRegisterMeter(fmt.Sprintf("incoming-byte-rate-for-broker-%v", broker.ID()), config.MetricRegistry).RateMean()to get broker level metrics as mentioned in the doc but I only received 0 (same for other broker level metrics as well).
I'd really appreciate if someone can help me out here and enlighten me on these concerns. Thanks in advance. :)