Ambari Forum

hdfs.audit.logger=INFO,console

  • #49342
    Pavel Hladik
    Participant

    Hi,

    not sure if pasting to right section of forum. I would like to change value of hdfs.audit.logger=INFO,console in log4j.properties to hdfs.audit.logger=WARNING,console. If I do change manually on all master and slave nodes, in next services start all log4j.properties are overwritten and my setting is lost.

    Please give me advice where to change it? Thanks you.

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #50174
    Kenny Zhang
    Moderator

    Hi Pavel,

    Could you please let us know what’s the version of Ambari you are using?

    Thanks,
    Kenny

    #50177
    Pavel Hladik
    Participant

    Hi Kenny,

    I found out that WARNING is not right property, I’m using istead WARN, but it doesn’t help as well. I went through all config files and I see there is INFO logging hardcoded to env files etc. I’m using latest Ambari 1.4.4.23.

    Regards,

    Pavel

    #50178
    Kenny Zhang
    Moderator

    Hi Pavel,

    If you’re using Ambari 1.4.4, it’ll still overwrite the value of hadoop-env.sh during the service restart.
    I sugget you can modify the below file for hdfs.audit.logger directly:
    /var/lib/ambari-agent/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb

    Please restart HDFS service to apply the change.

    Thanks,
    Kenny

    #55188
    btq2014
    Participant

    I’m using Ambari 1.6. I modified to WARN hdfs.audit.logger in /var/lib/ambari-agent/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb but the INFO lines still appear. I restarted HDFS as requested. Any other place that should get modified? Thanks.

    #55222
    Jeff Sposetti
    Moderator

    For Ambari 1.6.0, make the template modification on Ambari Server /var/lib/ambari-server/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-env.sh.j2

    Make mods to this file only on the Ambari Server and it will get re-distributed to the agents after you do Ambari Server restart. You don’t need to edit files on the agents. And you don’t need to edit any of the puppet files any longer. They are not being used (as of Ambari 1.5.0).

    But also you’ll find log4.properties is now available from the UI and REST API to modify for each Service. Log into Ambari Web and browse to Services > HDFS > Configs. Scroll down and you’ll see the log4.properties section. You can modify that file there and it will be distributed with the configs.

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.