Support Questions

Find answers, ask questions, and share your expertise

Compare settings in different clusters

avatar
New Contributor

Hi,

we have multiple clusters which are managed by different instances of Cloudera Manager. It would be helpful to compare the complete configuration from the different cluster, i.e. to find out how the monitoring tresholds of service X is set in cluster A and cluster B.

 

I have already managed to receive the complete JSON config (api/v10/cm/deployment), but it does not help much to compare them (even with a specific JSON comparison tool), because it really is a complex file.

 

Does anyone has a good idea or some experience for this scenario?

 

Thanks a lot,

Silvan

1 ACCEPTED SOLUTION

avatar
Cloudera Employee

Hi All,

Unfortunately, other than CM API there is no feature in CM itself to compare the cluster configuration with other cluster managed by another CM instance.

In another case if you want compare the configuration settings for a particular service between two different clusters managed by same CM instance, you can do as per the steps given in the documentation here [1].

I suggest to go with CM CPI solution. You can use the CM API [2] to retrieve the full cluster configuration in JSON format including all hosts, clusters, services, roles, users, settings, etc. and use third party text compare tools like this [3] to compare them as text. It will highlight the difference in yellow. Another way is using diff command line.

 

e.g. CM API example for getting full cluster configuration in browser in JSON format

 

http://<your_cm_hostname>:7180/api/v12/cm/deployment

 

Get the full cluster configuration using the API from both the CM servers and put them into the text comparator.

 

I hope this will help.

 

Regards,

Salim
[1]
https://docs.cloudera.com/documentation/enterprise/5-13-x/topics/admin_compare_service_config_across...
[2] https://cloudera.github.io/cm_api/apidocs/v12/path__cm_deployment.html
[3] http://iblogbox.com/devtools/diff/

View solution in original post

4 REPLIES 4

avatar
Explorer

Hello Silvan,

 

I'm having the same issue but I'm trying to look at the python apis (https://cloudera.github.io/cm_api/docs/python-client/) to get the configs.

 

But this is not easy. I was wondering if you had any luck finding a solution.

 

Let me know if you can.

 

Thanks,

 

avatar
Hi Mike,

In Cloudera Manager 5.7 there is a new feature called Cluster Templates. It's not expressly designed for diffing, but by the nature of how it works, it will tend to normalize a lot of variance and likely be reasonable for doing a textual diff between two fairly similar clusters.

Export a template from both clusters and diff them.

You can read about it here:
https://www.cloudera.com/documentation/enterprise/latest/topics/install_cluster_template.html

Thanks,
Darren

avatar
Explorer
Hello Darren,

I did see that but was told it was not clusters managed by different CM's.
But I will definitely give it a shot.

Thanks,

avatar
Cloudera Employee

Hi All,

Unfortunately, other than CM API there is no feature in CM itself to compare the cluster configuration with other cluster managed by another CM instance.

In another case if you want compare the configuration settings for a particular service between two different clusters managed by same CM instance, you can do as per the steps given in the documentation here [1].

I suggest to go with CM CPI solution. You can use the CM API [2] to retrieve the full cluster configuration in JSON format including all hosts, clusters, services, roles, users, settings, etc. and use third party text compare tools like this [3] to compare them as text. It will highlight the difference in yellow. Another way is using diff command line.

 

e.g. CM API example for getting full cluster configuration in browser in JSON format

 

http://<your_cm_hostname>:7180/api/v12/cm/deployment

 

Get the full cluster configuration using the API from both the CM servers and put them into the text comparator.

 

I hope this will help.

 

Regards,

Salim
[1]
https://docs.cloudera.com/documentation/enterprise/5-13-x/topics/admin_compare_service_config_across...
[2] https://cloudera.github.io/cm_api/apidocs/v12/path__cm_deployment.html
[3] http://iblogbox.com/devtools/diff/