Skip to main content

5 replies

jsensharma
Platinum ⭐️⭐️
Platinum ⭐️⭐️
January 21, 2019
jsensharma
Platinum ⭐️⭐️
Platinum ⭐️⭐️
January 21, 2019

@Michael Bronson

Example: Please check the "HAState" field value.

# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&metrics/dfs/FSNamesystem/HAState=active"

.

Output:

{
"href" : "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&metrics/dfs/FSNamesystem/HAState=active",
"items" : [
{
"href" : "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/hosts/hdfcluster1.example.com/host_components/NAMENODE",
"HostRoles" : {
"cluster_name" : "TestCluster",
"component_name" : "NAMENODE",
"host_name" : "hdfcluster1.example.com"
},
"host" : {
"href" : "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/hosts/hdfcluster1.example.com"
},
"metrics" : {
"dfs" : {
"FSNamesystem" : {
"HAState" : "active"
}
}
}
}
]
}

.

Translate