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
(cherry picked from commit c3bb913386)
This commit is contained in:
Chris Sibbitt 2021-12-02 12:54:56 -05:00
parent 862a84290f
commit 630e330f91
3 changed files with 24 additions and 0 deletions

View File

@ -36,6 +36,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
@ -197,6 +203,10 @@ outputs:
- null
- 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

@ -84,6 +84,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
@ -204,6 +210,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)