Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format single_value not processed #222

Open
MattiDeGrauwe opened this issue Feb 3, 2021 · 2 comments
Open

format single_value not processed #222

MattiDeGrauwe opened this issue Feb 3, 2021 · 2 comments

Comments

@MattiDeGrauwe
Copy link

MattiDeGrauwe commented Feb 3, 2021

Problem

When pushing my JSON parsed log to Cloudwatch using the single_value formatter, the log file still arrives at Cloudwatch in JSON format.

Expected Behavior or What you need to ask

<source>
  @type tail
  ...
  <parse>
    @type json
    time_format %Y-%m-%dT%H:%M:%S.%NZ
  </parse>**
</source>

<match x>
  @type cloudwatch_logs
  ...
  <format>
    @type single_value
    message_key log
    add_newline false
  </format>        
</match>

Log arrives at Cloudwatch with this format:

{
    "log": "| 2021-02-03 12:47:19,501 | xxx |",
    "stream": "stdout"
}

Expected format:

 "| 2021-02-03 12:47:19,501 | xxx |"

Using Fluentd and CloudWatchLogs plugin versions

  • Bare Metal or within Docker or Kubernetes or others? Kubernetes
  • Image used: v1.7.3-debian-cloudwatch-1.0
@cosmo0920
Copy link
Member

fluentd-kubernetes-daemonset still uses fluent-plugin-cloudwatch-logs v0.11.2 on the latest debina-cloudwatch image.
I'll send a PR to update cloudwatch-logs plugin on the cloudwatch-logs image.

@suryapssv
Copy link

@MattiDeGrauwe Is this issue is fixed? i'm also facing the same issue. Logs are not formatted as single_value in cloudwatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants