<?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 API + show component status in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205798#M73995</link>
    <description>&lt;P&gt;why API not capture the real status of component&lt;/P&gt;&lt;P&gt;for example by this API ( example down ) we capture the status of APP_TIMELINE_SERVER &lt;/P&gt;&lt;P&gt;component and its show the component started ( "state":"STARTED", ) &lt;/P&gt;&lt;P&gt;but in fact the real status from ambari is STOP&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="59387-capture.png" style="width: 459px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17070i071E2F6EB494CA37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="59387-capture.png" alt="59387-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;curl -u $USER:$PASSWORD -H "X-Requested-By: ambari" -X GET &lt;A href="http://localhost:8080/api/v1/clusters/HDP/components/APP_TIMELINE_SERVER" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/api/v1/clusters/HDP/components/APP_TIMELINE_SERVER&lt;/A&gt;
{
  "href" : "http://localhost:8080/api/v1/clusters/HDP/components/APP_TIMELINE_SERVER",
  "ServiceComponentInfo" : {
    "category" : "MASTER",
    "cluster_name" : "HDP",
    "component_name" : "APP_TIMELINE_SERVER",
    "display_name" : "App Timeline Server",
    "init_count" : 0,
    "install_failed_count" : 0,
    "installed_count" : 1,
    "recovery_enabled" : "true",
    "service_name" : "YARN",
    "started_count" : 0,
    "state" : "STARTED",
    "total_count" : 1,
    "unknown_count" : 0
  },
  "host_components" : [
    {
      "href" : "http://localhost:8080/api/v1/clusters/HDP/hosts/master01.sys67.com/host_components/APP_TIMELINE_SERVER",
      "HostRoles" : {
        "cluster_name" : "HDP",
        "component_name" : "APP_TIMELINE_SERVER",
        "host_name" : "master01.sys67.com"
      }
    }
  ]&lt;/PRE&gt;&lt;P&gt;so how it can be?&lt;/P&gt;&lt;P&gt;why API show different the Ambari GUI?&lt;/P&gt;&lt;P&gt;or maybe what is wrong with my API syntax ?&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 04:47:03 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2019-08-18T04:47:03Z</dc:date>
    <item>
      <title>API + show component status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205798#M73995</link>
      <description>&lt;P&gt;why API not capture the real status of component&lt;/P&gt;&lt;P&gt;for example by this API ( example down ) we capture the status of APP_TIMELINE_SERVER &lt;/P&gt;&lt;P&gt;component and its show the component started ( "state":"STARTED", ) &lt;/P&gt;&lt;P&gt;but in fact the real status from ambari is STOP&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="59387-capture.png" style="width: 459px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17070i071E2F6EB494CA37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="59387-capture.png" alt="59387-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;curl -u $USER:$PASSWORD -H "X-Requested-By: ambari" -X GET &lt;A href="http://localhost:8080/api/v1/clusters/HDP/components/APP_TIMELINE_SERVER" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/api/v1/clusters/HDP/components/APP_TIMELINE_SERVER&lt;/A&gt;
{
  "href" : "http://localhost:8080/api/v1/clusters/HDP/components/APP_TIMELINE_SERVER",
  "ServiceComponentInfo" : {
    "category" : "MASTER",
    "cluster_name" : "HDP",
    "component_name" : "APP_TIMELINE_SERVER",
    "display_name" : "App Timeline Server",
    "init_count" : 0,
    "install_failed_count" : 0,
    "installed_count" : 1,
    "recovery_enabled" : "true",
    "service_name" : "YARN",
    "started_count" : 0,
    "state" : "STARTED",
    "total_count" : 1,
    "unknown_count" : 0
  },
  "host_components" : [
    {
      "href" : "http://localhost:8080/api/v1/clusters/HDP/hosts/master01.sys67.com/host_components/APP_TIMELINE_SERVER",
      "HostRoles" : {
        "cluster_name" : "HDP",
        "component_name" : "APP_TIMELINE_SERVER",
        "host_name" : "master01.sys67.com"
      }
    }
  ]&lt;/PRE&gt;&lt;P&gt;so how it can be?&lt;/P&gt;&lt;P&gt;why API show different the Ambari GUI?&lt;/P&gt;&lt;P&gt;or maybe what is wrong with my API syntax ?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:47:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205798#M73995</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T04:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: API + show component status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205799#M73996</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;I'm not sure why the above API is returning different status. It may be a bug. You can use this API to get the correct status&lt;/P&gt;&lt;PRE&gt;curl -u {ambari-username}:{ambari-password} -H "X-Requested-By: ambari" -X GET &lt;A href="http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/hosts/{host-name}/host_components/APP_TIMELINE_SERVER?fields=HostRoles/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/hosts/{host-name}/host_components/APP_TIMELINE_SERVER?fields=HostRoles/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Replace the place holders. {host-name} should be replaced with the hostname of the APP TIMELINE SERVER.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 16:42:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205799#M73996</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-29T16:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: API + show component status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205800#M73997</link>
      <description>&lt;P&gt;what need to put in - {host-name}   , ( we already set the hostname in ambari-host ) &lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:14:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205800#M73997</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-29T17:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: API + show component status</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205801#M73998</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;Replace {host-name} with the host name where App timeline server is installed. From your output in the question looks like App time line server is installed on "master01.sys67.com". So you can try this url&lt;/P&gt;&lt;PRE&gt;curl -u $USER:$PASSWORD -X GET -H "X-Requested-By: ambari" &lt;A href="http://localhost:8080/api/v1/clusters/HDP/hosts/master01.sys67.com/host_components/APP_TIMELINE_SERVER?fields=HostRoles/state" target="_blank"&gt;http://localhost:8080/api/v1/clusters/HDP/hosts/master01.sys67.com/host_components/APP_TIMELINE_SERVER?fields=HostRoles/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:33:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/API-show-component-status/m-p/205801#M73998</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-29T17:33:53Z</dc:date>
    </item>
  </channel>
</rss>

