###API Summary
###Properties
Property | Description |
---|---|
Hosts/host_name | The host name |
Hosts/cluster_name | The name of the parent cluster |
Hosts/ip | The host ip address |
Hosts/total_mem | The total memory available on the host |
Hosts/cpu_count | The cpu count of the host |
Hosts/os_arch | The OS architechture of the host (e.g. x86_64) |
Hosts/os_type | The OS type of the host (e.g. centos6) |
Hosts/rack_info | The rack info of the host |
Hosts/last_heartbeat_time | The time of the last heartbeat from the host in milliseconds since Unix epoch |
Hosts/last_agent_env | Environment information from the host |
Hosts/last_registration_time | The time of the last registration of the host in milliseconds since Unix epoc |
Hosts/disk_info | The host disk information |
Hosts/host_status | The host status (UNKNOWN, HEALTHY, UNHEALTHY) |
Hosts/public_host_name | The public host name. Note that this property is typically populated during the creation of the host resource in a way that is particular to the environment. If the public hostname can not be determined then it will be the same as the host_name property. |
Hosts/host_state | The host state |
Hosts/desired_configs | The desired configurations |
###States
The current state of a host resource can be determined by looking at the Hosts/host_state property.
GET api/v1/clusters/c1/hosts/h1?fields=Hosts/host_state
200 OK
{
"href" : "your.ambari.server/api/v1/clusters/c1/hosts/h1?fields=Hosts/host_state",
"Hosts" : {
"cluster_name" : "c1",
"host_state" : "HEALTHY",
"host_name" : "h1"
}
}
The following table lists the possible values of the host resource Hosts/host_state.