Apache Ambari Operations
Also available as:
PDF
loading table of contents...

Configuring Log Settings

Ambari uses sets of properties called Log4j properties to control logging activities for each service running in your Hadoop cluster. Initial, default values for each property reside in a <service_name>-log4j template file. Log4j properties and values that limit the size and number of backup log files for each service appear above the log4j template file. To access the default Log4j settings for a service; in Ambari Web, browse to <Service_name> > Configs > Advanced <service_name>-log4j. For example, the Advanced yarn-log4j property group for the YARN service looks like:

To change the limits for the size and number of backup log files for a service:

Steps

  1. Edit the values for the <service_name> backup file size and <service_name> # of backup files properties.

  2. Click Save.

To customize Log4j settings for a service:

Steps

  1. Edit values of any properties in the <service_name> log4j template.

  2. Copy the content of the log4j template file.

  3. Browse to the custom <service_name>log4j properties group.

  4. Paste the copied content into the custom <service_name>log4j properties, overwriting, the default content.

  5. Click Save.

  6. Review and confirm any recommended configuration changes, as prompted.

  7. Restart affected services, as prompted.

Restarting components in the service pushes the configuration properties displayed in Custom log4j.properites to each host running components for that service.

If you have customized logging properties that define how activities for each service are logged, you see refresh indicators next to each service name after upgrading to Ambari 1.5.0 or higher. Ensure that logging properties displayed in Custom logj4.properties include any customization.

Optionally, you can create configuration groups that include custom logging properties.

More Information

Review and Confirm Configuration Changes

Restart Components

Adjust Smart Config Settings

Manage Host Config Groups