diff --git a/config/logs/fluent-bit.conf b/config/logs/fluent-bit.conf new file mode 100644 index 0000000..40239e4 --- /dev/null +++ b/config/logs/fluent-bit.conf @@ -0,0 +1,32 @@ +[SERVICE] + Parsers_File parsers.conf + Daemon Off + Log_Level info + HTTP_Server off + HTTP_Listen 0.0.0.0 + HTTP_Port 24224 +[INPUT] + Name tail + Tag gugotik.* + Path /var/log/gugotik/*.log + Mem_Buf_Limit 10MB + DB /var/log/flt_logs.db + Refresh_Interval 5 + Ignore_Older 10s + Rotate_Wait 5 +[FILTER] + Name record_modifier + Match * + Key_name message + Record hostname ${HOSTNAME} + Record namespace gugotik + Record environment prod +[OUTPUT] + Name es + Match * + Host [YOUR HOST] + Port 9200 + Logstash_Format On + Retry_Limit False + Time_Key @timestamp + Logstash_Prefix gugotik \ No newline at end of file diff --git a/config/logs/parsers.conf b/config/logs/parsers.conf new file mode 100644 index 0000000..ee26294 --- /dev/null +++ b/config/logs/parsers.conf @@ -0,0 +1,6 @@ +[PARSER] + Name docker + Format json + Time_Key time + Time_Format %Y-%m-%dT%H:%M:%SZ + Time_Keep On \ No newline at end of file diff --git a/config/logs/readme.md b/config/logs/readme.md new file mode 100644 index 0000000..1af267d --- /dev/null +++ b/config/logs/readme.md @@ -0,0 +1,7 @@ +# Log Solution + +GuGoTik 支持以 Fluent-bit 以 Sidecar 模式收集日志,目录中为推荐配置方案,开箱即用。 + +# Use + +请根据需要自行更改 ES 的用户账号和密码等 \ No newline at end of file