kolla-ansible/ansible/roles/common/templates/conf/output/00-local.conf.j2
Doug Szumski 58eec5ca12 Forward system logs to Monasca Log API
When Monasca is enabled disable direct logging to ElasticSearch and
send all logs harvested by Fluentd to the Monasca Log API.

This change also cleans up output files which may be left behind when
the various log forwarding options are enabled / disabled.

Partially-Implements: blueprint monasca-roles
Change-Id: I7197966c5117176407d60c86c08d3bcea5e8131a
2018-10-12 08:25:28 +00:00

68 lines
1.8 KiB
Django/Jinja

<match syslog.{{ syslog_swift_facility }}.**>
@type copy
<store>
@type file
path /var/log/kolla/swift/swift_latest.*.log
utc
append true
compress gzip
</store>
{% if log_direct_to_elasticsearch %}
<store>
type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port }}
logstash_format true
logstash_prefix {{ kibana_log_prefix }}
flush_interval 15s
</store>
{% elif enable_monasca | bool %}
type copy
<store>
@type monasca
keystone_url {{ keystone_internal_url }}
monasca_log_api {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ monasca_log_api_port }}
monasca_log_api_version v3.0
username {{ monasca_agent_user }}
password {{ monasca_agent_password }}
domain_id default
project_name {{ monasca_control_plane_project }}
</store>
{% endif %}
</match>
<match syslog.{{ syslog_haproxy_facility }}.**>
@type copy
<store>
@type file
path /var/log/kolla/haproxy/haproxy_latest.*.log
output_tag false
output_time false
utc
append true
compress gzip
</store>
{% if log_direct_to_elasticsearch %}
<store>
type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port }}
logstash_format true
logstash_prefix {{ kibana_log_prefix }}
flush_interval 15s
</store>
{% elif enable_monasca | bool %}
type copy
<store>
@type monasca
keystone_url {{ keystone_internal_url }}
monasca_log_api {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ monasca_log_api_port }}
monasca_log_api_version v3.0
username {{ monasca_agent_user }}
password {{ monasca_agent_password }}
domain_id default
project_name {{ monasca_control_plane_project }}
</store>
{% endif %}
</match>