Get metrics of components
Code Block language python title get cpu-metrics of service component TASKTRACKER firstline 1 linenumbers true 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"
Code Block language python title get cpu-metrics from a host which has component NAMENODE firstline 1 linenumbers true host1 = mycluster.get_host('host1') nn = host1.get_host_component("NAMENODE") metric_json = nn.get_metrics() print metric_json["metrics"]["cpu"] print"\n"