无论如何,当kafka队列中的lag = 0时,我可以配置burrow来发送电子邮件通知。这是我的配置。
[general]
logdir=log
logconfig=config/logging.cfg
pidfile=burrow.pid
client-id=burrow-lagchecker
group-blacklist=^(console-consumer-|python-kafka-consumer-).*$
#group-whitelist=^(my-important-consumer).*$
[zookeeper]
hostname=zkhost01.example.com
hostname=zkhost02.example.com
hostname=zkhost03.example.com
port=2181
timeout=6
lock-path=/burrow/notifier
[kafka "local"]
broker=kafka01.example.com
broker=kafka02.example.com
broker=kafka03.example.com
broker=kafka04.example.com
broker=kafka05.example.com
broker-port=10251
zookeeper=zkhost01.example.com
zookeeper=zkhost02.example.com
zookeeper=zkhost03.example.com
zookeeper-port=2181
zookeeper-path=/kafka-cluster
offsets-topic=__consumer_offsets
[storm "local"]
zookeeper=zkhost01.example.com
zookeeper=zkhost02.example.com
zookeeper=zkhost03.example.com
zookeeper-port=2181
zookeeper-path=/kafka-cluster/stormconsumers
[tickers]
broker-offsets=60
[lagcheck]
intervals=10
expire-group=604800
[smtp]
server=mailserver.example.com
port=25
from=burrow-noreply@example.com
template=config/default-email.tmpl
[emailnotifier "xxh@example.com"]
group=local,critical-consumer-group
group=local,other-consumer-group
interval=60
[notify]
interval=10
答案 0 :(得分:0)
您可以在配置中添加阈值变量
[notifier.gemail]
class-name="email"
interval=30
threshold=1
https://github.com/linkedin/Burrow/wiki/Notifier-Email https://godoc.org/github.com/linkedin/Burrow/core/protocol#StatusConstant