Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

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
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat