Created on
10-20-2019
11:22 PM
- last edited on
10-21-2019
02:02 AM
by
VidyaSargur
What are the possible ways to move Grafana from one host to another?
Created 05-20-2020 04:33 AM
Hi, did you found out how can we move grafana from one host to another in Hortonworks Cluster
Created 05-22-2020 09:42 PM
To migrate Grafana to another host, first we need to remove the Grafana service from one node and then need to re-install it on another node. We can do the below steps:
1. Take backup of Ambari Database
2. Add the component to a new Node using the following API:
curl --user username:password -H 'X-Requested-By: ambari' -i -X POST http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/NEW_HOST_NAME/host_components/COMPONENTNAME
For Example, to add Grafana:
curl --user admin:admin -H 'X-Requested-By: ambari' -i -X POST http://<ambari-server-host>:8080/api/v1/clusters/MyLabCluster/hosts/SecondLabNode02.cloudera.com/host_components/METRICS_GRAFANA
3. Go to Ambari Hosts tab and click on the node where the Component has been added using the above API
4. The current status of the Component would be Install Pending
5. Click on Install Pending and select Re-intall to complete the installation
6. Once the above is completed, Start the service using Ambari Service UI.
7. Stop the Service using Ambari Service UI. ( Grafana service on old Host )
8. Remove the component using the following Ambari API call:
curl -u username:password -H 'X-Requested-By: ambari' -X DELETE http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/OLD_HOSTNAME/host_components/COMPONENTNAME
For example, if Grafana is to be removed,
curl --user admin:admin -H 'X-Requested-By: ambari' -X DELETE http://<ambari-server-host>:8080/api/v1/clusters/MyLabCluster/hosts/FirstLabNode01.cloudera.com/host_components/METRICS_GRAFANA