Este contenido no está disponible en el idioma seleccionado.

8.5.2. Enabling Application and Gear Context in Node Component Logs


Further context, such as application names and gear UUIDs, can be included in log messages from node components, which adds visibility by associating entries with specific applications or gears. This can also improve the ability to correlate log entries using reference IDs from the broker.

Procedure 8.1. To Enable Application and Gear Context in Apache Logs:

  1. Configure Apache to include application names and gear UUIDs in its log messages by editing the /etc/sysconfig/httpd file and adding the following line:
    OPTIONS="-DOpenShiftAnnotateFrontendAccessLog"
    Copy to Clipboard Toggle word wrap

    Important

    All options must be on the same line. For example, in Section 8.8.2, “Enabling Syslog for Node Components” another option for Apache log files is explained. If both options are desired, the line must use the following syntax:
    OPTIONS="-Option1 -Option2"
    Copy to Clipboard Toggle word wrap
  2. Restart the httpd service for the Apache changes to take effect for new applications:
    # service httpd restart
    Copy to Clipboard Toggle word wrap

Procedure 8.2. To Enable Application and Gear Context in Node Platform Logs:

  1. Configure the node platform to include application and gear context in its log messages by editing the /etc/openshift/node.conf file and adding the following line:
    PLATFORM_LOG_CONTEXT_ENABLED=1
    Copy to Clipboard Toggle word wrap
  2. Add the following line to specify which attributes are included. Set any or all of the following options in a comma-delimited list:
    PLATFORM_LOG_CONTEXT_ATTRS=request_id,container_uuid,app_uuid
    Copy to Clipboard Toggle word wrap
    This produces key-value pairs for the specified attributes. If no context attribute configuration is present, all context attributes are printed.
  3. Restart the ruby193-mcollective service for the node platform changes to take effect:
    # service ruby193-mcollective restart
    Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat