Graeme Seaton 7f3cab65f0 Set fluentd output to elasticsearch to use elasticsearch_address
Haproxy binds the elasticsearch service to kolla_internal_vip_address but
the output templates for fluentd (td-agent) point to a non-existent
kolla_external_vip_address.

Output should also be able to be sent to an external elasticsearch
instance (as per the documentation regarding overriding
elasticsearch_address)

Change these settings so that fluentd outputs to either
the default elasticsearch_address (i.e. kolla_internal_vip_address) or to
the external elasticsearch instance.

Closes-Bug: #1673990
Change-Id: I081533ae8ea9aad186e9c44e1dee069729931453
2017-03-20 19:31:41 +00:00

48 lines
1.1 KiB
Django/Jinja

<match syslog.local0.**>
@type copy
<store>
@type file
path /var/log/kolla/swift/swift_latest.*.log
symlink_path /var/log/kolla/swift/swift_latest.log
utc
append true
compress gzip
</store>
{% if enable_elasticsearch | bool or
elasticsearch_address != kolla_internal_vip_address %}
<store>
type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port }}
logstash_format true
logstash_prefix flog
flush_interval 15s
</store>
{% endif %}
</match>
<match syslog.local1.**>
@type copy
<store>
@type file
path /var/log/kolla/haproxy/haproxy_latest.*.log
symlink_path /var/log/kolla/haproxy/haproxy_latest.log
output_tag false
output_time false
utc
append true
compress gzip
</store>
{% if enable_elasticsearch | bool or
elasticsearch_address != kolla_internal_vip_address %}
<store>
type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port }}
logstash_format true
logstash_prefix flog
flush_interval 15s
</store>
{% endif %}
</match>