<?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 how to get status of components on specific datanode ( worker machine ) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184396#M73249</link>
    <description>&lt;P&gt;how to get status of components by REST API on specific datanode ( worker machine )&lt;/P&gt;&lt;P&gt;each datanode worker has the following components &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="45764-capture.png" style="width: 322px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18992iCE518A6BA3DB90E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="45764-capture.png" alt="45764-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;REST API should return the status only for the components as describe din the picture per worker machine&lt;/P&gt;&lt;P&gt;second&lt;/P&gt;&lt;P&gt;is it possible to get by REST API the status of datanode alive ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="45765-capture.png" style="width: 208px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18993i029D7905BC30DD5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="45765-capture.png" alt="45765-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 08:34:31 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2019-08-18T08:34:31Z</dc:date>
    <item>
      <title>how to get status of components on specific datanode ( worker machine )</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184396#M73249</link>
      <description>&lt;P&gt;how to get status of components by REST API on specific datanode ( worker machine )&lt;/P&gt;&lt;P&gt;each datanode worker has the following components &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="45764-capture.png" style="width: 322px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18992iCE518A6BA3DB90E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="45764-capture.png" alt="45764-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;REST API should return the status only for the components as describe din the picture per worker machine&lt;/P&gt;&lt;P&gt;second&lt;/P&gt;&lt;P&gt;is it possible to get by REST API the status of datanode alive ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="45765-capture.png" style="width: 208px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18993i029D7905BC30DD5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="45765-capture.png" alt="45765-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 08:34:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184396#M73249</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T08:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to get status of components on specific datanode ( worker machine )</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184397#M73250</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;In order to get the State of Each DataNode on different Nodes, you can use the following API call:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin  -X GET &lt;A href="http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state" target="_blank"&gt;http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin  -X GET &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state&lt;/A&gt;
{
  "href" : "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state",
  "ServiceComponentInfo" : {
    "cluster_name" : "plain_ambari",
    "component_name" : "DATANODE",
    "service_name" : "HDFS"
  },
  "host_components" : [
    {
      "href" : "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25101.example.com/host_components/DATANODE",
      "HostRoles" : {
        "cluster_name" : "plain_ambari",
        "component_name" : "DATANODE",
        "host_name" : "amb25101.example.com",
        "state" : "STARTED"
      }
    },
    {
      "href" : "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25102.example.com/host_components/DATANODE",
      "HostRoles" : {
        "cluster_name" : "plain_ambari",
        "component_name" : "DATANODE",
        "host_name" : "amb25102.example.com",
        "state" : "STARTED"
      }
    },
    {
      "href" : "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/DATANODE",
      "HostRoles" : {
        "cluster_name" : "plain_ambari",
        "component_name" : "DATANODE",
        "host_name" : "amb25103.example.com",
        "state" : "STARTED"
      }
    },
    {
      "href" : "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25104.example.com/host_components/DATANODE",
      "HostRoles" : {
        "cluster_name" : "plain_ambari",
        "component_name" : "DATANODE",
        "host_name" : "amb25104.example.com",
        "state" : "STARTED"
      }
    }
  ]
&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jan 2018 04:57:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184397#M73250</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-01-09T04:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to get status of components on specific datanode ( worker machine )</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184398#M73251</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And if you add&lt;STRONG&gt; "grep -A 1 host_name" &lt;/STRONG&gt;in the above API call then you can gt the output as following:&lt;/P&gt;&lt;PRE&gt;curl -i -H "X-Requested-By: ambari" -u admin:admin  -X GET &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name,host_components/HostRoles/state&lt;/A&gt;  | grep -A 1 host_name 

  "ServiceComponentInfo" : {
--
        "host_name" : "amb25101.example.com",
        "state" : "STARTED"
--
        "host_name" : "amb25102.example.com",
        "state" : "STARTED"
--
        "host_name" : "amb25103.example.com",
        "state" : "STARTED"
--
        "host_name" : "amb25104.example.com",
        "state" : "STARTED"&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Similarly you can Grep for Non Running DataNode from the above Output.&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 05:00:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184398#M73251</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-01-09T05:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to get status of components on specific datanode ( worker machine )</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184399#M73252</link>
      <description>&lt;P&gt;@Jay what about &amp;lt;matrix monitor&amp;gt; and &amp;lt;YARN&amp;gt; , meanwhile we see only the component - DATANODE&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 05:17:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184399#M73252</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-09T05:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to get status of components on specific datanode ( worker machine )</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184400#M73253</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For "Metrics Monitor" status you can alter the API call as following:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -i -H "X-Requested-By: ambari" -u admin:admin  -X GET &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/AMBARI_METRICS/components/METRICS_MONITOR?fields=host_components/HostRoles/host_name,host_components/HostRoles/state" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/AMBARI_METRICS/components/METRICS_MONITOR?fields=host_components/HostRoles/host_name,host_components/HostRoles/state&lt;/A&gt;  | grep -A 1 host_name &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;For Yarn Resources like "NODEMANAGER" you can do it like:  (Same logic you can apply for RESOURCEMANAGER, APP_TIMELINE_SERVER)&lt;/STRONG&gt;&lt;BR /&gt; &lt;/P&gt;&lt;PRE&gt;# curl -i -H "X-Requested-By: ambari" -u admin:admin  -X GET &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/YARN/components/NODEMANAGER?fields=host_components/HostRoles/host_name,host_components/HostRoles/state" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/YARN/components/NODEMANAGER?fields=host_components/HostRoles/host_name,host_components/HostRoles/state&lt;/A&gt;  | grep -A 1 host_name &lt;/PRE&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 05:26:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-get-status-of-components-on-specific-datanode-worker/m-p/184400#M73253</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-01-09T05:26:26Z</dc:date>
    </item>
  </channel>
</rss>

