All Projects → peiliping → logwatch

peiliping / logwatch

Licence: Apache-2.0 license
日志采集工具

Programming Languages

lua
6591 projects
shell
77523 projects

Projects that are alternatives of or similar to logwatch

log4stash
Module to Log log4net Messages to ElasticSearch
Stars: ✭ 60 (+172.73%)
Mutual labels:  logstash, log, regex, grok
Androidutilcode
AndroidUtilCode 🔥 is a powerful & easy to use library for Android. This library encapsulates the functions that commonly used in Android development which have complete demo and unit test. By using it's encapsulated APIs, you can greatly improve the development efficiency. The program mainly consists of two modules which is utilcode, which is commonly used in development, and subutil which is rarely used in development, but the utils can be beneficial to simplify the main module. 🔥
Stars: ✭ 30,239 (+137350%)
Mutual labels:  log, regex
Fluent Bit
Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
Stars: ✭ 3,223 (+14550%)
Mutual labels:  log, fluentd
paStash
pastaʃ'ʃ = Spaghetti I/O Event Data Processing, Interpolation, Correlation and beyond 🍝
Stars: ✭ 89 (+304.55%)
Mutual labels:  logstash, log
Vector Test Harness
End-to-end test harness for the Vector observability data router
Stars: ✭ 32 (+45.45%)
Mutual labels:  logstash, fluentd
Dockerfile
some personally made dockerfile
Stars: ✭ 2,021 (+9086.36%)
Mutual labels:  logstash, filebeats
macropower-analytics-panel
It's like Google Analytics, but for Grafana dashboards!
Stars: ✭ 16 (-27.27%)
Mutual labels:  logstash, fluentd
k8s-log
容器日志搜集套件。
Stars: ✭ 15 (-31.82%)
Mutual labels:  logstash, log
Ansible Elk
📊 Ansible playbook for setting up an ELK/EFK stack and clients.
Stars: ✭ 284 (+1190.91%)
Mutual labels:  logstash, fluentd
Quicklogger
Library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Stars: ✭ 137 (+522.73%)
Mutual labels:  logstash, log
LogiAM
基于日志模板构建,采集任务动态管控、数据质量精确度量,一站式日志采集平台
Stars: ✭ 199 (+804.55%)
Mutual labels:  log, fluentd
ypereirareis.github.io
DevOps, Symfony and VueJs developer. Articles and experiences on docker, grafana, prometheus, RabbitMQ, PHP, MySQL, Admin, Nginx, Haproxy, SSH,...
Stars: ✭ 15 (-31.82%)
Mutual labels:  logstash
aixlog
Header-only C++ logging library
Stars: ✭ 95 (+331.82%)
Mutual labels:  log
python-hyperscan
A CPython extension for the Hyperscan regular expression matching library.
Stars: ✭ 112 (+409.09%)
Mutual labels:  regex
kubernetes-logging-helm
Scalable Kubernetes logging stack with Opensearch
Stars: ✭ 42 (+90.91%)
Mutual labels:  logstash
ocaml-re-nfa
OCaml code to construct an NFA from a regular expression
Stars: ✭ 44 (+100%)
Mutual labels:  regex
react-native-log-ios
React Native iOS standalone logger
Stars: ✭ 37 (+68.18%)
Mutual labels:  log
cryptaddress.now
A minimal service to detect which cryptocurrency an address corresponds to.
Stars: ✭ 23 (+4.55%)
Mutual labels:  regex
aws-elb-logs-to-logstash
Consumes ELB & ALB logs and sends them to logstash for ingestion. Kibana dashboard included.
Stars: ✭ 26 (+18.18%)
Mutual labels:  logstash
flume-elasticsearch-sink
Flume sink plugin for Elasticsearch
Stars: ✭ 39 (+77.27%)
Mutual labels:  flume

Logwatch

简介

  1. 用途

    采集Linux服务器上的应用日志,通过正则或其他方式进行解析,build成Json,发送到Kafka

  2. 同类

    Flume、Logstash、Filebeats、Fluentd等

  3. 技术

    Logwatch采用Lua语言编写,主要依赖有:rapidjsonluardkafkalibrdkafkaluajitlfs

  4. 优势

    资源占用少(1 cpu core , 128m memory),性能优异

    测试结果:NginxAccessLog(平均长度200字节),每秒可以处理八万行,Java应用Log每秒可以处理十万行以上

    通过协程来进行多任务的调度,最多占用1个Cpu Core

安装

  1. 编译安装Luajit(LuaJIT-2.1.0-beta3)

    安装后需要为/usr/local/bin/luajit-2.1.0-beta3创建一个link(/usr/local/bin/luajit),保证luajit命令可用

  2. 编译安装librdkafka(0.9.5)

    安装后需要为创建一个link -s /usr/local/lib/librdkafka.so.1 /usr/lib/librdkafka.so.1

  3. 编译安装rapidjson(0.5.1)

    将编译好的rapidjson.so放在luajit能够找到的lib路径下即可,编译时依赖cmake3

  4. 安装luardkafka

    luardkafka的代码在rdkafka目录下,不需要单独安装,其中produce的接口做了少量改动,处理一些异常情况

  5. 安装lfs(1.6.3)

    主要是丰富lua对文件和目录读取的api

代码结构

  1. agent.lua

    程序启动入口,负责初始化任务和调度执行

  2. watchlog/*.lua

    多种类型文件处理的具体实现,其中watchlogfilesingleline.lua为基类,多行日志解析也是在其基础上完成

  3. rdkafka/kafkaclient.lua

    封装的kafkaclient,包括初始化和容错等

  4. util/*.lua

    简单的函数工具类

  5. conf目录

    存放logwatch的配置

  6. test/*.lua

    测试用的代码

配置说明

  1. conf/kafkaconfig.lua

    配置关于Kafka的参数,必须要填写brokers,还有topics里面的default

    logwatch不支持同时发送到多个Kafka集群,可以支持发送到同一个Kafka集群的不同topic

    默认发送到default,可以在logwatchconfig.lua里针对日志文件配置要发送的topic

  2. conf/tunningconfig.lua

    配置logwatch的一些常量,具体含义参见代码注释

  3. conf/parseconfig.lua

    配置日志解析的正则、字段命名、转化函数等,其中的grok字段,是针对简单日志类型提供的便捷配置方法

  4. conf/logwatchconfig.lua

    需要根据采集的日志文件情况进行编写,可以参考logwatchconfig.lua的例子

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].