lizhichao/log2ck
Composer 安装命令:
composer require lizhichao/log2ck
包简介
listening log file written to clickhouse
关键字:
README 文档
README
A simple log collector, Monitor files through tail -F command, write to the Clickhouse.
Very low occupancy of resources, It can process more than 100 thousand log information per second
一个简单的日志收集器,占用极低的资源(比 Logstash,Fluentd,Logtail占用资源更少),每秒可以轻松收集几十万以上的日志信息。
install
composer require lizhichao/log2ck
example
tail -F apapche/access.log | php test.php
$db_conf = []; $db_conf['host'] = 'tcp://192.168.23.129:9091'; $db_conf['username'] = 'default'; $db_conf['password'] = '123456'; $db_conf['database'] = 'test1'; $table = 'web_log'; $server_name = 'web1'; $ck = new Log2Ck( $db_conf, // $table, // table [ 'host', 'ip', 'duration', 'create_time', 'method', 'url', 'path', 'code', 'size', 'refer', 'refer_host', 'user_agent', 'server_name' ] //field name ); $ck->regLogFn(function($row){ // 自己解析 $row return $array; //和上面的字段对应 })->run();
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2020-11-02