All Projects → Laisky → Go Fluentd

Laisky / Go Fluentd

Licence: mit
rewrite fluentd in golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Go Fluentd

Elk Kubernetes
This repo shows how to configure complete EFK stack on top of Kubernetes
Stars: ✭ 294 (+230.34%)
Mutual labels:  fluentd
Fluentd
Log shipping mechanism for Deis Workflow
Stars: ✭ 10 (-88.76%)
Mutual labels:  fluentd
Fluent Plugin Zabbix
fluentd out plugin to zabbix
Stars: ✭ 46 (-48.31%)
Mutual labels:  fluentd
Fluent Logger Python
A structured logger for Fluentd (Python)
Stars: ✭ 364 (+308.99%)
Mutual labels:  fluentd
Loghouse
Ready to use log management solution for Kubernetes storing data in ClickHouse and providing web UI.
Stars: ✭ 805 (+804.49%)
Mutual labels:  fluentd
Influent
A Fluentd server running on the JVM
Stars: ✭ 27 (-69.66%)
Mutual labels:  fluentd
Fluent Plugin S3
Amazon S3 input and output plugin for Fluentd
Stars: ✭ 276 (+210.11%)
Mutual labels:  fluentd
Fluent Plugin Concat
Fluentd Filter plugin to concatenate multiline log separated in multiple events.
Stars: ✭ 78 (-12.36%)
Mutual labels:  fluentd
Fluentd Sidecar Injector
Webhook server for kubernetes admission webhook to inject fluentd as sidecar
Stars: ✭ 22 (-75.28%)
Mutual labels:  fluentd
Fluent Logger Perl
A structured logger for Fluentd (Perl)
Stars: ✭ 41 (-53.93%)
Mutual labels:  fluentd
Fluentd Docker Image
Docker image for Fluentd
Stars: ✭ 383 (+330.34%)
Mutual labels:  fluentd
Presentations
📊Presentations from the CNCF community to share and reuse
Stars: ✭ 566 (+535.96%)
Mutual labels:  fluentd
Vector Test Harness
End-to-end test harness for the Vector observability data router
Stars: ✭ 32 (-64.04%)
Mutual labels:  fluentd
Fluent Logger Golang
A structured logger for Fluentd (Golang)
Stars: ✭ 294 (+230.34%)
Mutual labels:  fluentd
Fluent Plugin Splunk Hec
This is the Fluentd output plugin for sending events to Splunk via HEC.
Stars: ✭ 56 (-37.08%)
Mutual labels:  fluentd
Ansible Elk
📊 Ansible playbook for setting up an ELK/EFK stack and clients.
Stars: ✭ 284 (+219.1%)
Mutual labels:  fluentd
Led
LED ( Logs Explorer for Docker ) is a tool used for visualizing and exploring docker container logs
Stars: ✭ 13 (-85.39%)
Mutual labels:  fluentd
Fluent Plugin Sql
SQL input/output plugin for Fluentd
Stars: ✭ 82 (-7.87%)
Mutual labels:  fluentd
Log Pilot
Collect logs for docker containers
Stars: ✭ 1,112 (+1149.44%)
Mutual labels:  fluentd
Fluent Bit Go Loki
[Deprecated] The predessor of fluent-bit output plugin for Loki. https://github.com/grafana/loki
Stars: ✭ 38 (-57.3%)
Mutual labels:  fluentd

Go-Fluentd

Rewrite fluentd-server by Golang, Higher performance with less resource requirement.

  • At-Least-Once guarantee(disk WAL)
  • log concatenation by head regexp expression
  • log parsing by regexp expression(support embedded json)
  • log filter by custom plugins(acceptorFilters & tagFilters)
  • multiple receivers(support multiple protocols: msgpack, http, syslog, kafka, ...)
  • multiple senders(support multiple backend: elasticsearch, fluentd, ...)
  • multiple environments deployment(--env: sit, perf, uat, prod)

GitHub release License: MIT Build Status codecov Commitizen friendly Go Report Card GoDoc

Already running on our PRODUCION since 2018/9.

When processing 1000mbps logs flood:

  • dstat dstat
  • monitor monitor
  • profile profile

Documents:

Description

LogAggregator + Concator + Parser + Producer.

Origin logs emitted from docker look like:

