Hello Team,
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
-
What is the difference between the below 2 queries ?
-
Does FiveMinuteRate give me the info about the last5min changes in BytesInPerSec?
-
Also what is the difference between rate and avg_over_time ?
rate(kafka_server_BrokerTopicMetrics_Count{env="Cluster1",name="BytesInPerSec",topic=""}[5m])
rate(kafka_server_BrokerTopicMetrics_FiveMinuteRate{env="Cluster1",topic="",name="BytesInPerSec"}[5m])
Also do we apply rates only on Counters ?
Thanks in Advance.
Any document helping me to understand the rates and other functions will really help.
I’ve been refering this Query functions | Prometheus