Created 05-04-2016 02:48 AM
I am trying to run some test API calls on HDP Sandbox 2.4 with Ambari 2.2.1.0 and facing some issues. Here is the call API call I am making.
http://localhost:8080/api/v1/clusters/Sandbox?fields=metrics/load[1462233600,1462406399]&_=1462328977
and all I am getting in return is
{ "href" : "http://localhost:8080/api/v1/clusters/Sandbox?fields=metrics/load[1462233600,1462406399]&_=1462328977", "Clusters" : { "cluster_name" : "Sandbox", "version" : "HDP-2.4" }
Would appreciate any help here.
Created 05-04-2016 01:34 PM
Make sure your Ambari Metrics service is running and that it was running for the time period for which you are trying to request data. On my Sandbox, the Metrics service was shut down. When I started it, the query still didn't return anything because there was no data available to return. When there is data, you will still get the header that you are getting plus the data points. Here is what I get on a different cluster:
{ "href" : "https://localhost:8443/api/v1/clusters/SMESecurityTEST?fields=metrics/load[1462233600,1462406399]&_=1462350240", "Clusters" : { "cluster_name" : "SMESecurityTEST", "version" : "HDP-2.4" }, "metrics" : { "load" : { "1-min" : [ [ 0.0, 1462233600 ], [ 0.3094347587719297, 1462234576 ], [ 0.32168695175438616, 1462238176 ], [ 0.433827850877193, 1462241776 ], ---truncated----
Created 05-04-2016 01:34 PM
Make sure your Ambari Metrics service is running and that it was running for the time period for which you are trying to request data. On my Sandbox, the Metrics service was shut down. When I started it, the query still didn't return anything because there was no data available to return. When there is data, you will still get the header that you are getting plus the data points. Here is what I get on a different cluster:
{ "href" : "https://localhost:8443/api/v1/clusters/SMESecurityTEST?fields=metrics/load[1462233600,1462406399]&_=1462350240", "Clusters" : { "cluster_name" : "SMESecurityTEST", "version" : "HDP-2.4" }, "metrics" : { "load" : { "1-min" : [ [ 0.0, 1462233600 ], [ 0.3094347587719297, 1462234576 ], [ 0.32168695175438616, 1462238176 ], [ 0.433827850877193, 1462241776 ], ---truncated----
Created 05-04-2016 03:16 PM
Thanks Maxwell. I was using 2 days date range whereas data was only available for few hours. I was thinking it will still respond with whatever data it has. Now I ran with 2 mins range and it came back with metrics. However, this data looks very granular. Couple of questions for you: