Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

E.g.: Dashboard metrics : Fetch load average across all nodes of a cluster

http://<ambari-server>:8080/api/v1/clusters/<cluster-name>?fields=metrics/load[1430844925,1430848525,15]&_=1430848532904

The above API call retrieves the load average, aggregated across all hosts in the cluster.

...

E.g.: Host metrics: Get the cpu utilization on a particular host in the cluster

http://<ambari-server>:8080/api/v1/clusters/<cluster-name>/hosts/<host-name>?fields=metrics/cpu/cpu_user[1430844610,1430848210,15],metrics/cpu/cpu_wio[1430844610,1430848210,15],metrics/cpu/cpu_nice[1430844610,1430848210,15],metrics/cpu/cpu_aidle[1430844610,1430848210,15],metrics/cpu/cpu_system[1430844610,1430848210,15],metrics/cpu/cpu_idle[1430844610,1430848210,15]&_=1430848217591

The above API call retrieves all cpu related metrics required to chart out cpu utilization on a host page.

...

E.g.: Service metrics: Get the capacity utilization metrics aggregated across all datanodes but only the latest value (point in time)

 http://<ambari-server>:8080/api/v1/clusters/<cluster-name>/services/HDFS/components/DATANODE?fields=metrics/dfs/datanode/DfsUsed,metrics/dfs/datanode/Capacity&_=1430849798630

The above API call retrieves two metrics values which represent the point in time metric value for the requested metrics obtained for the Metrics Service backend. (non JMX)

...

E.g.: Daemon metrics: Get the heap memory usage for active Namenode

http://<ambari-server>:8080/api/v1/clusters/<cluster-name>/hosts/<host-name>/host_components/NAMENODE?fields=metrics/jvm/memHeapCommittedM[1430847303,1430850903,15],metrics/jvm/memHeapUsedM[1430847303,1430850903,15]&_=1430850903846

The above API call retrieves JVM heap metrics for the Active Namenode in the cluster.

...