<?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 List Hardware and Enviroment Information with the Ambari-REST-API in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230046#M67429</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I want to list relevant Hardware and environment Information of an Ambari-Server with usage of the Ambari-REST-API. Interesting may be the capacity of RAM, disk volume, remaining disk space, operation system, java version, ambari version, CPUs …&lt;BR /&gt;&lt;BR /&gt;Can you help me to find this Information in the REST-API?&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;&lt;BR /&gt;Dominik&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2017 21:14:36 GMT</pubDate>
    <dc:creator>dlu</dc:creator>
    <dc:date>2017-08-29T21:14:36Z</dc:date>
    <item>
      <title>List Hardware and Enviroment Information with the Ambari-REST-API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230046#M67429</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I want to list relevant Hardware and environment Information of an Ambari-Server with usage of the Ambari-REST-API. Interesting may be the capacity of RAM, disk volume, remaining disk space, operation system, java version, ambari version, CPUs …&lt;BR /&gt;&lt;BR /&gt;Can you help me to find this Information in the REST-API?&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;&lt;BR /&gt;Dominik&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 21:14:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230046#M67429</guid>
      <dc:creator>dlu</dc:creator>
      <dc:date>2017-08-29T21:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: List Hardware and Enviroment Information with the Ambari-REST-API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230047#M67430</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/31172/dlu.html" nodeid="31172"&gt;@Dominik Ludwig&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you have the ambari-agent also running on the ambari-server host then you can extract the informations using the following kind of API call for any host present in the cluster (including ambari server host)&lt;/P&gt;&lt;PRE&gt;# curl -sH "X-Requested-By: ambari" -u admin:admin &lt;A href="http://localhost:8080/api/v1/hosts/sandbox.hortonworks.com?fields=Hosts/disk_info,Hosts/rack_info,Hosts/host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/ip,Hosts/total_mem,Hosts/os_arch,Hosts/os_type" target="_blank"&gt;http://localhost:8080/api/v1/hosts/sandbox.hortonworks.com?fields=Hosts/disk_info,Hosts/rack_info,Hosts/host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/ip,Hosts/total_mem,Hosts/os_arch,Hosts/os_type&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -sH "X-Requested-By: ambari" -u admin:admin &lt;A href="http://localhost:8080/api/v1/hosts/sandbox.hortonworks.com?fields=Hosts/disk_info,Hosts/rack_info,Hosts/host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/ip,Hosts/total_mem,Hosts/os_arch,Hosts/os_type" target="_blank"&gt;http://localhost:8080/api/v1/hosts/sandbox.hortonworks.com?fields=Hosts/disk_info,Hosts/rack_info,Hosts/host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/ip,Hosts/total_mem,Hosts/os_arch,Hosts/os_type&lt;/A&gt;
{
  "href" : "http://localhost:8080/api/v1/hosts/sandbox.hortonworks.com?fields=Hosts/disk_info,Hosts/rack_info,Hosts/host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/ip,Hosts/total_mem,Hosts/os_arch,Hosts/os_type",
  "Hosts" : {
    "cluster_name" : "Sandbox",
    "cpu_count" : 4,
    "disk_info" : [
      {
        "available" : "12288100",
        "device" : "overlay",
        "used" : "30125548",
        "percent" : "72%",
        "size" : "44707764",
        "type" : "overlay",
        "mountpoint" : "/"
      },
      {
        "available" : "12288100",
        "device" : "/dev/sda3",
        "used" : "30125548",
        "percent" : "72%",
        "size" : "44707764",
        "type" : "ext4",
        "mountpoint" : "/hadoop"
      }
    ],
    "host_name" : "sandbox.hortonworks.com",
    "ip" : "172.17.0.2",
    "os_arch" : "x86_64",
    "os_type" : "centos6",
    "ph_cpu_count" : 4,
    "rack_info" : "/default-rack",
    "total_mem" : 8174640
  }
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please replace the  "http://localhost:8080/api/v1/hosts/sandbox.hortonworks.com"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;localhost &lt;/STRONG&gt;with your ambari server hostname.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sandbox.hortonworks.com&lt;/STRONG&gt; with any of your host of your ambari cluster which has the ambari agent is installed.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 22:58:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230047#M67430</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-29T22:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: List Hardware and Enviroment Information with the Ambari-REST-API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230048#M67431</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/31172/dlu.html" nodeid="31172"&gt;@Dominik Ludwig&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can extract more information's from the host if you do not apply the Fields filter:&lt;/P&gt;&lt;PRE&gt;# curl -sH "X-Requested-By: ambari" -u admin:admin &lt;A href="http://$AMBARI_SERVER:8080/api/v1/hosts/$HOST_TO_MONITOR" target="_blank"&gt;http://$AMBARI_SERVER:8080/api/v1/hosts/$HOST_TO_MONITOR&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please replace the "$HOST_TO_MONITOR" and  "$AMBARI_SERVER" with the appropriate FQDN (hostnames)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 23:07:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/List-Hardware-and-Enviroment-Information-with-the-Ambari/m-p/230048#M67431</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-29T23:07:03Z</dc:date>
    </item>
  </channel>
</rss>

