├── .gitignore ├── log-analysis ├── select-all.sql ├── create-consolidated-view.sql ├── select-top-10.sql ├── firehose-policy.json ├── create-ecs-table.sql ├── create-eks-table.sql └── firehose-delivery-policy.json ├── NOTICE ├── ecs ├── enable-fluent-log-driver.sh ├── Dockerfile ├── parsers.conf ├── fluent-bit.conf ├── load-gen-ecs.sh ├── nginx-task-definition.json └── ecs-fluent-bit-daemonset.yml ├── .github └── PULL_REQUEST_TEMPLATE.md ├── CODE_OF_CONDUCT.md ├── eks ├── eks-fluent-bit-daemonset-rbac.yaml ├── eks-nginx-app.yaml ├── load-gen-eks.sh ├── eks-fluent-bit-daemonset-policy.json ├── eks-fluent-bit-daemonset.yaml └── eks-fluent-bit-configmap.yaml ├── README.md ├── CONTRIBUTING.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /.DS_Store 2 | -------------------------------------------------------------------------------- /log-analysis/select-all.sql: -------------------------------------------------------------------------------- 1 | SELECT * 2 | FROM fluentbit_consolidated 3 | ORDER BY remote -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Amazon Ecs Fluent Bit Daemon Service 2 | Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | -------------------------------------------------------------------------------- /ecs/enable-fluent-log-driver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "ECS_AVAILABLE_LOGGING_DRIVERS=[\"awslogs\",\"fluentd\"]" >> /etc/ecs/ecs.config -------------------------------------------------------------------------------- /ecs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazon/aws-for-fluent-bit:latest 2 | ADD fluent-bit.conf /fluent-bit/etc/ 3 | ADD parsers.conf /fluent-bit/etc/ 4 | -------------------------------------------------------------------------------- /log-analysis/create-consolidated-view.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE VIEW "fluentbit_consolidated" AS 2 | SELECT * , 'ECS' as source 3 | FROM fluentbit_ecs 4 | UNION 5 | SELECT * , 'EKS' as source 6 | FROM fluentbit_eks -------------------------------------------------------------------------------- /log-analysis/select-top-10.sql: -------------------------------------------------------------------------------- 1 | SELECT source, 2 | remote AS IP, 3 | count(remote) AS num_requests 4 | FROM fluentbit_consolidated 5 | GROUP BY remote, source 6 | ORDER BY num_requests DESC LIMIT 10 7 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *Issue #, if available:* 2 | 3 | *Description of changes:* 4 | 5 | 6 | By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. 7 | -------------------------------------------------------------------------------- /log-analysis/firehose-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": { 4 | "Effect": "Allow", 5 | "Principal": { 6 | "Service": "firehose.amazonaws.com" 7 | }, 8 | "Action": "sts:AssumeRole" 9 | } 10 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /ecs/parsers.conf: -------------------------------------------------------------------------------- 1 | [PARSER] 2 | Name nginx 3 | Format regex 4 | Regex ^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?