Burrow 시작하기
Burrow 는 또한 링크드인에서 제작한 아파치 카프카용 컨슈머 lag 를 체크하기 위한 api 서비스이다.
kafka 에 대한 endpoint 정보를 burrow 에 적용을 하면 카프카 lag 에 대한 정보부터 다양한 정보를 api 로 제공 받을 수 있다.
이 정보들을 활용해서 로그로 적재할 수 도 있다
공식문서
https://github.com/linkedin/Burrow
GitHub - linkedin/Burrow: Kafka Consumer Lag Checking
Kafka Consumer Lag Checking. Contribute to linkedin/Burrow development by creating an account on GitHub.
github.com
burrow 설치
먼저 burrow 를 설치전에 go 를 설치해야 한다. burrow 는 go 로 만들어져 있다.
go 설치
brew install go
및 go 사이트에서 다운받아서 사용하면 된다.
git 레포지토리 clone
$ git clone https://github.com/linkedin/Burrow.git
go 실행하여 Burrow.exe 생성
클론 받은 디렉토리로 이동하고 go mod tidy 및 go install 을 해라.
그러면 go 가 설치면 디렉토리에 go 하위 폴더에 Burrow.exe 가 생겼을 거다.
나 같은 경우 mac
/Users/사용자명/go/bin 에 생성됐다.
$ cd to the source directory.
$ go mod tidy
$ go install
설정파일 수정
실행 전에 설정파일을 수정해야 한다.
파일명 burrow.toml 이고 git clone 으로 파일 repo 의 config 폴더에 있다.
[general]
[logging]
level="info"
[zookeeper]
servers=[ "localhost:2181"]
[client-profile.local]
client-id="burrow-local"
kafka-version="2.0.0"
[cluster.local]
class-name="kafka"
servers=[ "localhost:9092" ]
client-profile="local"
topic-refresh=120
offset-refresh=30
[consumer.local]
class-name="kafka"
cluster="local"
servers=[ "localhost:9092" ]
client-profile="local"
group-denylist="^(console-consumer-|python-kafka-consumer-|quick-).*$"
group-allowlist=""
[httpserver.default]
address=":8000"
[storage.default]
class-name="inmemory"
workers=20
intervals=15
expire-group=604800
min-distance=1
설정값들에 대한 정리는 여기 정리가 되어 있다.
https://gunju-ko.github.io/kafka/2018/06/06/Burrow.html
Monitoring Consumer LAG - Burrow
Burrow Burrow - Kafka Consumer Lag Checking Burrow는 카프카의 모니터링 툴로 Consumer의 LAG을 모니터링할 때 주로 사용된다. 모든 Consumer의 커밋 오프셋을 모니터링한다. 또한 필요할 때 Consumer의 상태를 계산
gunju-ko.github.io
실행
git clone 받은 repo로 이동 후 아래와 같이 Burrow.exe 파일로 수정한 config 파일을 읽어 실행하면 된다.
$ /Users/사용자명/bin/Burrow --config-dir=/config
서비스 확인은
localhost:8000/burrow/admin 을 띄우면 GOOD 이 뜬다.
엔드포인트 정리된 문서는
https://github.com/linkedin/Burrow/wiki/HTTP-Endpoint
GitHub - linkedin/Burrow: Kafka Consumer Lag Checking
Kafka Consumer Lag Checking. Contribute to linkedin/Burrow development by creating an account on GitHub.
github.com