Migrate Ambari Metrics data
Use the following steps to migrate data from the previous AMS schema to the new AMS schema.
- Ensure the Ambari Metrics System is started. If it is not, in the Ambari Web UI, click Ambari Metrics, then select Actions > Start.
- SSH into a host that is running a Metrics Collector. You can locate this host by going to the Ambari Web UI and clicking Hosts. Click on the Filter icon and type in "Metrics Collector: All" to find each host that has a Metrics Collector installed on it.
- SU to the Ambari Metrics user. This is 'ams' by default, but if you don’t know which user is configured in your cluster go to the Ambari Web UI and click Cluster Admin > Service Accounts, and then look for Ambari Metrics User. # su ams
Run the command to migrate data from the old Ambari Metrics schema to the new.
$ /usr/sbin/ambari-metrics-collector --config /etc/ambari-metrics-collector/conf/ upgrade_start /etc/ambari-metrics-collector/conf/metrics_whitelist
/usr/sbin/ambari-metrics-collector --config /etc/ambari-metrics-collector/conf/ upgrade_start /etc/ambari-metrics-collector/conf/metrics_whitelist "31556952000" "31556952000" is the amount of days in milliseconds to be preserved and 31556952000 stands for 1 year.
After the upgrade process has started, logs are available in the