Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-7094

Alerts: Implement Property Updates for Alert Targets

    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

      Alert Targets should have the ability to contain an unstructured set of properties so that customer defined targets (and dispatchers) can still be stored and retrieved by Ambari.

      The initial design had a defined structure for both email and snmp protocols. However, these properties were just turned into a flat set by the data layer.

      For the initial approach, it doesn't make much sense to try to model structured properties when, at the end of the day, they need to be serialized to a map.

      {
        "AlertTarget": {
          "name": "Administrators",
          "description": "The Admins",
          "notification_type": "EMAIL",
          "properties":{
            "mail.smtp.host": "my.host.net",
            "mail.smtp.port" : "587",
            ...
          }
        }
      }
      

      This also lets any property defined be passed to the backend provider in order to properly dispatch to the targets.

        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-7094 - Alerts: Implement Property Updates for Alert Targets (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2f5c78e7f90f575ab2c469da1095eaa5d252d872)

          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java
          • ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertTarget.java
          • ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java
          • ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java
          • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
          • ambari-server/src/main/java/org/apache/ambari/server/state/ConfigFactory.java
          • ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Ambari-trunk-Commit #492 (See https://builds.apache.org/job/Ambari-trunk-Commit/492/ ) AMBARI-7094 - Alerts: Implement Property Updates for Alert Targets (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2f5c78e7f90f575ab2c469da1095eaa5d252d872 ) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertTarget.java ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java ambari-server/src/main/java/org/apache/ambari/server/state/ConfigFactory.java ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java

            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