Support Questions
Find answers, ask questions, and share your expertise

Ambari Metrics log4j properties

Ambari Metrics log4j properties

I am looking for ambari metrics logging policies.I found some of the links in hortonworks community

I am looking for other logging properties mentioned in ambari metrics which is not mentioned in above links. for e.g, log4j.appender.DRFA, log4j.appender.RFA.

What does all log properties means under ambari metrics -> config --> Advanced log4j.

What are the recommended properties for ambari metrics.

Retention policy of logging.

Do any one have any link from horton works community which can explain.

Appreciate your support. Thanks!


Re: Ambari Metrics log4j properties

Super Mentor

@Manisha Pande

Regarding your query: "Do any one have any link from horton works community which can explain."

>>> No i do not see any such Hortonworks Doc, because that is standard Log4j mechanism and appenders, hence we get get more detailed information from Apache Log4j documentation about the policies more.

However in general: "DRFA" is DailyRollingFileAppender means the logs will be rolled daily. (it's a time based log rotation appender)

The RFA stands for "Rolling File Appender" which is basically a Size based rolling file apender. If you will look at the Ambari UI "Advanced ams-hbase-log4j" then you will find that the "AMS HBase Log: backup file size". is set to 256 MB by default which means if you will use the RFA appender for logging then by default it will produce AMS HBase logging with max 256MB of log file size and after that it will rotate the log.
Similarly you will find another property inside the "Advanced ams-hbase-log4j" in ambari UI which is "AMS HBase Log: # of backup files" this propety is set to "20" by default means more than 20 backup rotated logs will not be maintained.


Regarding your query: "What are the recommended properties for ambari metrics." ?

>>> If you are asking for recommended properties of AMS logging config then In terms of Logging the default values that are set in the log4j properties should be good enough for almost every scenario. Customization of logging varies on requirement.

Re: Ambari Metrics log4j properties

@Jay Kumar SenSharma

Thanks for reply !!

Do we have any recommended documentation about what should be the idle backup log file, retention days ...etc.

Re: Ambari Metrics log4j properties

Super Mentor

@Manisha Pande

No for backup log and retention days there is not standard recommendation available. You can use the default values.

The reason why the recommendations are not available because log retention depends completely on the usability. like in a Test/Dev cluster we might not want to retain the log for longer time.

Also in some production environments it might be using tools like Splunk for keeping the log index. It also depends on how much logging is being generated by the components and then based on the Disk availability the log can be retained.