Skip to content
Snippets Groups Projects
  • Doug Szumski's avatar
    b39a0f80
    Switch to Monasca API for logs · b39a0f80
    Doug Szumski authored
    The Monasca Log API has been removed and in this change we switch
    to using the unified API. If dedicated log APIs are required then
    this can be supported through configuration. Out of the box the
    Monasca API is used for both logs and metrics which is envisaged to
    work for most use cases.
    
    In order to use the unified API for logs, we need to disable the
    legacy Kafka client. We also rename the Monasca API config file
    to remove a warning about using the old style name.
    
    Depends-On: https://review.opendev.org/#/c/728638
    Change-Id: I9b6bf5b6690f4b4b3445e7d15a40e45dd42d2e84
    b39a0f80
    History
    Switch to Monasca API for logs
    Doug Szumski authored
    The Monasca Log API has been removed and in this change we switch
    to using the unified API. If dedicated log APIs are required then
    this can be supported through configuration. Out of the box the
    Monasca API is used for both logs and metrics which is envisaged to
    work for most use cases.
    
    In order to use the unified API for logs, we need to disable the
    legacy Kafka client. We also rename the Monasca API config file
    to remove a warning about using the old style name.
    
    Depends-On: https://review.opendev.org/#/c/728638
    Change-Id: I9b6bf5b6690f4b4b3445e7d15a40e45dd42d2e84
00-global.conf.j2 1.24 KiB
#jinja2: trim_blocks: False
{% if fluentd_enabled_input_openstack_services | length > 0 -%}
<source>
  @type tail
  path {% for service in fluentd_enabled_input_openstack_services %}/var/log/kolla/{{ service }}/*.log{% if not loop.last %},{% endif %}{% endfor %}
  exclude_path ["/var/log/kolla/monasca/agent*.log",
                "/var/log/kolla/monasca/grafana.log",
                "/var/log/kolla/monasca/monasca-api.log",
                "/var/log/kolla/neutron/dnsmasq.log",
                "/var/log/kolla/*/*-access.log",
                "/var/log/kolla/*/*-error.log",
                "/var/log/kolla/*/*_access.log",
                "/var/log/kolla/*/*_error.log"]
  pos_file /var/run/{{ fluentd_binary }}/kolla-openstack.pos
  tag kolla.*
  format multiline
  format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/
  format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/
  time_key Timestamp
  keep_time_key true
  time_format %F %T.%L
  ignore_repeated_permission_error true
  enable_watch_timer false
</source>
{%- endif %}