Home Forums Ambari host_status=UNHEALTHY, host_state=HEALTHY

This topic contains 1 reply, has 2 voices, and was last updated by  Yusaku Sako 4 months, 3 weeks ago.

  • Creator
  • #58017

    Hari Sekhon

    Can anyone explain the difference between host_status and host_state in the Ambari API, the API docs don’t differentiate them with meaningful description and as you can see below they seem in conflict for one of my hosts:

    curl -u $AMBARI_USER:$AMBARI_PASSWORD ‘http://<fqdn>:8080/api/v1/clusters/PoC/hosts/<fqdn>?fields=Hosts/host_state,Hosts/host_status’
    “href” : “http://<fqdn>:8080/api/v1/clusters/PoC/hosts/<fqdn>?fields=Hosts/host_state,Hosts/host_status”,
    “Hosts” : {
    “cluster_name” : “PoC”,
    “host_name” : “<fqdn>”,
    “host_state” : “HEALTHY”,
    “host_status” : “UNHEALTHY”


Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

  • Author
  • #58136

    Yusaku Sako

    “host_state” represents the health of the host itself, independent of the components on the host. HEALTHY means that the host is heartbeating with the server. HEARTBEAT_LOST means the server has not been receiving heartbeats from the host.
    “host_status” represents the overall health of the host considering the status of the components on the host, such as “Master Down” (UNHEALTHY), “Slave Down” (ALERT).
    So, it is possible for a host to have host_status==UNHEALTHY and host_state==HEALTHY

    I’ve filed a JIRA [1] to improve the Ambari API documentation [2] for clarifications as the documentation is clearly lacking.

    [1] https://issues.apache.org/jira/browse/AMBARI-6687
    [2] https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md

Viewing 1 replies (of 1 total)