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

refact: make custom config also defined within env blocks. #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Colstuwjx
Copy link

Hi team,

This PR is an alternative for #244 , we have been tried to use the #244 PR proposed configuration way, however, it didn't work well in my cluster. We don't want to maintain another configmap to map to the custom_configs env, and it also hard to set such multiple-line content with a single env kv pair.

As a result, We try to propose another solution for solving such customization for filebeat ( even the other log-collector ), just take the same way that Tags do and it seems also match our log-pilot design.

Feel free to merge this PR or close it.
Thanks.

@codecov-io
Copy link

codecov-io commented Dec 12, 2019

Codecov Report

Merging #264 into master will increase coverage by 0.65%.
The diff coverage is 56.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #264      +/-   ##
==========================================
+ Coverage   21.46%   22.11%   +0.65%     
==========================================
  Files           7        7              
  Lines         778      755      -23     
==========================================
  Hits          167      167              
+ Misses        581      559      -22     
+ Partials       30       29       -1
Impacted Files Coverage Δ
pilot/piloter.go 50% <ø> (+30%) ⬆️
pilot/filebeat_piloter.go 6.57% <ø> (ø) ⬆️
pilot/pilot.go 26.87% <56.25%> (+0.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af6da63...1e1938d. Read the comment docs.

@Colstuwjx
Copy link
Author

@chenquanzhao , I'm sorry, I have tried the #244 way, and this PR is my answer to customize the log-collect config for each container.

Just as the PR description said, feel free to merge or close this PR.
Thanks.

@Colstuwjx Colstuwjx changed the title refact: make custom config also defined within env blocks. WIP: refact: make custom config also defined within env blocks. Dec 13, 2019
@Colstuwjx Colstuwjx changed the title WIP: refact: make custom config also defined within env blocks. refact: make custom config also defined within env blocks. Dec 13, 2019
@ymping
Copy link

ymping commented Dec 15, 2019

@jzwlqx Hope this PR cat be accept. I tested it on my cluster, it's working fine.
Use example :

environment:
   aliyun_logs_access: /usr/local/tomcat/logs/localhost_access_log.*.txt
   aliyun_logs_access_configs: multiline.pattern='^[0-9]{3}.*',multiline.negate=true,multiline.match=after

And I also used #244 way to config my yaml file, seems not working.

@Colstuwjx
Copy link
Author

Colstuwjx commented Feb 11, 2020

@ymping , I have been created two commits in my forked log-pilot, included this PR and #275 , you can use this forked version until this PR is accepted by upstream, although it needs build image by manually, the forked version see this repo.

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

Successfully merging this pull request may close these issues.

None yet

3 participants