Amazon CloudWatch

CloudWatch output plugin for Fluentd

Overview

This plugin outputs logs or metrics to Amazon CloudWatch. For details, see https://github.com/fluent-plugins-nursery/fluent-plugin-cloudwatch-logs.

Example output configurations

spec:
cloudwatch:
  aws_key_id:
    valueFrom:
      secretKeyRef:
        name: logging-s3
        key: awsAccessKeyId
  aws_sec_key:
    valueFrom:
      secretKeyRef:
        name: logging-s3
        key: awsSecretAccessKey
  log_group_name: operator-log-group
  log_stream_name: operator-log-stream
  region: us-east-1
  auto_create_stream true
  buffer:
    timekey: 30s
    timekey_wait: 30s
    timekey_use_utc: true

Configuration

Output Config

auto_create_stream (bool, optional)

Create log group and stream automatically.

Default: false

aws_key_id (*secret.Secret, optional)

AWS access key id Secret

aws_instance_profile_credentials_retries (int, optional)

Instance Profile Credentials call retries

Default: nil

aws_sec_key (*secret.Secret, optional)

AWS secret key. Secret

aws_sts_role_arn (string, optional)

The role ARN to assume when using cross-account sts authentication

aws_sts_session_name (string, optional)

The session name to use with sts authentication

Default: ‘fluentd’

aws_use_sts (bool, optional)

Enable AssumeRoleCredentials to authenticate, rather than the default credential hierarchy. See ‘Cross-Account Operation’ below for more detail.

buffer (*Buffer, optional)

Buffer

concurrency (int, optional)

Use to set the number of threads pushing data to CloudWatch.

Default: 1

endpoint (string, optional)

Use this parameter to connect to the local API endpoint (for testing)

format (*Format, optional)

Format

http_proxy (string, optional)

Use to set an optional HTTP proxy

include_time_key (bool, optional)

Include time key as part of the log entry

Default: UTC

json_handler (string, optional)

Name of the library to be used to handle JSON data. For now, supported libraries are json (default) and yaml

localtime (bool, optional)

Use localtime timezone for include_time_key output (overrides UTC default)

log_group_aws_tags (string, optional)

Set a hash with keys and values to tag the log group resource

log_group_aws_tags_key (string, optional)

Specified field of records as AWS tags for the log group

log_group_name (string, optional)

Name of log group to store logs

log_group_name_key (string, optional)

Specified field of records as log group name

log_rejected_request (string, optional)

Output rejected_log_events_info request log.

Default: false

log_stream_name (string, optional)

Name of log stream to store logs

log_stream_name_key (string, optional)

Specified field of records as log stream name

max_events_per_batch (int, optional)

Maximum number of events to send at once

Default: 10000

max_message_length (int, optional)

Maximum length of the message

message_keys (string, optional)

Keys to send messages as events

put_log_events_disable_retry_limit (bool, optional)

If true, put_log_events_retry_limit will be ignored

put_log_events_retry_limit (int, optional)

Maximum count of retry (if exceeding this, the events will be discarded)

put_log_events_retry_wait (string, optional)

Time before retrying PutLogEvents (retry interval increases exponentially like put_log_events_retry_wait * (2 ^ retry_count))

region (string, required)

AWS Region

remove_log_group_aws_tags_key (string, optional)

Remove field specified by log_group_aws_tags_key

remove_log_group_name_key (string, optional)

Remove field specified by log_group_name_key

remove_log_stream_name_key (string, optional)

Remove field specified by log_stream_name_key

remove_retention_in_days (string, optional)

Remove field specified by retention_in_days

retention_in_days (string, optional)

Use to set the expiry time for log group when created with auto_create_stream. (default to no expiry)

retention_in_days_key (string, optional)

Use specified field of records as retention period

slow_flush_log_threshold (string, optional)

The threshold for chunk flush performance check. Parameter type is float, not time, default: 20.0 (seconds) If chunk flush takes longer time than this threshold, fluentd logs warning message and increases metric fluentd_output_status_slow_flush_count.

use_tag_as_group (bool, optional)

Use tag as a group name

use_tag_as_stream (bool, optional)

Use tag as a stream name