From 4b10649d68808732a8e58cc99bd9719c7d2ce1c7 Mon Sep 17 00:00:00 2001 From: zeus Date: Sat, 27 Nov 2021 16:14:18 +0200 Subject: [PATCH] man poc --- poc-datacollector/modules/ROOT/nav.adoc | 1 + .../modules/ROOT/pages/doc-dummy_service.adoc | 162 ++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 poc-datacollector/modules/ROOT/pages/doc-dummy_service.adoc diff --git a/poc-datacollector/modules/ROOT/nav.adoc b/poc-datacollector/modules/ROOT/nav.adoc index 1f5d013..6d3979d 100644 --- a/poc-datacollector/modules/ROOT/nav.adoc +++ b/poc-datacollector/modules/ROOT/nav.adoc @@ -5,5 +5,6 @@ ** xref:index-mongo.adoc[Mongo] ** xref:index-redis.adoc[Redis] * xref:index-src.adoc[src-files] +** xref:doc-dummy_service.adoc[dummy_service] * xref:index-usage.adoc[Usage] ** xref:index-dummy_service.adoc[dummy_service] diff --git a/poc-datacollector/modules/ROOT/pages/doc-dummy_service.adoc b/poc-datacollector/modules/ROOT/pages/doc-dummy_service.adoc new file mode 100644 index 0000000..988ea65 --- /dev/null +++ b/poc-datacollector/modules/ROOT/pages/doc-dummy_service.adoc @@ -0,0 +1,162 @@ += dummy_service + + + + + +== WriteToMongo/fluent/fluent.conf + + +[source,javascript] +---- +# config + + @type stdout + + +# input log + + @type tail // <1> + + 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 + + enable_stat_watcher false + enable_watch_timer true + read_from_head true + follow_inodes true # Without this parameter, file rotation causes log duplication + + + @type none + + keep_time_key true + + + +# input stats + + @type tail + + path /var/log-in/*/* + path_key tailed_path + pos_file /tmp/fluentd--1605454014.pos + pos_file_compaction_interval 10s + refresh_interval 30s + skip_refresh_on_startup + + tag log.node + + enable_stat_watcher false + enable_watch_timer true + read_from_head true + follow_inodes true # Without this parameter, file rotation causes log duplication + + @type none + + keep_time_key true + + + +# output mongo log* + + @type copy + copy_mode deep + + @type mongo + + connection_string mongodb://mongo.poc-datacollector_datacollector-net:27017/fluentdb + + #database fluentdb + collection test + #host mongo.poc-datacollector_datacollector-net + #port 27017 + + num_retries 60 + capped + capped_size 100m + + # key name of timestamp + time_key time + + + + retry_wait 50s + flush_mode immediate + #flush_interval 10s + + + + + @type stdout + + + + @type file + path /tmp/mylog + + timekey 1d + timekey_use_utc true + timekey_wait 10s + + + + + +# output mongo log* +# +# @type copy +# +# @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 +# +# +# +# +# @type stdout +# +# +# +# @type file +# path /tmp/mylog1 +# +# timekey 1d +# timekey_use_utc true +# timekey_wait 10s +# +# +# +# +---- +<1> *localhost* inside of a container will resolve to the network stack of this container + + + + + + + + + + + + +