docker

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

fluent.conf (1349B)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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 contact@medatc.com
      password Maileich1quae.go
      #enable_starttls_auto true
      enable_tls false
      from contact@medatc.com
      to xuxiaodong@medatc.com
      subject 'SERVER ERROR'
      message %s
      message_out_keys log
    </store>
  </match>
</label>