Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-19932

[RHOSP 17.1] - Defining custom logging path for elasticsearch forwarding does not work as described in the guide

XMLWordPrintable

    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • None
    • CloudOps 2025 Sprint 21
    • 1
    • Moderate

      Defining custom logging path for elasticsearch forwarding does not work as described in the docs

      In this doc: https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html/managing_overcloud_observability/installing-and-configuring-the-logs-service_assembly#overriding-the-default-path-for-a-log-file_installing-and-configuring-the-logs-service

      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?

              rhn-engineering-vimartin Victoria Martinez de la Cruz
              mflusche@redhat.com Mathew Flusche
              rhos-conplat-observability
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: