引入lumberjack和fluentbit自动分发
This commit is contained in:
69
deploy/fluent-bit/fluent-bit-sample-4c8g.conf
Normal file
69
deploy/fluent-bit/fluent-bit-sample-4c8g.conf
Normal file
@@ -0,0 +1,69 @@
|
||||
# Sample profile for 4C8G nodes (Node + DNS on same host).
|
||||
# Replace Host/Port/URI and credentials according to your ClickHouse deployment.
|
||||
|
||||
[SERVICE]
|
||||
Flush 1
|
||||
Log_Level info
|
||||
Parsers_File parsers.conf
|
||||
storage.path /var/lib/fluent-bit/storage
|
||||
storage.sync normal
|
||||
storage.checksum off
|
||||
storage.backlog.mem_limit 512MB
|
||||
|
||||
[INPUT]
|
||||
Name tail
|
||||
Path /var/log/edge/edge-node/*.log
|
||||
Tag app.http.logs
|
||||
Parser json
|
||||
Refresh_Interval 2
|
||||
Read_from_Head false
|
||||
DB /var/lib/fluent-bit/http-logs.db
|
||||
storage.type filesystem
|
||||
Mem_Buf_Limit 256MB
|
||||
Skip_Long_Lines On
|
||||
|
||||
[INPUT]
|
||||
Name tail
|
||||
Path /var/log/edge/edge-dns/*.log
|
||||
Tag app.dns.logs
|
||||
Parser json
|
||||
Refresh_Interval 2
|
||||
Read_from_Head false
|
||||
DB /var/lib/fluent-bit/dns-logs.db
|
||||
storage.type filesystem
|
||||
Mem_Buf_Limit 256MB
|
||||
Skip_Long_Lines On
|
||||
|
||||
[OUTPUT]
|
||||
Name http
|
||||
Match app.http.logs
|
||||
Host 127.0.0.1
|
||||
Port 8443
|
||||
URI /?query=INSERT%20INTO%20default.logs_ingest%20FORMAT%20JSONEachRow
|
||||
Format json_lines
|
||||
http_user ${CH_USER}
|
||||
http_passwd ${CH_PASSWORD}
|
||||
json_date_key timestamp
|
||||
json_date_format epoch
|
||||
workers 2
|
||||
net.keepalive On
|
||||
Retry_Limit False
|
||||
tls On
|
||||
tls.verify On
|
||||
|
||||
[OUTPUT]
|
||||
Name http
|
||||
Match app.dns.logs
|
||||
Host 127.0.0.1
|
||||
Port 8443
|
||||
URI /?query=INSERT%20INTO%20default.dns_logs_ingest%20FORMAT%20JSONEachRow
|
||||
Format json_lines
|
||||
http_user ${CH_USER}
|
||||
http_passwd ${CH_PASSWORD}
|
||||
json_date_key timestamp
|
||||
json_date_format epoch
|
||||
workers 2
|
||||
net.keepalive On
|
||||
Retry_Limit False
|
||||
tls On
|
||||
tls.verify On
|
||||
Reference in New Issue
Block a user