Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: alerts, ambari-server
    • Labels:
      None

      Description

      Create an email dispatcher that can be used by the service that scans alert_notice for PENDING entries to relay notifications.

      Alert targets of type EMAIL should be defined with a flat set of properties that governs the dispatching.

      {
        "AlertTarget": {
          "name": "Email Test",
          "description": "The Admins",
          "notification_type": "EMAIL",
          "properties":{
            "ambari.dispatch.credential.username":"ambari",
            "ambari.dispatch.credential.password":"password",
            "ambari.dispatch.recipients":["ambari@repo.ambari.apache.org"],
            "mail.smtp.host":"repo.ambari.apache.org",
            "mail.smtp.port":"25",
            "mail.smtp.auth":"true",
            "mail.smtp.tarttls.enable":"false",
            "mail.smtp.from":"ambari@repo.ambari.apache.org"
          }
        }
      }
      

      Several properties will be Ambari-specific and will be used for authentication and recipients:

      • They will begin with ambari.dispatch
      • ambari.dispatch.recipients will be a JSON array

      The rest of the properties will be used by the concrete dispatcher. In this case, they will be JavaMail properties directly handed to the Properties instance used to initialize the JavaMail Session.

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Ambari-trunk-Commit #492 (See https://builds.apache.org/job/Ambari-trunk-Commit/492/)
          AMBARI-7443 - Alerts: Implement Email Dispatcher (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d838ca95b644a3222c27b7415f2711373affcd83)

          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java
          • ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/EmailDispatcher.java
          • ambari-server/src/main/java/org/apache/ambari/server/notifications/Recipient.java
          • ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java
          • ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertReceivedListener.java
          • ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java
          • ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
          • ambari-server/src/main/java/org/apache/ambari/server/notifications/Notification.java
          • ambari-server/src/test/java/org/apache/ambari/server/notifications/EmailDispatcherTest.java
          • ambari-server/src/main/java/org/apache/ambari/server/notifications/DispatchFactory.java
          • ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
          • ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java
          • ambari-server/src/main/java/org/apache/ambari/server/notifications/DispatchCredentials.java
          • ambari-server/src/test/java/org/apache/ambari/server/notifications/MockDispatcher.java
          • ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertServiceStateListener.java
          • ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java
          • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
          • ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Ambari-trunk-Commit #492 (See https://builds.apache.org/job/Ambari-trunk-Commit/492/ ) AMBARI-7443 - Alerts: Implement Email Dispatcher (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d838ca95b644a3222c27b7415f2711373affcd83 ) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/EmailDispatcher.java ambari-server/src/main/java/org/apache/ambari/server/notifications/Recipient.java ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertReceivedListener.java ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java ambari-server/src/main/java/org/apache/ambari/server/notifications/Notification.java ambari-server/src/test/java/org/apache/ambari/server/notifications/EmailDispatcherTest.java ambari-server/src/main/java/org/apache/ambari/server/notifications/DispatchFactory.java ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java ambari-server/src/main/java/org/apache/ambari/server/notifications/DispatchCredentials.java ambari-server/src/test/java/org/apache/ambari/server/notifications/MockDispatcher.java ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertServiceStateListener.java ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json

            People

            • Assignee:
              jonathan.hurley Jonathan Hurley
              Reporter:
              jonathan.hurley Jonathan Hurley
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development