Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ambari metrics + change the path of hbase.rootdir because local disk not have space

avatar

hi all



in ambari metrics configuration , we have the following

hbase.rootdir=/var/lib/ambari-metrics-collector/hbase

since /var is 97%

we want to replace the path to the new disk ( that mounted to data_metrics folder )

as the following:

hbase.rootdir=/data_metrics/lib/ambari-metrics-collector/hbase

can we just change the path and restart the metrics service ?

so all metrics data will be under - /data_metrics/lib/ambari-metrics-collector/hbase

instead of - /var/lib/ambari-metrics-collector/hbase ?



Michael-Bronson
1 ACCEPTED SOLUTION

avatar

HI @Michael Bronson ,


Referring to your doubt of Changing the hbase.rootdir

Please follow the following steps and let me know if this helps ( I am assuming that you need to preserve all the Previously collected metrics )


Steps


1)Stop ambari-metrics

2) Copy the contents of /var/lib/ambari-metrics-collector/ to the New directory you want to set as new

for ex :

cd /var/lib/ambari-metrics-collector/
mv hbase hbase-tmp/ /tmp/ambari-metrics-collector/

3) go to ambari-ui->services->ambari-metrics->config -> search for hbase.rootdir and hbase.tmpdir and change it accordingly as per new Folder sctructure.

4) Start ambari-metrics collector

5) you can see AMS has successfully using the new Hbase dir and also the old matrics are preserved


Let me know if this helps. Please accept the answer if it did.



View solution in original post

3 REPLIES 3

avatar

HI @Michael Bronson ,


Referring to your doubt of Changing the hbase.rootdir

Please follow the following steps and let me know if this helps ( I am assuming that you need to preserve all the Previously collected metrics )


Steps


1)Stop ambari-metrics

2) Copy the contents of /var/lib/ambari-metrics-collector/ to the New directory you want to set as new

for ex :

cd /var/lib/ambari-metrics-collector/
mv hbase hbase-tmp/ /tmp/ambari-metrics-collector/

3) go to ambari-ui->services->ambari-metrics->config -> search for hbase.rootdir and hbase.tmpdir and change it accordingly as per new Folder sctructure.

4) Start ambari-metrics collector

5) you can see AMS has successfully using the new Hbase dir and also the old matrics are preserved


Let me know if this helps. Please accept the answer if it did.



avatar

do you mean to copy the folder /var/lib/ambari-metrics-collector/hbase to the new path - /data_metrics/lib/ambari-metrics-collector/


as


mv /var/lib/ambari-metrics-collector/hbase /data_metrics/lib/ambari-metrics-collector/ 
Michael-Bronson

avatar

you should be copying the directory structure as it is . Create folder hbase and hbase in /data_metrics/lib/ambari-metrics-collector/ and copy the contents from other place as it is.