このコンテンツは選択した言語では利用できません。

8.8.2. Enabling Syslog for Node Components


You can configure node hosts to send node platform and Apache logs to Syslog instead of writing to their default log file locations. After enabling Syslog logging, messages from the various node components are grouped and sent to the configured Syslog implementation. This method of aggregating log messages gives you the option to further configure your Syslog implementation to send logs directly to a remote logging server or monitoring solution without the messages being written locally to disk.

Note

Instructions for configuring a Syslog implementation to route to alternate destinations, such as a remote logging server, are outside of the scope of this guide. The implementation provided by Red Hat Enterprise Linux 6 is Rsyslog, which writes to the /var/log/messages file by default. See the Red Hat Enterprise Linux 6 Deployment Guide for information on viewing and managing log files if using Rsyslog.

Procedure 8.4. To Enable Syslog for Apache:

  1. Configure Apache to send log messages to Syslog by adding the following option in the /etc/sysconfig/httpd file:
    OPTIONS="-DOpenShiftFrontendSyslogEnabled"
    Copy to Clipboard Toggle word wrap

    Important

    All options must be on the same line. For example, in Section 8.5.2, “Enabling Application and Gear Context in Node Component Logs” 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:
    # service httpd restart
    Copy to Clipboard Toggle word wrap

Procedure 8.5. To Enable Syslog for the Node Platform:

  1. Configure the node platform to send log messages to Syslog by editing the /etc/openshift/node.conf file. Add the following line and any or all of the described optional settings that follow:
    PLATFORM_LOG_CLASS=SyslogLogger
    Copy to Clipboard Toggle word wrap
    Optional Threshold Setting:

    Add the following line to include messages with priorities up to and including the set threshold. Replace priority in the following line with one of the levels listed at http://ruby-doc.org/stdlib-1.9.3/libdoc/syslog/rdoc/Syslog.html#method-c-log:

    PLATFORM_SYSLOG_THRESHOLD=priority
    Copy to Clipboard Toggle word wrap

    Optional Trace Log Setting:

    Add the following line to include trace logs that were previously directed to the default /var/log/openshift/node/platform-trace.log file:

    PLATFORM_SYSLOG_TRACE_ENABLED=1
    Copy to Clipboard Toggle word wrap

  2. Restart the ruby193-mcollective service for the node platform changes to take effect:
    # service ruby193-mcollective restart
    Copy to Clipboard Toggle word wrap
  3. When Syslog support is enabled for the node platform, the local0 Syslog facility is used to log messages. By default, the /etc/rsyslog.conf file does not log platform debug messages. If you are using Rsyslog as your Syslog implementation, add the following line to the /etc/rsyslog.conf file to enable platform debug message logging. If necessary, replace /var/log/messages with your chosen logging destination:
    local0.*;*.info;mail.none;authpriv.none;cron.none /var/log/messages
    Copy to Clipboard Toggle word wrap
    Then restart the rsyslog service:
    # service rsyslog restart
    Copy to Clipboard Toggle word wrap
    With this change, all log messages using the local0 facility are sent to the configured logging destination.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat