Skip to content

Commit f18a805

Browse files
committed
fluentd: Add ovn logs to input
Closes-Bug: #2115244 Depends-On: https://review.opendev.org/c/openstack/kolla/+/952566 Change-Id: I75bab5ee1491a94ee4eee5da1e0be34b619d9975 Signed-off-by: Michal Nasiadka <[email protected]> (cherry picked from commit ad29adf)
1 parent 7a449e6 commit f18a805

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

ansible/roles/common/templates/conf/input/10-openvswitch.conf.j2

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,41 @@
2727
time_format %FT%T.%L
2828
</parse>
2929
</source>
30+
31+
{% if enable_ovn | bool %}
32+
{% if inventory_hostname in groups.get('ovn-controller', []) %}
33+
<source>
34+
@type tail
35+
path /var/log/kolla/openvswitch/ovn-controller.log
36+
pos_file /var/run/fluentd/ovn-controller.pos
37+
tag infra.ovn_controller
38+
enable_watch_timer {{ fluentd_enable_watch_timer }}
39+
<parse>
40+
@type multiline
41+
format_firstline /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}/
42+
format1 /^(?<Timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3})Z\|\d{5,}\|(?<module>\S+)\|(?<log_level>\S+)\|(?<Payload>.*)/
43+
time_key Timestamp
44+
time_format %FT%T.%L
45+
</parse>
46+
</source>
47+
{% endif %}
48+
{% for ovn_service in ['ovn-nb-db', 'ovn-northd', 'ovn-sb-db'] %}
49+
{% if inventory_hostname in groups.get(ovn_service, []) %}
50+
51+
<source>
52+
@type tail
53+
path /var/log/kolla/openvswitch/{{ ovn_service }}.log
54+
pos_file /var/run/fluentd/{{ ovn_service }}.pos
55+
tag infra.{{ ovn_service | replace("-", "_") }}
56+
enable_watch_timer {{ fluentd_enable_watch_timer }}
57+
<parse>
58+
@type multiline
59+
format_firstline /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}/
60+
format1 /^(?<Timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3})Z\|\d{5,}\|(?<module>\S+)\|(?<log_level>\S+)\|(?<Payload>.*)/
61+
time_key Timestamp
62+
time_format %FT%T.%L
63+
</parse>
64+
</source>
65+
{% endif %}
66+
{% endfor %}
67+
{% endif %}

zuul.d/base.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
parent: kolla-ansible-base
7878
voting: false
7979
files:
80+
- ^ansible/group_vars/all.yml
81+
- ^ansible/roles/common/
8082
- ^requirements-core.yml
8183
- ^ansible/roles/(nova-cell)/
8284
- ^tests/templates/nova-compute-overrides.j2

0 commit comments

Comments
 (0)