ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aravindan Vijayan <avija...@hortonworks.com>
Subject Re: Trying to get Ambari metrics to work.
Date Tue, 23 Feb 2016 22:04:54 GMT

Edit : The URL should be 

http:localhost:8080/api/v1/clusters/winchester/services/YARN/components/NODEMANAGER?fields=metrics/yarn/ContainersFailed._sum[1456261150,1456264750,15],metrics/yarn/ContainersCompleted._sum[1456261150,1456264750,15],metrics/yarn/ContainersLaunched._sum[1456261150,1456264750,15],metrics/yarn/ContainersIniting._sum[1456261150,1456264750,15],metrics/yarn/ContainersKilled._sum[1456261150,1456264750,15]




-- 
Thanks and Regards,
Aravindan Vijayan








On 2/23/16, 2:03 PM, "Aravindan Vijayan" <avijayan@hortonworks.com> wrote:

>Hi Joshua,
>
>You can get metrics using the fields=metrics predicate. Can you try something like this?
>
>
>https://hcube2-1n01.eng.hortonworks.com:8443/api/v1/clusters/winchester/services/YARN/components/NODEMANAGER?fields=metrics/yarn/ContainersFailed._sum[1456261150,1456264750,15],metrics/yarn/ContainersCompleted._sum[1456261150,1456264750,15],metrics/yarn/ContainersLaunched._sum[1456261150,1456264750,15],metrics/yarn/ContainersIniting._sum[1456261150,1456264750,15],metrics/yarn/ContainersKilled._sum[1456261150,1456264750,15]
>
>
>The metrics are defined in the metrics.json for the service. For example, for YARN it
will be at /var/lib/ambari-server/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json.
>
>
>-- 
>Thanks and Regards,
>Aravindan Vijayan
>
>
>
>
>
>
>
>On 2/23/16, 1:47 PM, "Joshua J. Kugler" <joshua@azariah.com> wrote:
>
>>FYI: The Ambari IRC channel is dead-ish. :)
>>
>>So, according to the docs here: 
>>
>>https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md 
>>
>>a call such as this:
>>GET /clusters/c1/services/HDFS/components/DATANODE
>>
>>should return a bunch of metrics including rpc, disk, cpu, etc.  I'm issuing 
>>this query against our Ambari server: 
>>
>>http://localhost:8080/api/v1/clusters/data-torrent/services/YARN/components/YARN_CLIENT
>>
>>but I'm not getting nearly as much information. I'm only getting this: 
>>
>>https://gist.github.com/jkugler/db42cf9839e805606016
>>
>>What is the best way to get metrics from the Ambari REST API?
>>
>>Thanks!
>>
>>j
>>
>>-- 
>>Joshua J. Kugler - Fairbanks, Alaska
>>Azariah Enterprises - Programming and Website Design
>>joshua@azariah.com - Jabber: pedahzur@gmail.com
>>PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A
>>
Mime
View raw message