# Inputs
# Included from conf/input/00-global.conf.j2:
#jinja2: trim_blocks: False
# Included from conf/input/01-syslog.conf.j2:
# Included from conf/input/02-mariadb.conf.j2:
# mysqld and its wrapper script mysqld_safe output logs using a different timestamp.
# Defer parsing the logs until the different formats have been retagged.
# Included from conf/input/03-rabbitmq.conf.j2:
# Included from conf/input/04-openstack-wsgi.conf.j2:
# Note (blallau): to manage Apache and WSGI log files
# Included from conf/input/05-libvirt.conf.j2:
# Included from conf/input/06-zookeeper.conf.j2:
# Included from conf/input/07-kafka.conf.j2:
# Included from conf/input/09-monasca.conf.j2:
# Included from conf/input/10-openvswitch.conf.j2:
# Filters
# Included from conf/filter/00-record_transformer.conf.j2:
@type record_transformer
Hostname ${hostname}
Logger openstack.${tag_parts[4]}
programname ${tag_parts[5]}
@type record_transformer
Logger ${tag_parts[4]}
@type record_transformer
Hostname ${hostname}
programname ${tag_parts[1]}
# Rename internal Fluent message field to match other logs. This removes
# all other fields by default, including the original message field. This is
# intented to avoid duplication of the log message and to prevent passing
# invalid dimensions to Monasca, if it is enabled. Note that if this step
# is moved to the format folder, then it will applied after the second step
# below which will break the logic.
@type parser
key_name message
format /^(?.*)$/
@type record_transformer
Hostname "#{Socket.gethostname}"
programname ${tag_parts[0]}
log_level ${tag_parts[1]}
# Included from conf/filter/01-rewrite.conf.j2:
@type rewrite_tag_filter
capitalize_regex_backreference yes
key programname
pattern ^(cinder-api-access|cloudkitty-api-access|gnocchi-api-access|horizon-access|keystone-apache-admin-access|keystone-apache-public-access|monasca-api-access|octavia-api-access|placement-api-access)$
tag apache_access
key programname
pattern ^(aodh_wsgi_access|barbican_api_uwsgi_access|zun_api_wsgi_access|vitrage_wsgi_access)$
tag wsgi_access
key programname
pattern ^(nova-api|nova-compute|nova-compute-ironic|nova-conductor|nova-manage|nova-novncproxy|nova-scheduler|nova-placement-api|placement-api|privsep-helper)$
tag openstack_python
key programname
pattern ^(sahara-api|sahara-engine)$
tag openstack_python
key programname
pattern ^(neutron-server|neutron-openvswitch-agent|neutron-ns-metadata-proxy|neutron-metadata-agent|neutron-l3-agent|neutron-dhcp-agent)$
tag openstack_python
key programname
pattern ^(magnum-conductor|magnum-api)$
tag openstack_python
key programname
pattern ^(keystone)$
tag openstack_python
key programname
pattern ^(heat-engine|heat-api|heat-api-cfn)$
tag openstack_python
key programname
pattern ^(glance-api)$
tag openstack_python
key programname
pattern ^(cloudkitty-storage-init|cloudkitty-processor|cloudkitty-dbsync|cloudkitty-api)$
tag openstack_python
key programname
pattern ^(ceilometer-polling|ceilometer-agent-notification)$
tag openstack_python
key programname
pattern ^(barbican-api|barbican-worker|barbican-keystone-listener|barbican-db-manage|app)$
tag openstack_python
key programname
pattern ^(aodh-notifier|aodh-listener|aodh-evaluator|aodh-dbsync)$
tag openstack_python
key programname
pattern ^(cyborg-api|cyborg-conductor|cyborg-agent)$
tag openstack_python
key programname
pattern ^(cinder-api|cinder-scheduler|cinder-manage|cinder-volume|cinder-backup|privsep-helper)$
tag openstack_python
key programname
pattern ^(mistral-server|mistral-engine|mistral-executor)$
tag openstack_python
key programname
pattern ^(designate-api|designate-central|designate-manage|designate-mdns|designate-sink|designate-worker)$
tag openstack_python
key programname
pattern ^(manila-api|manila-data|manila-manage|manila-share|manila-scheduler)$
tag openstack_python
key programname
pattern ^(trove-api|trove-conductor|trove-manage|trove-taskmanager)$
tag openstack_python
key programname
pattern ^(murano-api|murano-engine)$
tag openstack_python
key programname
pattern ^(senlin-api|senlin-conductor|senlin-engine|senlin-health-manager)$
tag openstack_python
key programname
pattern ^(watcher-api|watcher-applier|watcher-db-manage|watcher-decision-engine)$
tag openstack_python
key programname
pattern ^(freezer-api|freezer-api_access|freezer-manage)$
tag openstack_python
key programname
pattern ^(octavia-api|octavia-health-manager|octavia-housekeeping|octavia-worker)$
tag openstack_python
key programname
pattern ^(zun-api|zun-compute|zun-cni-daemon)$
tag openstack_python
key programname
pattern ^(kuryr-server)$
tag openstack_python
key programname
pattern ^(gnocchi-api|gnocchi-statsd|gnocchi-metricd|gnocchi-upgrade)$
tag openstack_python
key programname
pattern ^(ironic-api|ironic-conductor|ironic-inspector)$
tag openstack_python
key programname
pattern ^(tacker-server|tacker-conductor)$
tag openstack_python
key programname
pattern ^(vitrage-ml|vitrage-notifier|vitrage-graph|vitrage-persistor)$
tag openstack_python
key programname
pattern ^(blazar-api|blazar-manager)$
tag openstack_python
key programname
pattern ^(monasca-api|monasca-notification|monasca-persister|agent-collector|agent-forwarder|agent-statsd)$
tag openstack_python
key programname
pattern ^(masakari-engine|masakari-api)$
tag openstack_python
key programname
pattern .+
tag unmatched
# Retag log messages from MariaDB according to log format
@type rewrite_tag_filter
key Payload
pattern /^\d{6}/
tag infra.mariadb.mysqld_safe
key Payload
pattern /^\d{4}-\d{2}-\d{2}/
tag infra.mariadb.mysqld
# Included from conf/filter/02-parser.conf.j2:
# Parse MariaDB logs with 6 digit date format (mysqld_safe)
@type parser
format /^(?\d{6} {1,2}\d{1,2}:\d{1,2}:\d{1,2}) +(?mysqld_safe .*)/
time_format %y%m%d %k:%M:%S
time_key Timestamp
key_name Payload
reserve_data true
# Parse MariaDB logs with 8 digit date format (mysqld)
@type parser
format /^(?\d{4}-\d{2}-\d{2} {1,2}\d{1,2}:\d{1,2}:\d{1,2}) +(?\w+ +(\[(?\w+)\]|\w+: +(?\w+):).*)/
time_format %Y-%m-%d %k:%M:%S
time_key Timestamp
key_name Payload
reserve_data true
# Re-add timestamp record now that the log date has been parsed
@type record_transformer
timestamp ${time}
# Formats
# Included from conf/format/apache_access.conf.j2:
@type parser
reserve_data true
key_name Payload
@type grok
grok_pattern \[%{HTTPDATE:Timestamp}\] "(?:%{WORD:http_method} %{NOTSPACE:http_url}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{NUMBER:http_status} (?:%{NUMBER:http_bytes}|-) (?:%{NUMBER:http_response_time_us}|-) "%{DATA:referrer}" "%{DATA:agent}"
time_key Timestamp
time_format %d/%b/%Y:%H:%M:%S %z
keep_time_key true
# Included from conf/format/wsgi_access.conf.j2:
@type parser
reserve_data true
key_name Payload
@type grok
grok_pattern %{IPORHOST:clientip} %{HTTPDUSER:ident} %{USER:auth} \[%{HTTPDATE:Timestamp}\] "(?:%{WORD:http_method} %{NOTSPACE:http_url}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{NUMBER:http_status} (?:%{NUMBER:http_bytes}|-) (?:%{NUMBER:http_response_time_us}|-) %{QS:referrer} %{QS:agent}
time_key Timestamp
time_format %d/%b/%Y:%H:%M:%S %z
keep_time_key true
# Outputs
# Included from conf/output/00-local.conf.j2: