-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
2
-
False
-
-
False
-
?
-
None
-
-
-
-
CloudOps 2025 Sprint 21
-
1
-
Moderate
Defining custom logging path for elasticsearch forwarding does not work as described in the docs
Says the following
3. If you enabled centralized logging, you can use the following definition in a custom template to forward additional log files, for example, /var/log/messages: parameter_defaults: ExtraConfig: tripleo_logging_sources_messages: - tag: openstack.host.messages file: /var/log/host/messages startmsg.regex: "^[a-zA-Z]{3} [ 1-9][0-9] [:0-9]{8}"
However this does not work as described as there is no "messages" service. Looking at the code it seems it sets up elasticsearch config only for valid services defined in the tripleo "service_names" list
So the config for tripleo_logging_sources_SERVICE has to be associated to a valid SERVICE
A quick work-around without defining a new tripleo service would be add a config to an existing service that does not have logging defined and is used for each role. We verified this by using the 'timezone' service.
Example config that works:
ExtraConfig: tripleo_logging_sources_timezone: - tag: nbosdm.messages file: /var/log/containers/nbosdm/nbosdm.log startmsg.regex: "^[a-zA-Z]{3} [ 1-9][0-9] [:0-9]{8}" - tag: nbosdmapi.messages file: /var/log/containers/nbosdm/nbosdmapi.log startmsg.regex: "^[a-zA-Z]{3} [ 1-9][0-9] [:0-9]{8}"
Is there a better way to do this without stealing the logging config from a service that doesn't have logging defined?