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 A6678174CD for ; Mon, 27 Apr 2015 18:42:30 +0000 (UTC) Received: (qmail 93530 invoked by uid 500); 27 Apr 2015 18:42:30 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 93494 invoked by uid 500); 27 Apr 2015 18:42:30 -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 93473 invoked by uid 99); 27 Apr 2015 18:42:30 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 18:42:30 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id E45671DB579; Mon, 27 Apr 2015 18:42:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5182914436563160010==" MIME-Version: 1.0 Subject: Re: Review Request 33593: Add Support For Script-Based Alert Dispatchers From: "Tom Beerbower" To: "Nate Cole" , "Tom Beerbower" Cc: "Jonathan Hurley" , "Ambari" Date: Mon, 27 Apr 2015 18:42:30 -0000 Message-ID: <20150427184230.17829.59354@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Tom Beerbower" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/33593/ X-Sender: "Tom Beerbower" References: <20150427182141.26755.79849@reviews.apache.org> In-Reply-To: <20150427182141.26755.79849@reviews.apache.org> Reply-To: "Tom Beerbower" X-ReviewRequest-Repository: ambari --===============5182914436563160010== 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/33593/#review81712 ----------------------------------------------------------- Ship it! Looks good... a couple comments. ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java Is the added dispatcher parameter needed here? It doesn't appear to be used. ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java Same as above... is dispatcher needed? - Tom Beerbower On April 27, 2015, 6:21 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33593/ > ----------------------------------------------------------- > > (Updated April 27, 2015, 6:21 p.m.) > > > Review request for Ambari, Nate Cole and Tom Beerbower. > > > Bugs: AMBARI-9919 > https://issues.apache.org/jira/browse/AMBARI-9919 > > > Repository: ambari > > > Description > ------- > > Add support for alert dispatchers which invoke a configurable command line script. This involves several steps: > > - Change the Ambari framework to allow for custom dispatchers to be picked up via the classpath. > - Allow for dispatchers to receive notifications that do not have pre-generated content since the {{alert-templates.xml}} may not be able to provide the correct command-line arguments for the script. > - The script dispatcher should be able to use any script defined in ambari.properties. A single dispatcher class can therefore dispatch to any number of scripts if the script path is found in ambari.properties. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java bbeca38 > ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java 184c8db > ambari-server/src/main/java/org/apache/ambari/server/notifications/Notification.java 5e34b12 > ambari-server/src/main/java/org/apache/ambari/server/notifications/NotificationDispatcher.java 8a88b42 > ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/EmailDispatcher.java 4abec3a > ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/SNMPDispatcher.java a147bac > ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertNotification.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/state/alert/TargetType.java 9f3b5d8 > ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java 0f0e637 > ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java ff626ac > ambari-server/src/test/java/org/apache/ambari/server/notifications/MockDispatcher.java 5c248e1 > ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcherTest.java PRE-CREATION > ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java c4c2ed8 > > Diff: https://reviews.apache.org/r/33593/diff/ > > > Testing > ------- > > Added a dummy script to ambari.properties and had it echo out the alert properties that were being sent. > > mvn clean test > > > Thanks, > > Jonathan Hurley > > --===============5182914436563160010==--