Merge "depandance the module collect logs"

This commit is contained in:
Zuul 2022-09-09 09:08:52 +00:00 committed by Gerrit Code Review
commit bd1b4b7a2f
24 changed files with 474 additions and 166 deletions

View File

@ -1,9 +1,2 @@
<filter devstack>
@type record_transformer
<record>
Hostname ${hostname}
Logger openstack.${tag_parts[4]}
programname ${tag_parts[5]}
</record>
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/barbican/*.log path /var/log/barbican/*.log
pos_file /var/run/td-agent/devstack-openstack_barbican.pos pos_file /var/run/td-agent/devstack-openstack_barbican.pos
tag devstack tag devstack-barbican
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-barbican>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger barbican
programname ${record['module']}
</record>
</filter>
<filter devstack-barbican>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/cinder/*.log path /var/log/cinder/*.log
pos_file /var/run/td-agent/devstack-openstack_cinder.pos pos_file /var/run/td-agent/devstack-openstack_cinder.pos
tag devstack tag devstack-cinder
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-cinder>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger cinder
programname ${record['module']}
</record>
</filter>
<filter devstack-cinder>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/cyborg/*.log path /var/log/cyborg/*.log
pos_file /var/run/td-agent/devstack-openstack_cyborg.pos pos_file /var/run/td-agent/devstack-openstack_cyborg.pos
tag devstack tag devstack-cyborg
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-cyborg>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger cyborg
programname ${record['module']}
</record>
</filter>
<filter devstack-cyborg>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/designate/*.log path /var/log/designate/*.log
pos_file /var/run/td-agent/devstack-openstack_designate.pos pos_file /var/run/td-agent/devstack-openstack_designate.pos
tag devstack tag devstack-designate
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-designate>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger designate
programname ${record['module']}
</record>
</filter>
<filter devstack-designate>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/glance/*.log path /var/log/glance/*.log
pos_file /var/run/td-agent/devstack-openstack_glance.pos pos_file /var/run/td-agent/devstack-openstack_glance.pos
tag devstack tag devstack-glance
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-glance>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger glance
programname ${record['module']}
</record>
</filter>
<filter devstack-glance>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/heat/*.log path /var/log/heat/*.log
pos_file /var/run/td-agent/devstack-openstack_heat.pos pos_file /var/run/td-agent/devstack-openstack_heat.pos
tag devstack tag devstack-heat
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-heat>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger heat
programname ${record['module']}
</record>
</filter>
<filter devstack-heat>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/ironic/*.log path /var/log/ironic/*.log
pos_file /var/run/td-agent/devstack-openstack_ironic.pos pos_file /var/run/td-agent/devstack-openstack_ironic.pos
tag devstack tag devstack-ironic
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-ironic>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger ironic
programname ${record['module']}
</record>
</filter>
<filter devstack-ironic>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/keystone/*.log path /var/log/keystone/*.log
pos_file /var/run/td-agent/devstack-openstack_keystone.pos pos_file /var/run/td-agent/devstack-openstack_keystone.pos
tag devstack tag devstack-keystone
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-keystone>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger keystone
programname ${record['module']}
</record>
</filter>
<filter devstack-keystone>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/magnum/*.log path /var/log/magnum/*.log
pos_file /var/run/td-agent/devstack-openstack_magnum.pos pos_file /var/run/td-agent/devstack-openstack_magnum.pos
tag devstack tag devstack-magnum
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-magnum>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger magnum
programname ${record['module']}
</record>
</filter>
<filter devstack-magnum>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/manila/*.log path /var/log/manila/*.log
pos_file /var/run/td-agent/devstack-openstack_manila.pos pos_file /var/run/td-agent/devstack-openstack_manila.pos
tag devstack tag devstack-manila
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-manila>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger manila
programname ${record['module']}
</record>
</filter>
<filter devstack-manila>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/neutron/*.log path /var/log/neutron/*.log
pos_file /var/run/td-agent/devstack-openstack_neutron.pos pos_file /var/run/td-agent/devstack-openstack_neutron.pos
tag devstack tag devstack-neutron
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-neutron>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger neutron
programname ${record['module']}
</record>
</filter>
<filter devstack-neutron>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/nova/*.log path /var/log/nova/*.log
pos_file /var/run/td-agent/devstack-openstack_nova.pos pos_file /var/run/td-agent/devstack-openstack_nova.pos
tag devstack tag devstack-nova
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-nova>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger nova
programname ${record['module']}
</record>
</filter>
<filter devstack-nova>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/octavia/*.log path /var/log/octavia/*.log
pos_file /var/run/td-agent/devstack-openstack_octavia.pos pos_file /var/run/td-agent/devstack-openstack_octavia.pos
tag devstack tag devstack-octavia
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-octavia>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger octavia
programname ${record['module']}
</record>
</filter>
<filter devstack-octavia>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/placement/*.log path /var/log/placement/*.log
pos_file /var/run/td-agent/devstack-openstack_placement.pos pos_file /var/run/td-agent/devstack-openstack_placement.pos
tag devstack tag devstack-placement
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-placement>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger placement
programname ${record['module']}
</record>
</filter>
<filter devstack-placement>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/senlin/*.log path /var/log/senlin/*.log
pos_file /var/run/td-agent/devstack-openstack_senlin.pos pos_file /var/run/td-agent/devstack-openstack_senlin.pos
tag devstack tag devstack-senlin
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-senlin>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger senlin
programname ${record['module']}
</record>
</filter>
<filter devstack-senlin>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,29 @@
@type tail @type tail
path /var/log/swift/*.log path /var/log/swift/*.log
pos_file /var/run/td-agent/devstack-openstack_swift.pos pos_file /var/run/td-agent/devstack-openstack_swift.pos
tag devstack tag devstack-swift
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-swift>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger swift
programname ${record['module']}
</record>
</filter>
<filter devstack-swift>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -1,8 +1,8 @@
<source> <source>
@type tail @type tail
tag syslog.*
path /var/log/bootstrap.log,/var/log/btmp,/var/log/syslog path /var/log/bootstrap.log,/var/log/btmp,/var/log/syslog
pos_file /var/run/td-agent/devstack-syslog.pos pos_file /var/run/td-agent/devstack-syslog.pos
tag syslog.*
source_hostname_key Hostname source_hostname_key Hostname
format /^(?<Payload>.*)$/ format /^(?<Payload>.*)$/
enable_watch_timer false enable_watch_timer false

View File

@ -0,0 +1,30 @@
<source>
@type tail
path /var/log/venus/*.log
pos_file /var/run/td-agent/devstack-openstack_venus.pos
tag devstack-venus
path_key module
<parse>
@type none
</parse>
read_from_head true
ignore_repeated_permission_error true
enable_watch_timer false
</source>
<filter devstack-venus>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger venus
programname ${record['module']}
</record>
</filter>
<filter devstack-venus>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,14 +2,29 @@
@type tail @type tail
path /var/log/vitrage/*.log path /var/log/vitrage/*.log
pos_file /var/run/td-agent/devstack-openstack_vitrage.pos pos_file /var/run/td-agent/devstack-openstack_vitrage.pos
tag devstack tag devstack-vitrage
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-vitrage>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger vitrage
programname ${record['module']}
</record>
</filter>
<filter devstack-vitrage>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -2,13 +2,30 @@
@type tail @type tail
path /var/log/zun/*.log path /var/log/zun/*.log
pos_file /var/run/td-agent/devstack-openstack_zun.pos pos_file /var/run/td-agent/devstack-openstack_zun.pos
tag devstack tag devstack-zun
format multiline path_key module
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(\S+ req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/ <parse>
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(?<global_id>\S+) (req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/ @type none
time_key Timestamp </parse>
keep_time_key true read_from_head true
time_format %F %T.%L
ignore_repeated_permission_error true ignore_repeated_permission_error true
enable_watch_timer false enable_watch_timer false
</source> </source>
<filter devstack-zun>
@type record_transformer
enable_ruby true
<record>
Hostname ${hostname}
Logger zun
programname zun
Logfile ${record['module']}
</record>
</filter>
<filter devstack-zun>
@type parser
key_name message
format /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (?<Payload>.*)?$/
time_format %F %T.%L
reserve_data true
emit_invalid_record_to_error false
</filter>

View File

@ -1,18 +1,22 @@
<match devstack> <match devstack*>
@type copy @type copy
<store> <store>
@type elasticsearch @type elasticsearch
host localhost host localhost
port 9200 port 9200
logstash_format true logstash_format true
logstash_prefix flog logstash_prefix "flog"
buffer_type memory flush_interval 3s
buffer_chunk_limit 8m
buffer_queue_limit 8
buffer_queue_full_action drop_oldest_chunk
flush_interval 30s
num_threads 4
reconnect_on_error true reconnect_on_error true
resurrect_after 5s resurrect_after 5s
<buffer>
@type memory
flush_thread_count 4
flush_interval 30s
chunk_limit_size 2m
queue_limit_length 8
overflow_action drop_oldest_chunk
</buffer>
</store> </store>
</match> </match>

View File

@ -33,3 +33,4 @@ openstacksdk>=0.46.0 # Apache-2.0
elasticsearch>=2.0.0,<3.0.0 # Apache-2.0 elasticsearch>=2.0.0,<3.0.0 # Apache-2.0
apscheduler>=3.6.0 # MIT License apscheduler>=3.6.0 # MIT License
retrying>=1.3.3 retrying>=1.3.3
lxml>=4.6.2