Sign inSign up

xiaojun207/maize

By xiaojun207

Updated almost 4 years ago

超轻量的日志收集管理工具,用它替换你的efk、elk(Super lightweight log collection management tool)。docker直接输出日志到maize

Image
1

1.6K

xiaojun207/maize repository overview

maize

超级轻量的日志收集管理工具(Super lightweight log collection management tool)
用它替换你的efk、elk。docker直接输出日志到maize(Replace your efk or elk with it. Docker directly outputs logs to maize)

快速启动(Quick start)

docker run -d --name maize -p 4300:4300 -p 4301:4301 -v /data/maize:/app/data xiaojun207/maize:0.1.7
  • 端口: 4300,用以替换fluentd的TCP接收端口(24224)(Port: 4300, used to replace the TCP receiving port (24224) of fluentd)
  • 端口: 4301为WebUI访问和http方式接收数据(/es/_bulk)(4301 is http for WebUI, and receiving log by http api of'/es/_bulk' )

配置docker日志到maize(eg.: Configure Docker Log to maize)

docker run --rm --name openresty -p 80:80 \
  --log-driver=fluentd \
  --log-opt fluentd-async=true \
  --log-opt mode=non-blocking \
  --log-opt fluentd-address="192.168.1.200:4300"  \
  --log-opt tag="{{.Name}}" \
xiaojun207/openresty:latest

maize使用的是docker fluentd接口,配置方式同fluentd一样(The dock fluent interface is used by maize, and the configuration method is the same as that of fluent)

vector数据到maize


[sinks.my_sink_id]
type = "http"
inputs = [ "test" ]
uri = "http://192.168.3.200:4301/vector/_bulk"
compression = "none"

    [sinks.my_sink_id.encoding]
    codec = "json"

maize支持es的/es/_bulk接口,你可以使用fluentd做中转,然后再发送到maize,配置如下

<match **>
  @type copy
  <store>
    @type elasticsearch
    default_elasticsearch_version 8
    host 192.168.1.200
    port 4301
    path /es
    user admin
    password "123456"
    logstash_format true
    logstash_prefix ${tag}
    logstash_dateformat %Y%m%d
    include_tag_key true
    type_name access_log
    tag_key @log_name
  </store>
  <store>
    @type stdout
  </store>
</match>

其他功能说明

maize包含基本的用户鉴权,方便你管理

Tag summary

Content type

Image

Digest

sha256:e3512c10d

Size

12.1 MB

Last updated

almost 4 years ago

docker pull xiaojun207/maize