You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
3.9 KiB

3 years ago
# config
<match debug.*>
@type stdout
</match>
# input log
3 years ago
<source>
3 years ago
@type tail
path /var/log/*.log
path_key tailed_path
3 years ago
pos_file /tmp/fluentd--1605454018.pos
pos_file_compaction_interval 30s
refresh_interval 30s
skip_refresh_on_startup
3 years ago
tag stats.node
3 years ago
enable_stat_watcher false
enable_watch_timer false
read_from_head true
follow_inodes true # Without this parameter, file rotation causes log duplication
3 years ago
<parse>
3 years ago
@type none
3 years ago
3 years ago
keep_time_key true
</parse>
3 years ago
</source>
3 years ago
# input stats
<source>
@type tail
path /var/log-in/*/*
path_key tailed_path
3 years ago
pos_file /tmp/fluentd--1605454014.pos
pos_file_compaction_interval 10s
refresh_interval 30s
skip_refresh_on_startup
3 years ago
tag log.node
3 years ago
enable_stat_watcher false
enable_watch_timer false
read_from_head true
follow_inodes true # Without this parameter, file rotation causes log duplication
3 years ago
<parse>
@type none
3 years ago
keep_time_key true
</parse>
3 years ago
</source>
3 years ago
3 years ago
# output mongo log*
<match log.*>
3 years ago
@type copy
3 years ago
copy_mode deep
<store ignore_error>
3 years ago
@type mongo
3 years ago
connection_string mongodb://mongo.poc-datacollector_datacollector-net:27017/fluentdb
#database fluentdb
3 years ago
collection test
3 years ago
#host mongo.poc-datacollector_datacollector-net
#port 27017
3 years ago
num_retries 60
capped
capped_size 100m
3 years ago
<inject>
# key name of timestamp
time_key time
</inject>
3 years ago
<buffer>
3 years ago
retry_wait 50s
flush_mode immediate
#flush_interval 10s
3 years ago
</buffer>
</store>
3 years ago
3 years ago
<store ignore_error>
3 years ago
@type stdout
</store>
3 years ago
3 years ago
<store ignore_error>
3 years ago
@type file
path /tmp/mylog
<buffer>
timekey 1d
timekey_use_utc true
timekey_wait 10s
</buffer>
</store>
3 years ago
3 years ago
</match>
3 years ago
3 years ago
# output mongo log*
3 years ago
<match stats.*>
@type copy
3 years ago
<store>
@type mongo
#copy_mode shallow
database fluentdb
collection stats
host mongo.poc-datacollector_datacollector-net
port 27017
num_retries 60
capped
capped_size 100m
<buffer>
flush_interval 30s
</buffer>
</store>
3 years ago
3 years ago
<store>
@type stdout
3 years ago
</store>
3 years ago
3 years ago
<store>
3 years ago
@type file
path /tmp/mylog
<buffer>
timekey 1d
timekey_use_utc true
timekey_wait 10s
</buffer>
3 years ago
</store>
3 years ago
3 years ago
</match>