Merge "Support amphora log offloading over TCP"
This commit is contained in:
commit
a2573e3386
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added new log_offload_protocol parameter that sets the
|
||||
[amphora_agent]/log_protocol setting in Octavia's configuration.
|
@ -18,3 +18,4 @@ lb_mgmt_sec_grp_name: "lb-mgmt-sec-grp"
|
||||
lb_health_mgr_sec_grp_name: "lb-health-mgr-sec-grp"
|
||||
mgmt_port_dev: "o-hm0"
|
||||
enable_log_offloading: false
|
||||
log_offload_protocol: "udp"
|
||||
|
@ -107,6 +107,19 @@
|
||||
when:
|
||||
- enable_log_offloading | bool
|
||||
|
||||
- name: setting [amphora_agent]/log_protocol
|
||||
become: true
|
||||
become_user: root
|
||||
ini_file:
|
||||
section: "amphora_agent"
|
||||
option: "log_protocol"
|
||||
value: "{{ log_offload_protocol | upper }}"
|
||||
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
|
||||
selevel: s0
|
||||
setype: svirt_sandbox_file_t
|
||||
when:
|
||||
- enable_log_offloading | bool
|
||||
|
||||
- name: setting [amphora_agent]/admin_log_targets
|
||||
become: true
|
||||
become_user: root
|
||||
|
@ -1,14 +1,14 @@
|
||||
module(load="imudp")
|
||||
input(type="imudp" address="{{ mgmt_port_ip }}" port="514")
|
||||
module(load="im{{ log_offload_protocol }}")
|
||||
input(type="im{{ log_offload_protocol }}" address="{{ mgmt_port_ip }}" port="514")
|
||||
|
||||
# Output the amphora tenant traffic flow logs
|
||||
if ($inputname == "imudp" and $syslogfacility-text == "local0" and $syslogseverity-text == "info" and $hostname startswith "amphora") then {
|
||||
if ($inputname == "im{{ log_offload_protocol }}" and $syslogfacility-text == "local0" and $syslogseverity-text == "info" and $hostname startswith "amphora") then {
|
||||
action(type="omfile" FileCreateMode="0644" File="/var/log/octavia/octavia-tenant-traffic.log")
|
||||
stop
|
||||
}
|
||||
|
||||
# Output the amphora administrative logs
|
||||
if ($inputname == "imudp" and $syslogfacility-text != "local0" and $hostname startswith "amphora") then {
|
||||
if ($inputname == "im{{ log_offload_protocol }}" and $syslogfacility-text != "local0" and $hostname startswith "amphora") then {
|
||||
action(type="omfile" FileCreateMode="0644" File="/var/log/octavia/octavia-amphora.log")
|
||||
stop
|
||||
}
|
||||
|
@ -107,7 +107,7 @@
|
||||
- name: create security group rule for log offloading
|
||||
openstack.cloud.security_group_rule:
|
||||
security_group: "{{ lb_health_mgr_sec_grp_name }}"
|
||||
protocol: udp
|
||||
protocol: "{{ log_offload_protocol }}"
|
||||
port_range_min: 514
|
||||
port_range_max: 514
|
||||
remote_ip_prefix: 0.0.0.0/0
|
||||
|
Loading…
Reference in New Issue
Block a user