Kafka-JMX Metrics | PromQL Query for BytesInPerSec

125 views
Skip to first unread message

sriraag sridhar

unread,
Apr 29, 2021, 8:11:31 AM4/29/21
to Prometheus Users
Hello All,
I am new to prometheus and have setup JMX_Exporter for Kafka JMX Metrics. I am still getting my head around rates in prometheus and have been reading on Counter/Gauges/Histograms etc…

I am trying to get the average BytesInPerSec

I noticed below properties give me the BytesInPerSec

  • kafka_server_BrokerTopicMetrics_Count
  • kafka_server_BrokerTopicMetrics_FifteenMinuteRate
  • kafka_server_BrokerTopicMetrics_FiveMinuteRate
  • kafka_server_BrokerTopicMetrics_MeanRate
  • kafka_server_BrokerTopicMetrics_OneMinuteRate

So since BytesInPerSec_Count is total count of bytes in since start of prometheus exporter, and does not decrease unless binary is shutdown, i am thinking this as a Counter, correct me here.

Question is

  1. What is the difference between the below 2 queries ?
  2. Does FiveMinuteRate give me the info about the last5min changes in BytesInPerSec?
  3. Also what is the difference between rate and avg_over_time ?

Also do we apply rates only on Counters ?

rate(kafka_server_BrokerTopicMetrics_Count{env="Cluster1",name="BytesInPerSec",topic=""}[5m])
    rate(kafka_server_BrokerTopicMetrics_FiveMinuteRate{env="Cluster1",topic="",name="BytesInPerSec"}[5m])

Thanks in Advance. Any document helping me to understand the rates and other functions will really help.

Reply all
Reply to author
Forward
0 new messages