ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srimanth Gunturi" <srima...@hortonworks.com>
Subject Re: Review Request 28874: Alert Host Count Summary Exposed Via Cluster Endpoint
Date Tue, 09 Dec 2014 23:28:53 GMT

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


Jonathan, I was testing out Ambari-1.7.0, and the output for hosts-summary is given in such
a way that the sum of all counts is always equal to the number of hosts. If a host has CRITICAL
and WARNING, it wont contribute to WARNING count. Similarly, OKs dont contribute to WARNING.
CRITICAL > WARNING > UNKNOWN > OK. It is worth verifying how that logic was implemented.

For Ambari-2.0.0 we could do it like above. The other option is to introduce a new field called
CRITICAL_OR_WARNING.

- Srimanth Gunturi


On Dec. 9, 2014, 10:24 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28874/
> -----------------------------------------------------------
> 
> (Updated Dec. 9, 2014, 10:24 p.m.)
> 
> 
> Review request for Ambari, Srimanth Gunturi and Tom Beerbower.
> 
> 
> Bugs: AMBARI-8623
>     https://issues.apache.org/jira/browse/AMBARI-8623
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari-1.7.0 the cluster endpoint used to have a summary of host-counts by severity.
We need such a field in Ambari-2.0.0.
> {code}
> alerts: {
>  summary: {
>   CRITICAL: 1,
>   OK: 4,
>   PASSIVE: 0,
>   WARNING: 0
>  }
> }
> {code}
> 
> The alerts_summary structure currently returned by the 2.0.0 API are the summary counts
of alerts in the system, not those of the hosts. There are alerts that don't have a host (such
as aggregate alerts). 
> 
> Add a new field to the cluster endpoint; something like {{alerts_summary_hosts }}
> {noformat}
> http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary_hosts
> {
>   "href" : "http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary_hosts",
>   "Clusters" : {
>     "cluster_name" : "c1",
>     "version" : "HDP-2.2"
>   },
>   "alerts_summary_hosts" : {
>     "CRITICAL" : 1,
>     "OK" : 41,
>     "UNKNOWN" : 0,
>     "WARNING" : 0
>   }
> }
> {noformat}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertSummaryPropertyProvider.java
e9fef0e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 4908eea

>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java 6876877

> 
> Diff: https://reviews.apache.org/r/28874/diff/
> 
> 
> Testing
> -------
> 
> New tests added to cover new summary. 
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message