aws-solutions / centralized-logging-with-opensearch

Build your own log analytics platform on OpenSearch in 20 minutes
https://aws.amazon.com/solutions/implementations/centralized-logging-with-opensearch/
Apache License 2.0
109 stars 28 forks source link

Monitor, Install and Configure Fluent Bit on Windows Server 2016/2019/2022 Instances #76

Closed JoeShi closed 3 months ago

JoeShi commented 1 year ago

Describe the feature

The Instance Group can only list out the Linux instances, and the solution can only monitor/install/configure Fluent Bit on Linux Instances. We are expecting the solution can support Windows OS as well.

Use Case

Monitor, install and configure log agents on Windows instances automatically.

Proposed Solution

No response

Other Information

No response

Log Hub version used

v1.0.0

owenCCY commented 1 year ago

Before the feature is available, we can self install Fluent Bit on Windows instance, and send logs to the pipeline provisioned using CLO console. Here is the overall steps, and assume you are using the S3 as the buffering layer

  1. Create a application log pipeline in Centralized Logging with OpenSearch Solution console
    Take a note of the buffer destination you chose. (Ex, if you choose S3 as buffer, take a note of the s3 bucket name)

  2. Download Fluent Bit agent from Fluent Bit: Official Manual. Choose the version that suit your platform.

  3. Config the Fluent Bit agent to the correct output destination: The output destination should be the S3 bucket location. Official Guide here

  4. Attach role / policy to your windows instances, example policy is shown as follows: You might need to change the bucket name to be your own S3 bucket.

{
  "Version": "2012-10-17",
  "Statement": [
    #(If you choose S3 as buffer)
    {
        "Action": "s3:PutObject",
        "Resource": "arn:aws:s3:::YOUR_S3_BUFFER_BUCKET_NAME/*",
        "Effect": "Allow"
    },
    #(Optional, if you choose KDS as buffer)
    { 
          "Action": [
              "kinesis:PutRecord",
              "kinesis:PutRecords"
          ],
          "Resource": "arn:aws:kinesis:YOUR_REGION:YOUR_ACCOUNT_ID:stream/KDS_STREAM_NAME",
          "Effect": "Allow"
    },
    #(Optional, if you choose no buffer)
    {
        "Action": [
            "es:ESHttpGet",
            "es:ESHttpDelete",
            "es:ESHttpPut",
            "es:ESHttpPost",
            "es:ESHttpHead",
            "es:ESHttpPatch"
        ],
        "Resource": "arn:aws:es:YOUR_REGION:YOUR_ACCOUNT_ID:domain/DOMAIN_NAME",
        "Effect": "Allow"
     }
  ]
}
James96315 commented 4 months ago

fixed in v2.2.0 https://github.com/aws-solutions/centralized-logging-with-opensearch/releases/tag/v2.2.0