docker

Docker for services
git clone git://git.unixkoans.com/docker.git
Log | Files | Refs

commit 9e50af396d94d01ba6701b1a57d864681448cffa
parent 1b8368c3585cb64dacbbc907b06d0bdaa57f06fe
Author: Xiaodong Xu <[email protected]>
Date:   Tue May 29 18:01:37 +0800

Change Fluent

Diffstat:
fluentd/conf.d/fluent.conf | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
fluentd/docker-compose.yml | 5++++-
fluentd/fluent.conf | 56--------------------------------------------------------
3 files changed, 70 insertions(+), 57 deletions(-)
diff --git a/fluentd/conf.d/fluent.conf b/fluentd/conf.d/fluent.conf @@ -0,0 +1,66 @@ +<source> + @type forward + @id input1 + @label @mainstream + port 24224 +</source> + +<filter **> + @type stdout +</filter> + +<label @mainstream> + <match docker.**> + @type file + @id output_docker1 + path /fluentd/log/docker.*.log + symlink_path /fluentd/log/docker.log + append true + time_slice_format %Y%m%d + time_slice_wait 1m + time_format %Y%m%dT%H%M%S%z + </match> + <match **> + @type file + @id output1 + path /fluentd/log/data.*.log + symlink_path /fluentd/log/data.log + append true + time_slice_format %Y%m%d + time_slice_wait 10m + time_format %Y%m%dT%H%M%S%z + </match> + <match **> + @type grepcounter + @log_level debug + @id output2 + count_interval 1 + input_key log + regexp ERROR + threshold 1 + add_tag_prefix error + </match> + <match error.**> + @type copy + <store> + @type stdout + </store> + <store> + @type mail + @log_level debug + @id output3 + host smtp.exmail.qq.com + port 465 + domain medatc.com + user [email protected] + password Maileich1quae.go + #enable_starttls_auto true + enable_tls false + from [email protected] + to [email protected] + subject 'SERVER ERROR' + message %s + message_out_keys log + </store> + </match> +</label> diff --git a/fluentd/docker-compose.yml b/fluentd/docker-compose.yml @@ -7,5 +7,8 @@ services: ports: - 24224:24224 volumes: - - ./fluent.conf:/fluentd/etc/fluent.conf + - ./conf.d:/fluentd/etc - ./log:/fluentd/log + environment: + - FLUENTD_CONF=fluent.conf + - FLUENTD_OPT=-vv diff --git a/fluentd/fluent.conf b/fluentd/fluent.conf @@ -1,56 +0,0 @@ -<source> - @type forward - @id input1 - @label @mainstream - port 24224 -</source> - -<filter **> - @type stdout -</filter> - -<label @mainstream> - <match docker.**> - @type file - @id output_docker1 - path /fluentd/log/docker.*.log - symlink_path /fluentd/log/docker.log - append true - time_slice_format %Y%m%d - time_slice_wait 1m - time_format %Y%m%dT%H%M%S%z - </match> - <match **> - @type file - @id output1 - path /fluentd/log/data.*.log - symlink_path /fluentd/log/data.log - append true - time_slice_format %Y%m%d - time_slice_wait 10m - time_format %Y%m%dT%H%M%S%z - </match> - <match **> - @type grepcounter - count_interval 60 - input_key log - regexp ERROR - threshold 1 - add_tag_prefix error - </match> - <match error.**> - @type mail - host smtp.exmail.qq.com - port 465 - domain medatc.com - user [email protected] - password Maileich1quae.go - enable_starttls_auto true - enable_tls false - from [email protected] - to [email protected] - subject 'SERVER ERROR' - message %s - message_out_keys log - </match> -</label>