Skip to main content
Gold ⭐️⭐️
Dec 13, 2016 11:50 AM UTC

How to find the configuration changes using Ambari APIs ?

  • Oct 5, 2026 9:33 AM UTC
  • 0 replies
  • 2624 views
  • Translate All

- One approach can be to check the Ambari Blueprint to see what changes are made by comparing last two results. Following approach can be integrated inside a shell script (cronjob) to poll the config changes at some regular interval and to find the "diff" between current and last output files "/tmp/cluster-`date +'%Y%m%d%H%M'`.txt"

Example:

curl -o "/tmp/cluster-`date +'%Y%m%d%H%M'`.txt" -u admin:admin -H "X-Requested-By: ambari" -X GET http://c6401.ambari.apache.org:8080/api/v1/clusters/ClusterDemo?format=blueprint

.

- Users can also check the output of below REST call to browse "service_config_versions"

curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET http://c6401.ambari.apache.org:8080/api/v1/clusters/ClusterDemo/configurations/service_config_versions

.

Above would list the service config versions of all services. At any time users make the above call, it would provide the complete history of service config changes. For more information on this please refer to: https://cwiki.apache.org/confluence/display/AMBARI/Service+Config+Versions+API+usage