GithubHelp home page GithubHelp logo

kzmonitor-1's Introduction

主要功能

Kafka

  • In/Out消息统计
  • Topic增量数据排名
  • Consumer延迟实时排名
  • 可查看每个Topic Partition的Logsize Offsets Lag数据
  • 实时获取指定Group的Logsize Offsets Lag
  • 可定制的历史数据存储时间

Zookeeper

  • 集群各个节点性能数据
  • 单个Server性能数据与该Server的当前活跃客户端
  • 展示指定znode数据(zookeeper get操作)
  • 可定制的历史数据存储时间

Api

Kafka

/api/v1/kafka

参数

  • cluster kafka.yaml中配置的Kafka集群名称
  • topic Kafka Topic
  • group Consumer Group
curl "http://127.0.0.1:8080/api/v1/kafka?cluster=myCluster&topic=myTopic&group=myGroup"

Zookeeper

/api/v1/zookeeper

参数

  • cluster
  • server
curl "http://127.0.0.1:8080/api/v1/zookeeper?cluster=myCluster&server=10.0.0.1"

安装配置

cd kzmonitor; pip install -r requirements.txt
  • etc/server.conf 控制数据采集间隔与存储时间等
  • etc/kafka.yaml 监控Kafka集群配置
  • etc/zookeeper.yaml 监控Zookeeper集群配置

启动

cd kzmonitor; nohup python kzmonitor.py &> /dev/null &

Run in Docker

Build or pull

$ docker build -t kzmonitor .

Or

$ docker pull liubin/kzmonitor

Edit Config files

Init config files

$ docker run -v `pwd`/tmp/etc:/tmp/etc --rm kzmonitor cp -r /kzmonitor/etc /tmp

Edit config files

$ vi tmp/etc/kafka.yaml
$ vi tmp/etc/zookeeper.yaml

Run the kzmonitor container

$ mkdir -p tmp/data/{kafka,zookeeper}
$ docker run -p 8088:80 \
    -v `pwd`/tmp/etc:/kzmonitor/etc \
    -v `pwd`/tmp/data:/kzmonitor/data \
    -e PORT=8088 \
    -e USER=aster \
    -e PASS=abcde \
    kzmonitor
$ docker logs -f kzmonitor

Envs for basic auth:

  • PORT: If changed in etc/server.conf, default is 8080;
  • USER: User for basic auth, default admin;
  • PASS: Password for basic auth, default 567

kzmonitor-1's People

Contributors

liubin avatar tqlihuiqi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.