You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Get metrics of components

  1. get cpu-metrics of service component TASKTRACKER
    mr = mycluster.get_service("MAPREDUCE")
    mr_comp1 = mr.get_service_component('TASKTRACKER')
    metric_json = mr_comp1.get_metrics()
    print metric_json["metrics"]["cpu"]
    print"\n"
  2. get cpu-metrics from a host which has component NAMENODE
    host1 = mycluster.get_host('host1')
    nn = host1.get_host_component("NAMENODE")
    metric_json = nn.get_metrics()
    print metric_json["metrics"]["cpu"]
    print"\n"
  • No labels