linkedin / dr-elephant

Dr. Elephant is a job and flow-level performance monitoring and tuning tool for Apache Hadoop and Apache Spark
Apache License 2.0
1.35k stars 859 forks source link

Dr. Elephant - change the location of the logs directory #455

Open tomaszpapirzwierz opened 6 years ago

tomaszpapirzwierz commented 6 years ago

Is it possible to reconfigure Dr. Elephant so the logs are written under /var/log rather then to the default /usr/hdp/current/dr-elephant/logs location? Is creating a symbolic link enough?

ln -s /usr/hdp/current/dr-elephant/logs /var/log/dr-elephant

omicron8 commented 5 years ago
  1. Change log4j.appender.FA.File in ./conf/log4j.properties: log4j.appender.FA.File=/var/log/dr-elephant/dr_elephant.log
  2. Add the following parameters to jvm_args in ./app-conf/elephant.conf: -Dlog4j.configuration=file://$DRELEPHANT_HOME/conf/log4j.properties Should be like: jvm_args="-Dlog4j.configuration=file:///var/lib/dr-elephant-2.1.7/conf/log4j.properties -mem 1024 -J-Xloggc:$project_root/logs/dr-gc.date +'%Y%m%d%H%M' -J-XX:+PrintGCDetails"
  3. Restart dr-elephant
tomaszpapirzwierz commented 5 years ago

That's great, seems to be working! Thank you.