<?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 capture all ambari services/components status by API in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179701#M141947</link>
    <description>&lt;P&gt;Dear colleges&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want to capture all ambari services/components status by
API&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I need to do so because we developed some scripts that make
a lot of change in ambari configuration &amp;amp; restart of some services,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Therefore we need to know what is the services/components status before
the changes and what is the services status after the changes &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So we need rest API that will capture all ambari services/components
 status ( as HDFS, YARN Mapreduce , Tez
,Pig , Ziikeper , AMbari metrix , kafka , spark etc )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Expected results Status can be as – fail/ok&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2018 22:19:28 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2018-01-02T22:19:28Z</dc:date>
    <item>
      <title>how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179701#M141947</link>
      <description>&lt;P&gt;Dear colleges&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want to capture all ambari services/components status by
API&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I need to do so because we developed some scripts that make
a lot of change in ambari configuration &amp;amp; restart of some services,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Therefore we need to know what is the services/components status before
the changes and what is the services status after the changes &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So we need rest API that will capture all ambari services/components
 status ( as HDFS, YARN Mapreduce , Tez
,Pig , Ziikeper , AMbari metrix , kafka , spark etc )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Expected results Status can be as – fail/ok&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 22:19:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179701#M141947</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-02T22:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179702#M141948</link>
      <description>&lt;P&gt;You can refer to &lt;A href="https://community.hortonworks.com/articles/81353/popular-ambari-rest-api-commands.html" target="_blank"&gt;https://community.hortonworks.com/articles/81353/popular-ambari-rest-api-commands.html&lt;/A&gt; for commands relating to listing of various services etc. It also has link to other ambari API documentation&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 00:37:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179702#M141948</guid>
      <dc:creator>trupti</dc:creator>
      <dc:date>2018-01-03T00:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179703#M141949</link>
      <description>&lt;P&gt;not help , see the article its about stop/start others and not as I asked , what I am asking is how to get status from ambari about services / components , and get results as ok / fail  &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 00:42:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179703#M141949</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T00:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179704#M141950</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;You can get the state - STARTED/STOPPED by using the below API Calls&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;services&lt;/STRONG&gt;&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}/services/{service-name}?fields=ServiceInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/services/{service-name}?fields=ServiceInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;For &lt;STRONG&gt;components&lt;/STRONG&gt;&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}/components/{component-name}?fields=ServiceComponentInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components/{component-name}?fields=ServiceComponentInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get complete status info about &lt;STRONG&gt;service&lt;/STRONG&gt;&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}/services/{service-name}" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/services/{service-name}&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get complete status info about &lt;STRONG&gt;component&lt;/STRONG&gt;&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}/components/{component-name}" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components/{component-name}&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Replace the place holders like {ambari-username} , {ambari-password}, {ambari-host} , {ambari-port},{clustername} etc with your respective values&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 00:51:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179704#M141950</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-03T00:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179705#M141951</link>
      <description>&lt;P&gt;ok fine , how to get all list of services / components by API in order to use them for the API that U gave me &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 01:11:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179705#M141951</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T01:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179706#M141952</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;P&gt;To get list of services&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}/services/{service-name}" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/services/{service-name}&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get list of components&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}/components/" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components/&lt;/A&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jan 2018 01:19:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179706#M141952</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-03T01:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179707#M141953</link>
      <description>&lt;P&gt;I see little problem for example when I check the HDFS with complete status , I not see the status of "stand by namenode" or "ZKfailovercontroler" etc   , and for example for YARN we not see the &lt;A href="http://10.164.235.62:8080/#"&gt;App Timeline Server &lt;/A&gt; etc&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;TABLE style="font-size: 15px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 03 Jan 2018 01:20:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179707#M141953</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T01:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179708#M141954</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;P&gt;You can get the service components status from the "ServiceComponentInfo/state" parameter.&lt;/P&gt;&lt;P&gt;1. To get all components state in single API:&lt;/P&gt;&lt;P&gt;API : &amp;lt;AMBARI_HOST&amp;gt;/api/v1/clusters/cl1/components?fields=ServiceComponentInfo/state&lt;/P&gt;&lt;P&gt;E.g In the response you can find something like this when MR History server is stopped:&lt;/P&gt;&lt;PRE&gt;"ServiceComponentInfo": {"cluster_name": "cl1","component_name": "HISTORYSERVER","service_name": "MAPREDUCE2","state": "INSTALLED"}&lt;/PRE&gt;&lt;P&gt;2. To get more info for individual component, You can use this API resource&lt;/P&gt;&lt;P&gt;&amp;lt;AMBARI_HOST&amp;gt;/api/v1/clusters/cl1/services/MAPREDUCE2/components/HISTORYSERVER&lt;/P&gt;&lt;P&gt;Hopefully this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 05:48:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179708#M141954</guid>
      <dc:creator>kramakrishnan</dc:creator>
      <dc:date>2018-01-03T05:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179709#M141955</link>
      <description>&lt;P&gt;thank you &lt;A href="https://community.hortonworks.com/users/2824/kramakrishnan.html"&gt;kramakrishnan&lt;/A&gt; , regarding step1 can you please show me the full command API syntax&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:13:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179709#M141955</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T13:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179710#M141956</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;To get status of all services&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}/services?fields=ServiceInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/services?fields=ServiceInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get status of all components&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}/components?fields=ServiceComponentInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components?fields=ServiceComponentInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Replace the placeholders&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:20:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179710#M141956</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-03T13:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179711#M141957</link>
      <description>&lt;P&gt;@Aditya thank you , but this output not include the status of for example- Standby NameNode or ZKFailoverController  etc ....  , also &lt;A href="https://community.hortonworks.com/users/2824/kramakrishnan.html"&gt;kramakrishnan&lt;/A&gt; wrote some syntax that can give the results but I will happy to get the full syntax with curl ...&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 17:02:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179711#M141957</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T17:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179712#M141958</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; ZKFailoverController is listed as ZKFC in the above API call response. If you want to get the status of ZKFailoverController , you can call this below API&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}/components/ZKFC?fields=ServiceComponentInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components/ZKFC?fields=ServiceComponentInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;The status of Standby NameNode and Active Namenode will be represented together as NameNode. If you want to know the active and standby namenodes, you can use these below API calls&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;active Namenode:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/host_components?HostRoles/component_name=NAMENDE&amp;amp;metrics/dfs/FSNamesystem/HAState=active"&lt;/PRE&gt;&lt;P&gt;For &lt;STRONG&gt;standby namenode:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby"&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 18:46:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179712#M141958</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-03T18:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179713#M141959</link>
      <description>&lt;P&gt;@Aditya &lt;/P&gt;&lt;P&gt;first thank you so much for the example  , the API are works and indicate the machine name but not indicate the status stop/start from output &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:32:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179713#M141959</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T20:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179714#M141960</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;There will not be separate status for Active NameNode and StandByNamenode. You can find if name node is running or not. To get the status of NAMENODE  use the below API&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}/components/NAMENODE?fields=ServiceComponentInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components/NAMENODE?fields=ServiceComponentInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:38:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179714#M141960</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-03T20:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179715#M141961</link>
      <description>&lt;P&gt;example&lt;/P&gt;&lt;PRE&gt; curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://localhost:8080/api/v1/clusters/hdp/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby"
{
  "href" : "http://localhost:8080/api/v1/clusters/hdp/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby",
  "items" : [
    {
      "href" : "http://localhost:8080/api/v1/clusters/hdp/hosts/master01.uridns.com/host_components/NAMENODE",
      "HostRoles" : {
        "cluster_name" : "hdp",
        "component_name" : "NAMENODE",
        "host_name" : "master01.uhg.com"
      },
      "host" : {
        "href" : "http://localhost:8080/api/v1/clusters/hdp/hosts/master01.uhg.com"
      },
      "metrics" : {
        "dfs" : {
          "FSNamesystem" : {
            "HAState" : "standby"
          }
        }
      }
    }
  ]&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:42:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179715#M141961</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T20:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179716#M141962</link>
      <description>&lt;P&gt;ok , in that case what are the other alternative to check ( active/stand name node or App Timeline Server ) etc , because they not  appears from the API , not logical to check them only from the Ambari GUI must be some way for that &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 21:07:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179716#M141962</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T21:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179717#M141963</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;You can make use of the following Ambari API calls to findout Active/Standby NameNodes.&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby"


# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active"&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Please replace the following in the above queries.&lt;BR /&gt;&lt;BR /&gt;erie1.exmple.com =&amp;gt; Your Ambari Server FQDN&lt;BR /&gt;ErieCluster =&amp;gt; Your clustername&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 21:30:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179717#M141963</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-01-03T21:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179718#M141964</link>
      <description>&lt;P&gt;dear @Jay , yes we see the machine that is active or stand by but the problem is that we not get the status as fail or OK &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 21:55:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179718#M141964</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-03T21:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179719#M141965</link>
      <description>&lt;PRE&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/PRE&gt;&lt;P&gt;To get state of &lt;STRONG&gt;Active Namenode&lt;/STRONG&gt;&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/{active-namenode-host-name}/host_components/NAMENODE?fields=HostRoles/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/hosts/{active-namenode-host-name}/host_components/NAMENODE?fields=HostRoles/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get state of &lt;STRONG&gt;StandBy Namenode&lt;/STRONG&gt;&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/{standby-namenode-host-name}/host_components/NAMENODE?fields=HostRoles/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/hosts/{standby-namenode-host-name}/host_components/NAMENODE?fields=HostRoles/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get state of &lt;STRONG&gt;App Timeline Server&lt;/STRONG&gt;&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}/components/APP_TIMELINE_SERVER?fields=ServiceComponentInfo/state" target="_blank"&gt;http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/components/APP_TIMELINE_SERVER?fields=ServiceComponentInfo/state&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Note that you have to replace Active Namenode and standby Namenode hostnames in the URLs&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 22:32:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179719#M141965</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-03T22:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture all ambari services/components status by API</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179720#M141966</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;PRE&gt;curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET &lt;A href="http://localhost:8080/api/v1/clusters/cl1/components?fields=ServiceComponentInfo/state" target="_blank"&gt;http://localhost:8080/api/v1/clusters/cl1/components?fields=ServiceComponentInfo/state&lt;/A&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 05:55:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-capture-all-ambari-services-components-status-by-API/m-p/179720#M141966</guid>
      <dc:creator>kramakrishnan</dc:creator>
      <dc:date>2018-01-04T05:55:08Z</dc:date>
    </item>
  </channel>
</rss>

