Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari Metrics log4j properties

Ambari Metrics log4j properties

New Contributor

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

https://community.hortonworks.com/questions/85120/ambari-metrics-collector-logging.html
https://community.hortonworks.com/articles/50058/using-log4j-extras-how-to-rotate-as-well-as-zip-th....
https://logging.apache.org/log4j/extras/apidocs/org/apache/log4j/rolling/

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!

3 REPLIES 3

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.

Highlighted

Re: Ambari Metrics log4j properties

New Contributor

@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.

Don't have an account?
Coming from Hortonworks? Activate your account here