Skip to Content
Kafka权威指南
book

Kafka权威指南

by Neha Narkhede, Gwen Shapira, Todd Palino
January 2018
Beginner to intermediate
234 pages
7h 8m
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南
10
监控
Kafka
Kafka
应用程序包含了大量的度量指标,以至于很多人搞不清楚哪些是重要的,哪些可以
置之不理。它们所涉及的范围,从简单的流量速率度量指标到各种请求类型的时间度量指
标,既有主题级别的,也有分区级别的。这些度量指标为
broker
的每一种行为提供了详细
的信息,不过它们也成为了
Kafka
系统监控者的“噩梦”。
这一章将详细介绍一些常用的关键性度量指标,以及如何根据这些指标采取相应的行动,
也会介绍一些用于调试问题的度量指标。不过,这不是一个完整的度量指标清单。度量指
标清单会经常发生变化,而且很多度量指标只对有经验的
Kafka
开发人员有参考价值。
10.1
 度量指标基础
在介绍
Kafka broker
和客户端的度量指标之前,先来讨论有关监控
Java
应用程序的基础知
识,以及有关监控和告警的最佳实践。学完本章知识,读者将会对应用程序的监控有一个
基本的了解,同时能明白度量指标的重要性。
10.1.1
 度量指标在哪里
Kafka
提供的所有度量指标都可以通过
Java Management Extensions
JMX
)接口来访
问。要在外部监控系统里使用这些度量指标,最简单的方式是将负责收集度量指标的代理
agent
)连接到
Kafka
上。代理作为一个单独的进程运行在监控系统里,并连接到
Kafka
JMX
接口上,例如使用
Nagios XI check_jmx
插件或
jmxtrans
来连接
JMX
接口;也可
以直接在
Kafka
进程里运行一个
JMX
代理,然后通过
HTTP
连接访问度量指标,比如
Jolokia ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習

精通機器學習

Aurélien Géron
精通特征工程

精通特征工程

Alice Zheng, Amanda Casari
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115473271