Add fluentd.conf as a configmap (#792)
Logger's - FluentD config can be passed as a configmap so that user can customize the configuration to their needs
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# Hide all fluent-related logs
|
||||
<match fluent.**>
|
||||
type null
|
||||
</match>
|
||||
|
||||
# Collect all logs from the containers in the current namespace
|
||||
<source>
|
||||
type tail
|
||||
format json
|
||||
time_key time
|
||||
path "#{ENV['FLUENTD_PATH']}"
|
||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||
tag fission.*
|
||||
read_from_head true
|
||||
refresh_interval 5
|
||||
</source>
|
||||
|
||||
# Augment logs with Kubernetes metadata
|
||||
<filter fission.**>
|
||||
type kubernetes_metadata
|
||||
</filter>
|
||||
|
||||
# Simplify the nested objects to XX_YY_ZZ names
|
||||
<filter fission.**>
|
||||
type flatten_hash
|
||||
separator _
|
||||
</filter>
|
||||
|
||||
# Add `funcuid` to the record (using the functionUid label)
|
||||
<match fission.**>
|
||||
type record_reformer
|
||||
enable_ruby false
|
||||
tag log
|
||||
<record>
|
||||
funcuid ${kubernetes_labels_functionUid}
|
||||
</record>
|
||||
</match>
|
||||
|
||||
# Push logs into influxdb
|
||||
<match **>
|
||||
@type influxdb
|
||||
host "#{ENV['INFLUXDB_ADDRESS']}"
|
||||
port "#{ENV['INFLUXDB_PORT']}"
|
||||
dbname "#{ENV['INFLUXDB_DBNAME']}"
|
||||
user "#{ENV['INFLUXDB_USERNAME']}"
|
||||
password "#{ENV['INFLUXDB_PASSWD']}"
|
||||
use_ssl false
|
||||
time_precision ns
|
||||
tag_keys ["funcuid"]
|
||||
sequence_tag _seq
|
||||
buffer_type file
|
||||
buffer_path /var/log/fission/fluentd.buffer
|
||||
buffer_chunk_limit 128m
|
||||
buffer_queue_limit 256
|
||||
flush_interval 5
|
||||
retry_limit 10
|
||||
retry_wait 1.0
|
||||
num_threads 2
|
||||
</match>
|
||||
Reference in New Issue
Block a user