<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: how to check by API that all hosts are  are heart-beating in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-by-API-that-all-hosts-are-are-heart-beating/m-p/195152#M76155</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Something like this you can try:&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin  -H 'X-Requested-By: ambari' -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster?fields=hosts/Hosts/host_name,hosts/Hosts/host_state" | grep -B1 host_state
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin  -H 'X-Requested-By: ambari' -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster?fields=hosts/Hosts/host_name,hosts/Hosts/host_state" | grep -B1 HEARTBEAT_LOST

OUTPUT
-------
        "host_name" : "hdfcluster4.example.com",
        "host_state" : "HEARTBEAT_LOST"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;For healthy nodes we can grep like:&lt;/P&gt;&lt;PRE&gt;#   curl -u admin:admin  -H 'X-Requested-By: ambari' -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster?fields=hosts/Hosts/host_name,hosts/Hosts/host_state" | grep -B1 HEALTHY

OUTPUT
-------
        "host_name" : "hdfcluster1.example.com",
        "host_state" : "HEALTHY"
--
        "host_name" : "hdfcluster2.example.com",
        "host_state" : "HEALTHY"
--
        "host_name" : "hdfcluster3.example.com",
        "host_state" : "HEALTHY"
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Mar 2018 17:05:02 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-03-20T17:05:02Z</dc:date>
    <item>
      <title>how to check by API that all hosts are  are heart-beating</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-by-API-that-all-hosts-are-are-heart-beating/m-p/195151#M76154</link>
      <description>&lt;P&gt;what is the API or other CLI to check that all hosts in the cluster are without heart-beat loss ?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 16:30:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-by-API-that-all-hosts-are-are-heart-beating/m-p/195151#M76154</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-20T16:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to check by API that all hosts are  are heart-beating</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-by-API-that-all-hosts-are-are-heart-beating/m-p/195152#M76155</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Something like this you can try:&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin  -H 'X-Requested-By: ambari' -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster?fields=hosts/Hosts/host_name,hosts/Hosts/host_state" | grep -B1 host_state
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin  -H 'X-Requested-By: ambari' -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster?fields=hosts/Hosts/host_name,hosts/Hosts/host_state" | grep -B1 HEARTBEAT_LOST

OUTPUT
-------
        "host_name" : "hdfcluster4.example.com",
        "host_state" : "HEARTBEAT_LOST"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;For healthy nodes we can grep like:&lt;/P&gt;&lt;PRE&gt;#   curl -u admin:admin  -H 'X-Requested-By: ambari' -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster?fields=hosts/Hosts/host_name,hosts/Hosts/host_state" | grep -B1 HEALTHY

OUTPUT
-------
        "host_name" : "hdfcluster1.example.com",
        "host_state" : "HEALTHY"
--
        "host_name" : "hdfcluster2.example.com",
        "host_state" : "HEALTHY"
--
        "host_name" : "hdfcluster3.example.com",
        "host_state" : "HEALTHY"
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 17:05:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-by-API-that-all-hosts-are-are-heart-beating/m-p/195152#M76155</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-20T17:05:02Z</dc:date>
    </item>
  </channel>
</rss>

