fluent-bit-go-cloudwatch-logs

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

README

fluent-bit cloudwatch-logs output plugin

Build Status Build status

Windows binaries are available in release pages.

This plugin works with fluent-bit's go plugin interface. You can use fluent-bit-go-cloudwatch-logs to ship logs into AWS CloudWatch.

The configuration typically looks like:

fluent-bit --> AWS CloudWatch

Usage

$ fluent-bit -e /path/to/built/out_cloudwatch_logs.so -c fluent-bit.conf

Prerequisites

  • Go 1.11+
  • gcc (for cgo)

Building

$ make
Configuration Options
Key Description Default value Note
Credential URI of AWS shared credential "" (See Credentials)
AccessKeyID Access key ID of AWS "" (See Credentials)
SecretAccessKey Secret access key ID of AWS "" (See Credentials)
LogGroupName logGroup name of CloudWatch - Mandatory parameter
LogStreamName logStream name of CloudWatch - Mandatory parameter
Region Region of CloudWatch - Mandatory parameter
AutoCreateStream Use auto create stream feature? true Optional parameter

Example:

add this section to fluent-bit.conf

[Output]
    Name cloudwatch_logs
    Match *
    # Credential    /path/to/sharedcredentialfile
    AccessKeyID     yourawsaccesskeyid
    SecretAccessKey yourawssecretaccesskey
    LogGroupName    yourloggroupname
    LogStreamName   yourslogstreamname
    Region us-east-1
    # AutoCreateStream false # default: true

fluent-bit-go-cloudwatch-logs supports the following credentials. Users must specify one of them:

Credentials

Specifying credentials is required.

This plugin supports the following credentials:

Shared Credentials

Create the following file which includes credentials:

[default]
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY

And specify the following parameter in fluent-bit configuration:

Credential    /path/to/sharedcredentialfile
Static Credentials

Specify the following parameters in fluent-bit configuration:

AccessKeyID     yourawsaccesskeyid
SecretAccessKey yourawssecretaccesskey
Environment Credentials

Specify AWS_ACCESS_KEY and AWS_SECRET_KEY as environment variables.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL