Home Forums Ambari hdfs.audit.logger=INFO,console

This topic contains 5 replies, has 4 voices, and was last updated by  Jeff Sposetti 3 months, 3 weeks ago.

  • Creator
    Topic
  • #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.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #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.

    Collapse
    #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.

    Collapse
    #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

    Collapse
    #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

    Collapse
    #50174

    Kenny Zhang
    Moderator

    Hi Pavel,

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

    Thanks,
    Kenny

    Collapse
Viewing 5 replies - 1 through 5 (of 5 total)