Coder Social home page Coder Social logo

log_to_kafka's Introduction

实时收集应用程序日志,统一发送到kafka中

查看kfaka中数据的命令:

kafka-console-consumer --zookeeper 192.168.10.5:2181 --topic temp_log_kafka

(1)json信息发送到kafka中的数据

{"method":"main","level":"INFO","line":"16","message":"es数据:1=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:41"}
{"method":"main","level":"INFO","line":"16","message":"es数据:2=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:41"}
{"method":"main","level":"INFO","line":"16","message":"es数据:3=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:41"}
{"method":"main","level":"INFO","line":"16","message":"es数据:4=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}
{"method":"main","level":"INFO","line":"16","message":"es数据:5=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}
{"method":"main","level":"INFO","line":"16","message":"es数据:6=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}
{"method":"main","level":"INFO","line":"16","message":"es数据:7=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}
{"method":"main","level":"INFO","line":"16","message":"es数据:8=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}
{"method":"main","level":"INFO","line":"16","message":"es数据:9=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}
{"method":"main","level":"INFO","line":"16","message":"es数据:10=>100","class":"test.SendTest","timestamp":"2017-02-07 16:52:42"}

(2)普通文本的信息发送到kafka中的数据

hadoop数据:350
hadoop数据:351
hadoop数据:352
hadoop数据:353
hadoop数据:354
hadoop数据:355
hadoop数据:356
hadoop数据:357
hadoop数据:358
hadoop数据:359
hadoop数据:360

博客相关

(5)iteye(2018.05月之前所有的文章,之后弃用)

我的公众号(woshigcs)

有问题可关注我的公众号留言咨询

image

log_to_kafka's People

Contributors

qindongliang avatar

Watchers

James Cloos 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.