Giter Club home page Giter Club logo

logagent's Introduction

首先配置kafka和zookeeper 的日志信息的保存位置

kafka依赖于zookeeper来管理集群borker各个结点的信息,服务注册发现等等

在windows下面要设置成正确的位置

kafka:
# A comma separated list of directories under which to store log files
log.dirs=E:/zsw/kafka-logs

zookeeper:
# the directory where the snapshot is stored.
dataDir=E:/zsw/zookeeper

然后通过管理员模式启动zookeeper

bin\windows\zookeeper-server-start.bat config\zookeeper.properties

再启动kafka

bin\windows\kafka-server-start.bat config\server.properties

然后就可以启动logagent.exe 来转发日志my.log信息发送到kafka集群

配置config.ini

[kafka]
address=127.0.0.1:9092
topic=web_log

[taillog]
path=./my.log

最后可以使用kafka自带的console-consumer来消费指定topic的信息

kafka-console-consumer.bat --bootstrap-server=127.0.0.1:9092 --from-beginning --topic web_log

然后可以读取消费kafka里面的指定topic的日志

logagent's People

Contributors

zsw-test 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.