'{"container_id": "xxxxx", "log": "2018-03-06 16:56:22.514 | mscparea | ERROR  | http-nio-8080-exec-1 | com.laisky.cloud.cp.core.service.impl.CPBusiness.reflectAdapterRequest | 84:'
'{"container_id": "xxxxx", "log": "Exception in thread "main" java.lang.IllegalStateException: A book has a null property"}'
'{"container_id": "xxxxx", "log": "\tat com.example.myproject.Author.getBookIds(Author.java:38)"}'
'{"container_id": "xxxxx", "log": "\tat com.example.myproject.Bootstrap.main(Bootstrap.java:14)"}'
'{"container_id": "xxxxx", "log": "Caused by: java.lang.NullPointerException"}'
'{"container_id": "xxxxx", "log": "\tat com.example.myproject.Book.getId(Book.java:22)"}'
'{"container_id": "xxxxx", "log": "\tat com.example.myproject.Author.getBookIds(Author.java:35)"}'
'{"container_id": "xxxxx", "log": "\t... 1 more"}'

After Concator(TagPipeline > concator_f):

&FluentMsg{
    Id: 12345,
    Tag: "spring.sit",
    Message: map[string]interface{}{
        "container_id": "xxxxx",
        "log": "2018-03-06 16:56:22.514 | mscparea | ERROR  | http-nio-8080-exec-1 | com.laisky.cloud.cp.core.service.impl.CPBusiness.reflectAdapterRequest | 84: Exception in thread "main" java.lang.IllegalStateException: A book has a null property\n\tat com.example.myproject.Author.getBookIds(Author.java:38)\n\tat com.example.myproject.Bootstrap.main(Bootstrap.java:14)\nCaused by: java.lang.NullPointerException\n\tat com.example.myproject.Book.getId(Book.java:22)\n\tat com.example.myproject.Author.getBookIds(Author.java:35)\n\t... 1 more",
    },
}

After Parser(TagPipeline > parser_f):

&FluentMsg{
    Id: 12345,
    Tag: "spring.sit",
    Message: map[string]interface{}{
        "container_id": "xxxxx",
        "time": "2018-03-06 16:56:22.514",
        "level": "ERROR",
        "app": "mscparea",
        "thread": "http-nio-8080-exec-1",
        "class": "com.laisky.cloud.cp.core.service.impl.CPBusiness.reflectAdapterRequest",
        "line": 84,
        "message": "Exception in thread "main" java.lang.IllegalStateException: A book has a null property\n\tat com.example.myproject.Author.getBookIds(Author.java:38)\n\tat com.example.myproject.Bootstrap.main(Bootstrap.java:14)\nCaused by: java.lang.NullPointerException\n\tat com.example.myproject.Book.getId(Book.java:22)\n\tat com.example.myproject.Author.getBookIds(Author.java:35)\n\t... 1 more",
    },
}

Then Producer can send logs to anywhere (depends on Senders).

Run

directly run:

go run -race entrypoints/main.go \
  --config=./docs/settings/tiny_settings.yml \
  --env=sit \
  --log-level=debug

run by docker:

docker run -itd --rm --name=go-fluentd -p 24225:24225 -p 8080:8080 \
    -v /etc/configs/go-fluentd:/etc/go-fluentd \
    -v /data/log/fluentd/go-fluentd:/data/log/fluentd/go-fluentd
    ppcelery/go-fluentd:1.13.1 \
    ./go-fluentd \
        --config=/etc/go-fluentd/settings.yml \
        --env=perf \
        --addr=0.0.0.0:8080
        --host=x.x.x.x
        --enable-auto-gc

docker images version

  • stable
  • release
  • dev
  • <feature taskid>

Roles

  • Acceptor (consists of Recvs)
  • AcceptorPipeline (consists of AcceptorFilters)
  • Journal
  • Dispatcher
  • TagPipeline (consists of TagFilters)
    • Concator
    • Parser for each tag
  • PostPipeline (consists of PostFilters)
  • Producer (consists of Senders)

architecture

Acceptor

Contains multiply Recvs (such as KafkRecv & FluentdRecv), can listening tcp port or fetch msg from kafka brokers.

AcceptorPipeline

Contains multiply AcceptorFilters, be used for ignore or retag specific messages. All filters should return very fast to avoid blocking.

Journal

...

Dispatcher

...

TagPipeline

...

PostPipeline

...

Producer

...

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].