Closed nwb-rony closed 4 years ago
I am collecting logs from multiple groups and streams, I want the metadata to be collected as well
<source> tag cwlogs @type cloudwatch_logs region us-east-1 aws_use_sts true aws_sts_role_arn MY_ARN log_group_name MY_GROUP_NAME state_file /home/fluent/GROUP.in.state use_log_stream_name_prefix true format none <parse> @type none </parse> fetch_interval 10 </source> <match cwlogs> @type copy <store> @type file path /var/log/fluent/access append true </store> </match>
And I am receiving logs in the following format (in access dir):
2020-05-12T15:37:55+00:00 cwlogs {"message":"MY MSG"} 2020-05-12T15:37:55+00:00 cwlogs {"message":"MY MSG"}
I want to have something like this:
2020-05-12T15:37:55+00:00 cwlogs {"message":"MY MSG", "log_group_name": "MY GROUP", log_stream_name: "MY STREAM", etc....}
Thanks a lot!
I'd registered PR to support this: https://github.com/fluent-plugins-nursery/fluent-plugin-cloudwatch-logs/pull/193
Problem
I am collecting logs from multiple groups and streams, I want the metadata to be collected as well
Steps to replicate
And I am receiving logs in the following format (in access dir):
Expected Behavior or What you need to ask
I want to have something like this:
Using Fluentd and CloudWatchLogs plugin versions
Thanks a lot!