0

I am using Kafka exporter Grafana dashboard to monitor the message input per second and the message out per second for a certain topic. I am aware that internally Grafana uses Prometheus queries to get the message input and output per second through the below queries:

sum(rate(kafka_topic_partition_current_offset{topic=~"$topic"}[1m])) by (topic)

sum(delta(kafka_consumergroup_current_offset{consumergroup=~"$consumergroup",topic=~"$topic"}[1m])/60) by (consumergroup, topic)

Can you please provide more details on the above two formulas especially on Prometheus functions sum/rate/delta e.g., do the formulas return the moving average in/out over a period of 1 minute? why the function rate is used in the first query, while delta is used in the second?

Thank you.

4

0 回答 0