Skip to content

CloudWebManage/cwm-worker-logger

Repository files navigation

cwm-worker-logger

ci GitHub release (latest by date) License: MIT

Lines of code GitHub code size in bytes GitHub repo size

Overview

This logging component uses fluentd as the log collector and forwarder. For the HTTP input from MinIO and their metrics collection, a custom input plugin (fluent-plugin-cwm-http) is used. Any output plugins can be configured as the log targets such as S3, ElasticSearch, etc.

For more details, please visit:

Configuration

As the fluentd is the underlying logging engine, its configuration is used.

For details, see fluentd configuration.

The sample configuration files are located under the config folder.

config file log target
cwm-fluent-default.conf none
cwm-fluent-stdout.conf stdout
cwm-fluent-elasticsearch.conf ElasticSearch
cwm-fluent-s3.conf AWS S3

Run

Build and run the docker-compose stack:

docker-compose up -d --build

Test

Send logs to the logger:

./tests/send_logs.sh localhost:8500/logs

Contribute

  • Fork the project.
  • Check out the latest main branch.
  • Create a feature or bugfix branch from main.
  • Commit and push your changes.
  • Make sure to add tests.
  • Run Rubocop locally and fix all the lint warnings.
  • Submit the PR.

License

MIT