ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GUO JUN" <122512...@qq.com>
Subject Customize Ambari metrics issues
Date Wed, 04 Jan 2017 09:36:20 GMT
Hi ,

I'm customizing the ambari metrics for zookeeper, but now I encountered the issue:

After I added the metrics.json and widgets.json in the Zookeeper Service folder,the web portal
shows the widget like this:

And I write a shell to send mocked metrics data and I can get the metrics data by this API:

http://192.168.111.33:6188/ws/v1/timeline/metrics?metricNames=zookeeper.test1&appid=ZOOKEEPER

the response is:

{     "metrics": [{         "timestamp": 1483521150000,         "metricname": "zookeeper.test1",
        "appid": "ZOOKEEPER",         "starttime": 1483521150000,         "metrics": {   
         "1483521150000": 4.4         }     }] }
But when I use this API 
http://192.168.111.33:8080/api/v1/clusters/ISDP_Cluster/services/ZOOKEEPER/components/ZOOKEEPER_SERVER
the response doesn't contain any metrics data column like this:

{   "href" : "http://192.168.111.33:8080/api/v1/clusters/ISDP_Cluster/services/ZOOKEEPER/components/ZOOKEEPER_SERVER",
  "ServiceComponentInfo" : {     "category" : "MASTER",     "cluster_name" : "ISDP_Cluster",
    "component_name" : "ZOOKEEPER_SERVER",     "display_name" : "ZooKeeper Server",     "init_count"
: 0,     "install_failed_count" : 0,     "installed_count" : 0,     "recovery_enabled" : "false",
    "service_name" : "ZOOKEEPER",     "started_count" : 1,     "state" : "STARTED",     "total_count"
: 1,     "unknown_count" : 0   },   "host_components" : [     {       "href" : "http://192.168.111.33:8080/api/v1/clusters/ISDP_Cluster/hosts/bigdata003.istuary.com/host_components/ZOOKEEPER_SERVER",
      "HostRoles" : {         "cluster_name" : "ISDP_Cluster",         "component_name" :
"ZOOKEEPER_SERVER",         "host_name" : "bigdata003.istuary.com"       }     }   ] }

Meanwhile ,in web portal ,there isn't any graph to show ,so anyone could tell me what is the
probably reasons about the issue?



------------------
Best Regards!
GUO JUN
郭君
Mime
View raw message