apache-kafka - 使用 Burrow 进行 Kafka 监控

标签 apache-kafka lag kafka-consumer-api consumer

使用Burrow监控Kafka时

1) 主题分区中给定消费者组的 Burrow 开始和结束偏移量是什么意思?我找不到任何相关文档。

匹配的 Kafka 术语是什么? Kafka 术语:最后提交的偏移量、当前偏移量、高水位线偏移量、日志结束偏移量。 Burrow 的起点和终点偏移量映射到什么?是 Kafka Current Offset 和 kafka Highwater mark offset 吗?

例如。

http://localhost:8000/v2/kafka/local/consumer/MyGroup-1-4/lag

{
   "error":false,
   "message":"consumer group status returned",
   "status":{
      "cluster":"local",
      "group":"MyGroup-1-4",
      "status":"ERR",
      "complete":false,
      "partitions":[
         {
            "topic":"MyTopicTest-1",
            "partition":1,
            "status":"OK",
            "start":{
               "offset":28,
               "timestamp":1468769616468,
               "lag":0
            },
            "end":{
               "offset":34,
               "timestamp":1468805045000,
               "lag":0
            }
         },
         {
            "topic":"MyTopicTest-1",
            "partition":3,
            "status":"STOP",
            "start":{
               "offset":32,
               "timestamp":1468803763000,
               "lag":0
            },
            "end":{
               "offset":32,
               "timestamp":1468804303000,
               "lag":0
            }
         },
         {
            "topic":"MyTopicTest-1",
            "partition":4,
            "status":"OK",
            "start":{
               "offset":32,
               "timestamp":1468804003000,
               "lag":0
            },
            "end":{
               "offset":33,
               "timestamp":1468804783000,
               "lag":0
            }
         },
         {
            "topic":"MyTopicTest-1",
            "partition":5,
            "status":"STOP",
            "start":{
               "offset":32,
               "timestamp":1468803763000,
               "lag":0
            },
            "end":{
               "offset":32,
               "timestamp":1468804303000,
               "lag":0
            }
         },
         {
            "topic":"MyTopicTest-1",
            "partition":6,
            "status":"OK",
            "start":{
               "offset":33,
               "timestamp":1468804423000,
               "lag":0
            },
            "end":{
               "offset":34,
               "timestamp":1468805045000,
               "lag":0
            }
         },
         {
            "topic":"MyTopicTest-1",
            "partition":7,
            "status":"OK",
            "start":{
               "offset":27,
               "timestamp":1468769387995,
               "lag":0
            },
            "end":{
               "offset":33,
               "timestamp":1468804783000,
               "lag":0
            }
         },
         {
            "topic":"MyTopicTest-1",
            "partition":9,
            "status":"OK",
            "start":{
               "offset":27,
               "timestamp":1468769433946,
               "lag":0
            },
            "end":{
               "offset":33,
               "timestamp":1468804783000,
               "lag":0
            }
         }
      ],
      "partition_count":10,
      "maxlag":null,
      "totallag":0
   },
   "request":{
      "url":"/v2/kafka/local/consumer/MyGroup-1-4/lag",
      "host":"****",
      "cluster":"local",
      "group":"MyGroup-1-4",
      "topic":""
   }
}

2) 某些状态被标记为“已停止”。将状态标记为 STOPPED 的 Burrow 规则是: 如果现在时间与最近偏移时间之间的差值大于最近偏移量与窗口中最旧偏移量之间的差值,则消费者处于 ERROR 状态,并且分区被标记为 STOPPED 。但是,如果该分区的消费者偏移量和当前代理偏移量相等,则不会认为该分区有错误。

“现在是什么时候”?是滞后请求发送到Burrow的时间

最佳答案

1) 主题分区中给定消费者组的 Burrow 开始和结束偏移量是什么意思?我找不到任何相关文档。
这两个偏移量表示logcheck评估窗口中的开始和结束偏移量(消费者提交的偏移量)。默认窗口将存储 10 个偏移量,并用于评估消费者滞后。 请引用下图和链接。
Burrow: Kafka Consumer Monitoring Reinvented enter image description here

2、什么是“现在时间”?是向 Burrow 发送滞后请求的时间吗?
“现在时间”表示当前“滞后检查间隔”。您可以在Example 5中获得更详细的示例.

The difference in time between the first offset stored and the last offset stored is 540 seconds, and the difference in time between now and the last offset stored is 660 seconds. The consumer has stopped committing offsets, which means it has failed or has been stopped.

关于apache-kafka - 使用 Burrow 进行 Kafka 监控,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38427861/

相关文章:

apache-kafka - 如果您的消费者少于分区,会发生什么?

apache-kafka - 基于时间的日志压缩在 Kafka 中不起作用

node.js - JSON.parse 未定义的字符串

apache-kafka - 是否可以使用MirrorMaker2复制没有别名前缀的kafka主题

apache-kafka - Kafka Streams 计算不同的值

JavaFX:在 Pane 内同时移动数百个 ImageView(性能问题)

xcode - 更改标签文本时延迟响应(Swift)

java - 选项卡布局 : Lag when switching fragments

apache-kafka - 卡夫卡休息的例子

apache-kafka - Kafka 流处理器上下文中的周期性 NPE