{"id":20136126,"url":"https://github.com/zkfmapf123/docker-fluentd-elk","last_synced_at":"2025-10-08T18:07:23.408Z","repository":{"id":187482567,"uuid":"676988797","full_name":"zkfmapf123/docker-fluentd-elk","owner":"zkfmapf123","description":"docker advance functions","archived":false,"fork":false,"pushed_at":"2023-08-12T07:16:52.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T09:38:39.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkfmapf123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-10T13:30:01.000Z","updated_at":"2023-08-12T07:17:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"6504e5af-4469-4212-9e67-23941fffa781","html_url":"https://github.com/zkfmapf123/docker-fluentd-elk","commit_stats":null,"previous_names":["zkfmapf123/docker-advanced"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fdocker-fluentd-elk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fdocker-fluentd-elk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fdocker-fluentd-elk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fdocker-fluentd-elk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkfmapf123","download_url":"https://codeload.github.com/zkfmapf123/docker-fluentd-elk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582521,"owners_count":19985846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T21:17:48.708Z","updated_at":"2025-10-08T18:07:18.388Z","avatar_url":"https://github.com/zkfmapf123.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-Advanced Function\n\n## 1. Logs\n\n```\n    docker logs tail -1 \u003ccontainer-name\u003e\n\n    docker run --name \u003ccontainer-name\u003e --log-opt max-size=5k --log-opt max-file=3 \u003cdocker-iamges\u003e\n\n    docker run --name todo-server --log-opt max-size=5k --log-opt max-file=3 --network ff660b6a7a40 -p 3000:3000 -e PORT=3000  server_node-todo\n\n    ## --log-opt max-size=5k 단일 로그 파일의 최대크기를 5kb\n    ## --log-opt max-file=3 파일을 3개로 유지\n\n    docker-compose up --build\n```\n\n## 2. Log Forwarding use Fluentd\n\n![fluentd](./public/fluentd.png)\n\n```\n    docker-compose -f docker-compose.archiving.yaml up --build\n\n    // apiserver는 다시 Restart 해야 함\n    // locahost:5601 -\u003e Analytics -\u003e Discorver\n```\n\n## Conclusion\n\n### ELK (logstash vs Fluentd)\n\n- 보통의 경우라면 ELK의 로그수집기는 Logstash 다.\n- 하지만 Container 환경이라면 must는 아니다\n\n\u003e Logstash의 특징\n\n- 호스트에 JRuby (자바 런타임) 가 필요함\n- 메모리상의 큐에 고정된 크기의 20개의 이벤트를 가지고있음 지속성을 위하여 Redis나 Kafka 같은 외부 큐에 의존\n-\n\n\u003e Fluentd 특징\n\n- 이벤트에 태그를 지정하고 각 이벤트 유형으로 더 쉽게 라우팅이 가능하다.\n\n```\n    output { if [loglevel] == \"ERROR\" and [development] == \"production\" { { ... } }\n```\n\n- flugin이 logstash 보다 너 많음\n- 내부 버퍼링시스템이 존재\n- \\*\\*\\* Docker 자체에 fluentd용 로깅 드라이버가 존재 (stdout)\n\n## Reference\n\n- \u003ca href=\"https://docs.fluentd.org/container-deployment/docker-compose\"\u003e Fluentd Document \u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fdocker-fluentd-elk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkfmapf123%2Fdocker-fluentd-elk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fdocker-fluentd-elk/lists"}