Missing rsyslog parameters for HAProxy

Services need to provide this rsyslog configuration in order for
their logs to get ingested by rsyslog for forwarding.

Closes-Bug: 1953672
Change-Id: I0da99239275fa7f53f032ca4a85460e6111738b4
This commit is contained in:
Chris Sibbitt 2021-12-02 12:54:56 -05:00
parent b3e8e218f8
commit c3bb913386
3 changed files with 24 additions and 0 deletions

View File

@ -33,6 +33,12 @@ parameters:
description: User for HAProxy stats endpoint
default: admin
type: string
HAProxyLoggingSource:
type: json
default:
tag: openstack.haproxy
file: /var/log/containers/haproxy/haproxy.log
startmsg.regex: "^[a-zA-Z]{3} [0-9]{2} [:0-9]{8}"
HAProxySyslogAddress:
default: /dev/log
description: Syslog address where HAproxy will send its log
@ -189,6 +195,10 @@ outputs:
haproxy_backend_syntax: {get_param: HAProxyConfigBackendSyntax}
- get_attr: [HAProxyPublicTLS, role_data, config_settings]
- get_attr: [HAProxyInternalTLS, role_data, config_settings]
service_config_settings:
rsyslog:
tripleo_logging_sources_haproxy:
- {get_param: HAProxyLoggingSource}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: haproxy

View File

@ -81,6 +81,12 @@ parameters:
HAProxyInternalTLSKeysDirectory:
default: '/etc/pki/tls/private/haproxy'
type: string
HAProxyLoggingSource:
type: json
default:
tag: openstack.haproxy
file: /var/log/containers/haproxy/haproxy.log
startmsg.regex: "^[a-zA-Z]{3} [0-9]{2} [:0-9]{8}"
HAProxySyslogAddress:
default: /dev/log
description: Syslog address where HAproxy will send its log
@ -205,6 +211,10 @@ outputs:
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerHAProxyImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
service_config_settings:
rsyslog:
tripleo_logging_sources_haproxy:
- {get_param: HAProxyLoggingSource}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: haproxy

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Rsyslog config for haproxy (https://bugs.launchpad.net/tripleo/+bug/1953672)