Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A1B3C6C2 for ; Tue, 9 Dec 2014 23:28:56 +0000 (UTC) Received: (qmail 46446 invoked by uid 500); 9 Dec 2014 23:28:56 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 46412 invoked by uid 500); 9 Dec 2014 23:28:56 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 46398 invoked by uid 99); 9 Dec 2014 23:28:55 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2014 23:28:55 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 5AAE21D22CC; Tue, 9 Dec 2014 23:28:53 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0448752469188970995==" MIME-Version: 1.0 Subject: Re: Review Request 28874: Alert Host Count Summary Exposed Via Cluster Endpoint From: "Srimanth Gunturi" To: "Srimanth Gunturi" , "Tom Beerbower" Cc: "Ambari" , "Jonathan Hurley" Date: Tue, 09 Dec 2014 23:28:53 -0000 Message-ID: <20141209232853.5766.47635@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Srimanth Gunturi" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/28874/ X-Sender: "Srimanth Gunturi" References: <20141209222407.26419.42203@reviews.apache.org> In-Reply-To: <20141209222407.26419.42203@reviews.apache.org> Reply-To: "Srimanth Gunturi" X-ReviewRequest-Repository: ambari --===============0448752469188970995== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 > > --===============0448752469188970995==--