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

Set Log Rotation Dinamically #809

Open
phgeraldeli opened this issue Apr 23, 2024 · 0 comments
Open

Set Log Rotation Dinamically #809

phgeraldeli opened this issue Apr 23, 2024 · 0 comments

Comments

@phgeraldeli
Copy link

Describe the question/issue

I need to set the log rotation dinamically by using a kubernetes label. It's supported? If It is, how can i do it?

I'm using below syntax to set log group name dinamically, but when I do it with logRotation key, It does not work.

[OUTPUT]
      log_group_name $(kubernetes['labels']['my_label'])
      ...

I've tried to do the same passing log_retention_days as $(kubernetes['labels']['log_retention_days']) but It did'nt work, I wish i could do a default value as well. Something like, if it has this label use It, instead use default.

Fluent Bit Log Output

Couldn't get the log

Fluent Bit Version Info

2.31.12

Cluster Details

EKS + cloudwatch

Application Details

Steps to reproduce issue

Deploy daemonset in EKS using aws-for-fluent-bit chart
Deploy a app with the specific labels
Set log_group_name dinamically
Do the same with logRotation
Let it creates a new LogGroup
Verify that is Never Expire

Related Issues

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

No branches or pull requests

1 participant