Files
fission-src/logger/fluentd/fluent.conf
T
prithvirameshandSoam Vasani 8b40ad0b33 Refactor logging to remove logger, use fluentd with kubernetes filter (#380)
Remove the `logger` container from the logging daemonset. 

Remove the outgoing call from the poolmgr to the logger.  Use Fluentd's Kubernetes filter to add function name and UID to influx metadata.  

This means fluentd now figures out when to start collecting function logs on its own, without being informed by poolmgr.  This is great for other execution strategies, and for autoscaling, where fission isn't in direct control of function pod creation.

Also adds an integration test to make sure logging keeps working.
2017-11-14 18:08:57 -08:00

55 lines
1.0 KiB
Plaintext

<match fluent.**>
type null
</match>
<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>
<filter fission.**>
type kubernetes_metadata
</filter>
<filter fission.**>
type flatten_hash
separator _
</filter>
<match fission.**>
type record_reformer
enable_ruby false
tag log
<record>
funcuid ${kubernetes_labels_functionUid}
</record>
</match>
<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 s
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>