标签:history http hdp 历史 for rom site bar 不同
1.获取指定主机指定组件的信息列表
http://ip:8080/api/v1/clusters/hdp_dev/hosts/hadoop003.edcs.org/host_components/DATANODE
2.获取主机列表
http://ip:8080/api/v1/clusters/hdp_dev/hosts
3.获取主机的各种状态
http://ip:8080/api/v1/clusters/hdp_dev/hosts/hadoop002.edcs.org?fields=Hosts/total_mem
注意:最后一个参数还可以换成"host_state", 用来判断机器健康状态 : "HEALTHY/HEARTBEAT_LOST
4.获取服务状态
http://ip:8080/api/v1/clusters/hdp_dev/services/HDFS
5.获取组件信息
http://ip:8080/api/v1/clusters/hdp_dev/services/HDFS/components/NAMENODE
6.获取指定主机上的服务
http://ip:8080/api/v1/clusters/hdp_dev/hosts/hadoop002.edcs.org
7.获取服务状态
http://ip:8080/api/v1/clusters/c1/services/HDFS?fields=ServiceInfo/state
8.获取集群摘要
http://ip:8080/api/v1/clusters/hdp_dev/alerts?format=summary
8.获取不同服务的历史告警信息,括号里面的服务可以是集群中的各种服务
http://ip:8080/api/v1/clusters/c1/alert_history?(AlertHistory/service_name.in(HDFS,YARN))
9.获取不同状态下的服务列表
http://ip:8080/api/v1/clusters/hdp_dev/alert_history?(AlertHistory/state=CRITICAL)&fields=*&from=start&page_size=100 http://ip:8080/api/v1/clusters/hdp_dev/alert_history?(AlertHistory/state=UNKNOWN)&fields=*&from=start&page_size=100 http://ip:8080/api/v1/clusters/hdp_dev/alert_history?(AlertHistory/state=WARNING)&fields=*&from=start&page_size=100
10.获取服务的告警信息
http://ip:8080/api/v1/clusters/hdp_dev/services/HDFS/alerts
11.获取所有的集群配置信息
curl -u hdp:hdp@2017 -H "X-Requested-By: ambari" -X GET http://hadoop001.edcs.org:8080/api/v1/clusters/hdp_dev/configurations
12.获取指定类型的配置信息:例如:core-site.xml
curl -u hdp:hdp@2017 -H "X-Requested-By: ambari" -X GET http://hadoop001.edcs.org:8080/api/v1/clusters/hdp_dev/configurations?type=core-site&tag=version1
标签:history http hdp 历史 for rom site bar 不同
原文地址:http://www.cnblogs.com/itboys/p/7004148.html