> On Jan. 15, 2016, 12:54 a.m., Oleksandr Diachenko wrote:
> > ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py,
> >  line 112
> > <https://reviews.apache.org/r/42292/diff/1/?file=1196581#file1196581line112>
> >
> >     Shouldn't this metric to be added to get_host_static_info method as 
> > well?

Thanks for the review Oleksandr, swap_total is already existing in 
get_host_static_info.


- bhuvnesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42292/#review114620
-----------------------------------------------------------


On Jan. 14, 2016, 10:59 a.m., bhuvnesh chaudhary wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42292/
> -----------------------------------------------------------
> 
> (Updated Jan. 14, 2016, 10:59 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jayush Luniya, Sumit Mohanty, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-14658
>     https://issues.apache.org/jira/browse/AMBARI-14658
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This patch addresses the issue raised in AMBARI-14658.
> 
> swap_total metric is defined in metrics.json for several services, but it 
> appears that the value for this metric is not extracted from the host, thus 
> it is not available for consumption by collector and is not returned by API 
> calls. Due to which, if a widget is added based on swap_total, it displays no 
> data.
> 
> swap_output is not available, response of the API call is as below (No data 
> retrieved):
> http://c6401.ambari.apache.org:8080/api/v1/clusters/phd/hosts/c6401.ambari.apache.org?fields=metrics/memory/swap_total
> {
>   "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/clusters/phd/hosts/c6401.ambari.apache.org?fields=metrics/memory/swap_total";,
>   "Hosts" : {
>     "cluster_name" : "phd",
>     "host_name" : "c6401.ambari.apache.org"
>   }
> }
> swap_free is available and the successful response is as below:
> http://c6401.ambari.apache.org:8080/api/v1/clusters/phd/hosts/c6401.ambari.apache.org?fields=metrics/memory/swap_free
> {
>   "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/clusters/phd/hosts/c6401.ambari.apache.org?fields=metrics/memory/swap_free";,
>   "Hosts" : {
>     "cluster_name" : "phd",
>     "host_name" : "c6401.ambari.apache.org"
>   },
>   "metrics" : {
>     "memory" : {
>       "swap_free" : 5762288.0
>     }
>   }
> }
> 
> 
> Diffs
> -----
> 
>   
> ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py
>  60e9294 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/main/resources/metrics_def/HOST.dat
>  c940800 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/test/resources/ui_metrics_def/HOST.dat
>  96e7ddd 
> 
> Diff: https://reviews.apache.org/r/42292/diff/
> 
> 
> Testing
> -------
> 
> Yes, manual.
> 
> Here is the API call output after the patch
> {
>   "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/clusters/phd/hosts/c6401.ambari.apache.org?fields=metrics/memory/swap_total";,
>   "Hosts" : {
>     "cluster_name" : "phd",
>     "host_name" : "c6401.ambari.apache.org"
>   },
>   "metrics" : {
>     "memory" : {
>       "swap_total" : 5767152.0
>     }
>   }
> }
> 
> Output of free from the vm c6401.
> [vagrant@c6401 ~]$ free
>              total       used       free     shared    buffers     cached
> Mem:       2956916    2886212      70704          0      42676    1417524
> -/+ buffers/cache:    1426012    1530904
> Swap:      5767152      10840    5756312
> 
> 
> Thanks,
> 
> bhuvnesh chaudhary
> 
>

Reply via email to