如何监控 Kafka 主题中的消息速率?
How to monitor messages rate in Kafka topics?
当某些主题的消息率高于或低于平时时,我如何得到提醒?
Kafka 发出大量指标,可以监控其使用情况和健康状况。这包括传入消息速率的指标,请参阅文档中的 Monitoring 部分。
您的用例通常是通过处理指标并能够根据用户定义的查询触发警报的工具来实现的。
例如,Prometheus handles that very well. You need to set it up so metrics from Kafka are forwarded to Prometheus (using https://github.com/prometheus/jmx_exporter). As it's a very common use case, you'll find hundreds of articles online that describe how to set that up. The JMX exporter has sample configs 也适用于 Kafka JMX 模式。
一旦指标在 Prometheus 中,您就可以跨代理聚合它们并设置 Alerts。
当某些主题的消息率高于或低于平时时,我如何得到提醒?
Kafka 发出大量指标,可以监控其使用情况和健康状况。这包括传入消息速率的指标,请参阅文档中的 Monitoring 部分。
您的用例通常是通过处理指标并能够根据用户定义的查询触发警报的工具来实现的。
例如,Prometheus handles that very well. You need to set it up so metrics from Kafka are forwarded to Prometheus (using https://github.com/prometheus/jmx_exporter). As it's a very common use case, you'll find hundreds of articles online that describe how to set that up. The JMX exporter has sample configs 也适用于 Kafka JMX 模式。
一旦指标在 Prometheus 中,您就可以跨代理聚合它们并设置 Alerts。