DATA COLLECTOR/Fluentd

Fluentd config copy (file to csv,json)

크라우도 2021. 10. 1. 16:08
<system>
       log_level debug
</system>
  
<source>
  @type tail
  path /home/centos/workspace/apacheDummy/*.log
  pos_file /var/log/td-agent/apache2.access_log.pos
  <parse>
    @type apache2
  </parse>
  refresh_interval 5
  tag bos.trade.mob
</source>
  
#<match s3.apache.access>
#  @type stdout
#</match>
 
<match bos.trade.mob>
  @type copy
  <store>
    @type file
    path  /data/text
    timekey 3600
    time_slice_format %Y%m%d
    time_slice_wait 24h
    format csv
    fields host,method
    force_quotes false
    append true
    flush_interval 1
  </store>
  <store>
    @type file
    path  /data/json
    timekey 3600
    time_slice_format %Y%m%d
    time_slice_wait 24h
    format json
    append true
    flush_interval 1
  </store>
 
</match>