Skip to content

Instantly share code, notes, and snippets.

@dougneal
Last active December 5, 2019 15:56
Show Gist options
  • Save dougneal/b305420753a3f0caeaf65afa25e9587e to your computer and use it in GitHub Desktop.
Save dougneal/b305420753a3f0caeaf65afa25e9587e to your computer and use it in GitHub Desktop.
### Temporary debugging config
<system>
log_level debug
</system>
<source>
@type forward
port 5160
bind 0.0.0.0
</source>
<match **>
@type copy
<store>
@type logit
stack_id "#{ENV['LOGIT_STACK_ID']}"
port "#{ENV['LOGIT_PORT']}"
tls_mode mutual
tls_ca_certificate "/fluentd/etc/tls/ca_certs.pem"
tls_certificate "/fluentd/etc/tls/client_cert.pem"
tls_private_key "/fluentd/etc/tls/private/#{ENV['TLS_SECRET_NAME']}"
buffer_type file
buffer_path /tmp/
flush_interval 2s
</store>
<store>
@type stdout
</store>
</match>
### Original config
<source>
@type forward
port 5160
bind 0.0.0.0
</source>
<match **>
@type logit
stack_id "#{ENV['LOGIT_STACK_ID']}"
port "#{ENV['LOGIT_PORT']}"
tls_mode mutual
tls_ca_certificate "/fluentd/etc/tls/ca_certs.pem"
tls_certificate "/fluentd/etc/tls/client_cert.pem"
tls_private_key "/fluentd/etc/tls/private/#{ENV['TLS_SECRET_NAME']}"
</match>
### Sample log message as output to stdout by fluentd
2019-12-05 14:32:17.000000000 +0000 python-greeter: {"context":{"filename":"__init__.py","pathname":"./greeter/__init__.py","function":"errorgen","line":48,"module":"__init__","name":"root"},"level":{"name":"ERROR","number":40},"message":"Generated error"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment