fluent-plugins-nursery / fluent-plugin-cloudwatch-logs

CloudWatch Logs Plugin for Fluentd
MIT License
201 stars 141 forks source link

Using regex in log_stream_name #185

Closed SimplySeth closed 4 years ago

SimplySeth commented 4 years ago

Problem

Can't find the correct syntax for using regex for log_stream_name

Steps to replicate

<source>
      @type cloudwatch_logs
      @log_level trace
      tag cloudwatch.in
      http_proxy "#{ENV['PROXY']}"
      log_group_name "#{'/aws/eks/' + ENV['CLUSTER_NAME'] + '/cluster'}"
      log_stream_name "*"
      use_log_stream_name_prefix true
      region "#{ENV['REGION']}"
      state_file /var/log/cloudwatch.in.state
    </source>
2020-04-23 23:51:56 +0000 [error]: #0 unexpected error error_class=Aws::CloudWatchLogs::Errors::InvalidParameterException error="1 validation error detected: Value '*' at 'logStreamNamePrefix' failed to satisfy constraint: Member must satisfy regular expression pattern: [^:*]*"

Expected Behavior or What you need to ask

Wildcarding of logstreams

Using Fluentd and CloudWatchLogs plugin versions

EKS - KUBERNETES 1.15 Fluentd V 1.2.0

cosmo0920 commented 4 years ago

We can't handle this. Because this is CloudWatchLogs API limitation.