Back

Ambari


Ports:

8080 / http / Ambari Web and REST API
8440 / https / Ambari agent to server handshake
8441 / https / Registration and heartbeat

Manual Config Changes:

Use when ambari does not show relevant config or it's greyed out. Run this from ambari server host.

  • /var/lib/ambari-server/resources/scripts/configs.sh

Find all config types

curl -k -u admin:admin -H "X-Requested-By: ambari" -X GET  https://localhost:8443/api/v1/clusters/hdp11 | grep "\"type\"" | sort -u

List all hosts in cluster

curl -k -u admin:admin -H "X-Requested-By: ambari" -X GET  http://localhost:8080/api/v1/hosts | grep host_name | awk -F"\"" '{print $4}'

Search for available hive config

./configs.sh -u admin -p admin -port 8443 -s get localhost HDP11 hive-env hive_user

Update hive user (Restart hive afterwards)

./configs.sh -u admin -p admin -port 8443 -s set localhost HDP11 hive-env hive_user "hdp11-hive"


Delete Services From Ambari:

This is not possible from the GUI.
However, there is an API for it. Ideally run this from the ambari server host.

List ambari service groups

curl -k -u admin:admin -H "X-Requested-By: ambari" -X GET  https://localhost:8443/api/v1/clusters/hdp11/services/

Stop all Hbase services

curl -k -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' https://localhost:8443/api/v1/clusters/hdp11/services/HBASE

Remove Hbase

curl -k -u admin:admin -H "X-Requested-By: ambari" -X DELETE  https://localhost:8443/api/v1/clusters/hdp11/services/HBASE

NOTE: Before or after a DELETE operation logout from the GUI. Wait 5 minutes and then login to the GUI and check.