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.

111 lines
2.7 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
tag stats.node
# parse json
<parse>
@type json
</parse>
pos_file /tmp/fluentd--1605454018.pos
3 years ago
</source>
3 years ago
# input stats
<source>
@type tail
path /var/log-in/*/*
path_key tailed_path
tag log.node
# parse none
<parse>
@type none
</parse>
pos_file /tmp/fluentd--1605454014.pos
</source>
3 years ago
3 years ago
# output mongo log*
<match log.*>
3 years ago
@type copy
3 years ago
<store>
#@type mongo_replset
@type mongo
#database app_swarmlab
database fluentdb
#collection logs
collection test
3 years ago
#nodes swarmlabmongo1:27017,swarmlabmongo2:27017,swarmlabmongo1:27017
3 years ago
host mongo.poc-datacollector_datacollector-net
port 27017
#user app_swarmlab
#password app_swarmlab
#replica_set rs0
num_retries 60
capped
capped_size 100m
<buffer>
flush_interval 20s
</buffer>
</store>
3 years ago
3 years ago
<store>
3 years ago
@type stdout
</store>
3 years ago
3 years ago
<store>
@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 stats*
<match stats.*>
@type copy
<store>
@type mongo_replset
database app_swarmlab
collection logs
nodes swarmlabmongo1:27017,swarmlabmongo2:27017,swarmlabmongo1:27017
user swarmlab
password swarmlab
replica_set rs0
num_retries 60
capped
capped_size 100m
</store>
<store>
@type stdout
3 years ago
</store>
</match>
3 years ago