diff --git a/WriteToMongo/fluent/fluent.conf b/WriteToMongo/fluent/fluent.conf
index a69235c..bb6687d 100644
--- a/WriteToMongo/fluent/fluent.conf
+++ b/WriteToMongo/fluent/fluent.conf
@@ -9,70 +9,83 @@
path /var/log/*.log
path_key tailed_path
+ pos_file /tmp/fluentd--1605454018.pos
+ pos_file_compaction_interval 30s
+ refresh_interval 30s
+ skip_refresh_on_startup
tag stats.node
- # parse json
+ enable_stat_watcher false
+ enable_watch_timer false
+ read_from_head true
+ follow_inodes true # Without this parameter, file rotation causes log duplication
+
- @type json
-
+ @type none
- pos_file /tmp/fluentd--1605454018.pos
+ keep_time_key true
+
-
# input stats
-
# output mongo log*
@type copy
-
- #@type mongo_replset
+ copy_mode deep
+
@type mongo
- #database app_swarmlab
- database fluentdb
- #collection logs
+ connection_string mongodb://mongo.poc-datacollector_datacollector-net:27017/fluentdb
+
+ #database fluentdb
collection test
- #nodes swarmlabmongo1:27017,swarmlabmongo2:27017,swarmlabmongo1:27017
- host mongo.poc-datacollector_datacollector-net
- port 27017
-
- #user app_swarmlab
- #password app_swarmlab
+ #host mongo.poc-datacollector_datacollector-net
+ #port 27017
- #replica_set rs0
num_retries 60
capped
capped_size 100m
-
+
+ # key name of timestamp
+ time_key time
+
- flush_interval 20s
+ retry_wait 50s
+ flush_mode immediate
+ #flush_interval 10s
-
+
@type stdout
-
+
@type file
path /tmp/mylog
@@ -82,29 +95,42 @@
-
-# output mongo stats*
+# output mongo log*
@type copy
-
- @type mongo_replset
-
- database app_swarmlab
- collection logs
- nodes swarmlabmongo1:27017,swarmlabmongo2:27017,swarmlabmongo1:27017
-
- user swarmlab
- password swarmlab
+
+ @type mongo
+ #copy_mode shallow
+
+ database fluentdb
+ collection stats
+ host mongo.poc-datacollector_datacollector-net
+ port 27017
+
+ num_retries 60
+ capped
+ capped_size 100m
+
+
+
+ flush_interval 30s
+
+
- replica_set rs0
- num_retries 60
- capped
- capped_size 100m
+
+ @type stdout
+
- @type stdout
+ @type file
+ path /tmp/mylog
+
+ timekey 1d
+ timekey_use_utc true
+ timekey_wait 10s
+
-
+