kolla-ansible/ansible/roles/common/templates/heka-global.toml.j2
Éric Lemoine e6a9b9627a Fix Swift logging
Swift uses Syslog, but it uses a custom log format.  So this commit
adds a specific Heka decoder for Swift.

It also increases the log level from "warning" to "info" to make
Swift more verbose.  Note that "info" is the default log level in
Swift.

And it disables the Heka configuration for Swift when "enable_swift"
is set to "no".  This prevents Heka from creating 15 empty Swift log
files in the logs volume.

Partially implements: blueprint heka

Change-Id: If7a7d0707e71be2957178e2d45b5de51b788232e
2016-02-22 08:53:20 -08:00

31 lines
735 B
Django/Jinja

[hekad]
maxprocs = {{ ansible_processor_count * ansible_processor_cores }}
[syslog_encoder]
type = "SandboxEncoder"
filename = "lua_encoders/os_syslog.lua"
[syslog_log_decoder]
type = "SandboxDecoder"
filename = "lua_decoders/os_syslog.lua"
[syslog_log_decoder.config]
hostname = "{{ ansible_hostname }}"
[swift_log_decoder]
type = "SandboxDecoder"
filename = "lua_decoders/os_swift_log.lua"
[swift_log_decoder.config]
hostname = "{{ ansible_hostname }}"
[multi_log_decoder]
type = "MultiDecoder"
subs = ["syslog_log_decoder", "swift_log_decoder"]
cascade_strategy = "first-wins"
[syslog_input]
type = "UdpInput"
net = "unixgram"
address = "/var/lib/kolla/heka/log"
decoder = "multi_log_decoder"
splitter = "NullSplitter"