fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.73k stars 1.56k forks source link

Does cloudwatch plugin support LogGroup tag? #8915

Open changhyuni opened 3 months ago

changhyuni commented 3 months ago

Is your feature request related to a problem? Please describe. Dose cloudwatch plugin support LogGroup tag?

Describe the solution you'd like I want to manage tags for cloud watch LogGroups in fluentbit

Additional context It seemed to be supported in the old before version(go) https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit/blob/mainline/cloudwatch/cloudwatch.go#L140

patrick-stephens commented 3 months ago

Did you check the docs? https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch seems to have some config options for log_group stuff - is that what you want or something else?

changhyuni commented 3 months ago

@patrick-stephens thanks you for comment. I checked that I want this https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagLogGroup.html I guess fluentbit don't support cloudwatch TagLogGroup API

InvisibleMan1306 commented 3 months ago

@changhyuni what's the blocker on fluentbit supporting the TagLogGroup API?

changhyuni commented 3 months ago

@InvisibleMan1306 I want to tag the cloudwatch log group when Cloudwatch logGroup creation is set to AutoCreate.

InvisibleMan1306 commented 3 months ago

It should be possible to extend the CreateLogGroup call to include tags right, https://github.com/fluent/fluent-bit/blob/master/plugins/out_cloudwatch_logs/cloudwatch_api.c#L1297-L1329, https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogGroup.html. That code would probably need to be changed a little to use JSON encoder instead of constructing a raw string since the logic would be a bit complicated.

changhyuni commented 2 months ago

@InvisibleMan1306 thanks you i will be trying that.