zeus
3 years ago
2 changed files with 93 additions and 34 deletions
@ -1,50 +1,108 @@ |
|||
# config |
|||
<match debug.*> |
|||
@type stdout |
|||
</match> |
|||
|
|||
# input log |
|||
<source> |
|||
@type forward |
|||
port 24224 |
|||
bind 0.0.0.0 |
|||
@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 |
|||
</source> |
|||
|
|||
<filter mongo.redis> |
|||
@type record_transformer |
|||
<record> |
|||
gen_host "#{Socket.gethostname}" |
|||
</record> |
|||
|
|||
</filter> |
|||
# input stats |
|||
<source> |
|||
@type tail |
|||
|
|||
<filter mongo.*> |
|||
@type record_transformer |
|||
<record> |
|||
tag ${tag} |
|||
</record> |
|||
</filter> |
|||
path /var/log-in/*/* |
|||
path_key tailed_path |
|||
|
|||
tag log.node |
|||
|
|||
<match mongo.*> |
|||
# parse none |
|||
<parse> |
|||
@type none |
|||
</parse> |
|||
|
|||
pos_file /tmp/fluentd--1605454014.pos |
|||
</source> |
|||
|
|||
|
|||
# output mongo log* |
|||
<match log.*> |
|||
@type copy |
|||
<store> |
|||
@type stdout |
|||
#@type mongo_replset |
|||
@type mongo |
|||
|
|||
#database app_swarmlab |
|||
database fluentdb |
|||
#collection logs |
|||
collection test |
|||
#nodes swarmlabmongo1:27017,swarmlabmongo2:27017,swarmlabmongo1:27017 |
|||
nodes mongo.poc-datacollector_datacollector-net:27017 |
|||
|
|||
#user app_swarmlab |
|||
#password app_swarmlab |
|||
|
|||
#replica_set rs0 |
|||
num_retries 60 |
|||
capped |
|||
capped_size 100m |
|||
|
|||
|
|||
<buffer> |
|||
flush_interval 20s |
|||
</buffer> |
|||
</store> |
|||
<store> |
|||
@type stdout |
|||
</store> |
|||
|
|||
<store> |
|||
@type mongo |
|||
@type file |
|||
path /tmp/mylog |
|||
<buffer> |
|||
timekey 1d |
|||
timekey_use_utc true |
|||
timekey_wait 10s |
|||
</buffer> |
|||
</store> |
|||
|
|||
host mongo |
|||
port 27017 |
|||
|
|||
database fluentdb |
|||
collection test |
|||
</match> |
|||
|
|||
capped |
|||
capped_size 1024m |
|||
# output mongo stats* |
|||
<match stats.*> |
|||
@type copy |
|||
<store> |
|||
@type mongo_replset |
|||
|
|||
<buffer> |
|||
flush_interval 10s |
|||
</buffer> |
|||
database app_swarmlab |
|||
collection logs |
|||
nodes swarmlabmongo1:27017,swarmlabmongo2:27017,swarmlabmongo1:27017 |
|||
|
|||
<format> |
|||
@type json |
|||
</format> |
|||
</store> |
|||
# interval |
|||
user swarmlab |
|||
password swarmlab |
|||
|
|||
replica_set rs0 |
|||
num_retries 60 |
|||
capped |
|||
capped_size 100m |
|||
</store> |
|||
<store> |
|||
@type stdout |
|||
</store> |
|||
</match> |
|||
|
|||
|
Loading…
Reference in new issue