70 lines
1.8 KiB
Django/Jinja
70 lines
1.8 KiB
Django/Jinja
# vim: set syntax=yaml
|
|
|
|
[hekad]
|
|
maxprocs = 2
|
|
|
|
[DockerLogInput]
|
|
endpoint = "unix:///var/run/docker.sock"
|
|
#decoder = "KubeAPI_decoder"
|
|
decoder = "MultiDecoder"
|
|
|
|
[MultiDecoder]
|
|
type = "MultiDecoder"
|
|
subs = ["KubeAPI_decoder", "EnvironmentScribbler"]
|
|
cascade_strategy = "all"
|
|
#log_sub_errors = true
|
|
{% raw %}
|
|
[KubeAPI_decoder]
|
|
type = "PayloadRegexDecoder"
|
|
match_regex = '\S+ \S+ .+ (?P<Code>\S+)\] (?P<Method>[A-Z]+) (?P<Url>\S+)\: \((?P<ResponseTime>\S+)ms\) (?P<StatusCode>\d+) \[\[(?P<Agent>.+)\] (?P<RemoteIP>\S+)\:(?P<RemotePort>\d+)\]'
|
|
[KubeAPI_decoder.message_fields]
|
|
Type = "KubeAPIlog"
|
|
Logger = "Docker"
|
|
Code = "%Code%"
|
|
Method = "%Method%"
|
|
Url|uri = "%Url%"
|
|
ResponseTime = "%ResponseTime%"
|
|
StatusCode = "%StatusCode%"
|
|
Agent = "%Agent%"
|
|
RemoteIP|ipv4 = "%RemoteIP%"
|
|
RemotePort = "%RemotePort%"
|
|
{% endraw %}
|
|
[EnvironmentScribbler]
|
|
type = "ScribbleDecoder"
|
|
[EnvironmentScribbler.message_fields]
|
|
Environment = "env-{{ env_num }}"
|
|
|
|
|
|
[KubeAPI_to_int]
|
|
type = "SandboxFilter"
|
|
filename = "lua_filters/kubeapi_to_int.lua"
|
|
message_matcher = "Type == 'KubeAPIlog'"
|
|
|
|
[ESJsonEncoder]
|
|
index = "env-{{ env_num }}-{{ '%{Type}-%{%Y.%m.%d}' }}"
|
|
#es_index_from_timestamp = true
|
|
type_name = "%{Type}"
|
|
|
|
[ElasticSearchOutput]
|
|
message_matcher = "Type == 'heka.sandbox.KubeAPIlog' || Type == 'DockerLog'"
|
|
server = "http://{{ elasticsearch_node }}:9200"
|
|
flush_interval = 5000
|
|
flush_count = 10
|
|
encoder = "ESJsonEncoder"
|
|
|
|
[PayloadEncoder]
|
|
append_newlines = false
|
|
#
|
|
[LogOutput]
|
|
<<<<<<< HEAD
|
|
#message_matcher = "Type == 'KubeAPIlog'"
|
|
message_matcher = "TRUE"
|
|
#encoder = "ESJsonEncoder"
|
|
encoder = "PayloadEncoder"
|
|
=======
|
|
message_matcher = "Type == 'heka.sandbox.KubeAPIlog' || Type == 'DockerLog'"
|
|
#message_matcher = "TRUE"
|
|
encoder = "ESJsonEncoder"
|
|
#encoder = "PayloadEncoder"
|
|
>>>>>>> b0caa3ceb82399dd16465645eebdebf90242662c
|