Cloudera Manager Advent Calendar 2015の6日目です。
Cloudera Manager(以下CM)で管理しているクラスタのログは、デフォルトですべて/var/log以下に出力されますが、要件によっては任意のディレクトリに出力したいということもあるでしょう。本ポストでは変更方法について簡単に説明します。
CDHの各サービスのログ
各サービスの設定画面から「ログ」カテゴリに移動して変更するだけです。これは、CMのService MonitorやHost Monitorといったプロセスでも同様です。
CM Server、Agentのログ
CM Serverのログは/etc/default/cloudera-scm-serverにexport CMF_VAR=/任意の/ディレクトリを追加することで変更可能です。ディレクトリのオーナーはcloudera-scm、CM Serverの再起動が必要です。
参考:
Managing the Cloudera Manager Server Log
http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/cm_ag_view_server_logs.html
一方、CM Agentのログは/etc/cloudera-scm-agent/config.iniのlog_fileプロパティの値を変更します。CM Serverと同様、オーナーをcloudera-scmに変更してCM Agentの再起動が必要です。
参考:
Managing Cloudera Manager Agent Logs
http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/cm_ag_view_agent_logs.html
以上、今日はTips的な話でした。